Skip to main content

Command Palette

Search for a command to run...

Linux 🌐 Phase 5 : Networking & Internet for DevOps Beginners

Learn ping, ip, netstat, curl & more for DevOps networking basics

Updated
•View as Markdown
Linux 🌐 Phase 5 : Networking & Internet for DevOps Beginners
A
🚀 Code. Automate. Innovate. Hi, I’m Abdulrahman, a passionate DevOps Engineer and Software Developer on a mission to bridge the gap between code and production. With a love for automation, cloud-native solutions, and cutting-edge tech, I turn complex problems into seamless, scalable systems. 💡 What I Do: Build robust CI/CD pipelines that deliver software at the speed of thought. Architect cloud infrastructure that scales with a single command. Transform manual processes into automated workflows that just work. Break down silos and foster collaboration between teams. 🔧 Tech Stack I ❤️: Containers (Docker), Orchestration (Kubernetes), Infrastructure as Code (Terraform), CI/CD (Jenkins, GitLab), Cloud (AWS/GCP/Azure), and scripting like it’s my superpower. 📝 Why This Blog? This is where I share my journey, lessons learned, and the latest trends in DevOps and software engineering. Whether you're a seasoned pro or just starting out, join me as we explore the tools, tricks, and best practices that make the tech world tick. 🌟 Let’s Build the Future, One Pipeline at a Time. Connect with me, share your thoughts, and let’s automate the world together!

🎯 Target Audience: Beginners in DevOps & DevSecOps
🧠 Key Concepts: ping, traceroute, ip, ss, netstat, curl, wget
⏱ Estimated Read Time: ~9 minutes
📚 Series: Yes – Part of “Linux for DevOps Beginners”
🌍 Real-World Focus: Practical networking commands for automation, debugging, and security


Why This Matters in DevOps?

Every application relies on networking and internet connectivity. As a DevOps or DevSecOps engineer, you’ll constantly verify that servers, containers, and services are accessible and secure.

From troubleshooting failed deployments to auditing network exposure, mastering these commands is non-negotiable. Think of them as your first-response toolkit for diagnosing and securing modern infrastructure.


1️⃣ Connectivity Checks —> ping & traceroute 🌐

What they do:

  • ping checks if a host is reachable.

  • traceroute maps the path packets take to reach a destination.

Examples:

# Test if google.com is reachable
ping google.com

# Trace the route packets take to reach google.com
traceroute google.com

Real-World DevOps Use Cases:

  • Debugging a failed CI/CD deployment when a service isn’t reachable.

  • Checking DNS or internet connectivity inside a container.

DevSecOps Angle:

  • Verify network isolation/security groups.

  • Detect unexpected routing or exposure.


2️⃣ Network Interfaces —> ip & ifconfig 💻

What they do:

  • ip (modern) and ifconfig (legacy) show and configure network interfaces.

Examples:

# Show IP addresses
ip a

# Assign IP address to an interface
sudo ip addr add 192.168.1.50/24 dev eth0

Real-World DevOps Use Cases:

  • Verifying if a server/container received the correct IP.

  • Debugging network misconfigurations in Kubernetes pods.

DevSecOps Angle:

  • Identify unauthorized interfaces.

  • Ensure only approved IPs are assigned to production servers.


3️⃣ Open Ports & Connections —> ss & netstat 🔒

What they do:

  • Show which ports are open and what connections exist.

  • ss is the modern replacement for netstat.

Examples:

# Show listening ports
ss -tulnp

# Show all connections
netstat -tulnp

Real-World DevOps Use Cases:

  • Debugging why Nginx isn’t accepting connections.

  • Checking if a database is bound to localhost or 0.0.0.0.

DevSecOps Angle:

  • Spot unauthorized open ports.

  • Detect suspicious outbound connections.


4️⃣ File Transfer & API Testing —> curl & wget 🚀

What they do:

  • curl → interact with APIs, test endpoints, upload/download data.

  • wget → download files from the internet.

Examples:

# Download a file with wget
wget https://example.com/file.tar.gz

# Send a POST request with curl
curl -X POST -H "Content-Type: application/json" \
-d '{"user":"alpha","role":"devops"}' \
https://api.example.com/users

Real-World DevOps Use Cases:

  • Fetching build artifacts in CI/CD pipelines.

  • Testing REST APIs in automation scripts.

DevSecOps Angle:

  • Simulate unauthorized API calls.

  • Check headers, redirects, and SSL/TLS configurations.


Common Mistakes to Avoid

  • Relying only on ping → Firewalls may block ICMP; always validate with curl or ss.

  • Using ifconfig only → Legacy; prefer ip for modern systems.

  • Ignoring ss/netstat output → Open ports can expose production systems.

  • Hardcoding wget/curl in scripts without validation → Risks downloading malicious files.


Quick Recap

  • ping & traceroute → Test connectivity & network path.

  • ip & ifconfig → Inspect and configure interfaces.

  • ss & netstat → Monitor open ports and active connections.

  • curl & wget → Transfer files & interact with APIs.

Master these, and you’ll handle networking like a pro 🚀.


🚀 Call to Action

If you found this useful, share it with a fellow DevOps beginner.
Next up: Phase 6 – Linux Processes & Monitoring 🖥️
We’ll dive into ps, top, htop, and kill to manage processes effectively.


👨‍💻 Written by: Abdulrahman A. Muhamad
🌐 LinkedIn | GitHub | Portfolio

Linux for DevOps Beginners: From Shell to Production

Part 5 of 8

Beginner-friendly Linux series for DevOps & SREs. Learn file systems, permissions, processes, networking, automation & security with hands-on examples. Build a solid foundation before diving into cloud & containers.

Up next

Linux Package Management for DevOps Beginners | apt, dpkg, snap

Master package managers in Linux to streamline installs, updates, and automation in DevOps workflows.