Networking & Security in Linux

·

2 min read

Introduction

Networking and security are at the heart of DevOps. Today, I explored how Linux handles networking, manages security, and ensures secure remote access. These skills are crucial for server management, troubleshooting, and securing infrastructure.

What I Learned Today

1️⃣ Networking Basics

Understanding how Linux networks work is essential for managing cloud environments. I explored:

  • Checking network configurations:

      ifconfig
      ip a
    
  • Testing network connectivity:

      ping google.com
      traceroute google.com
    
  • Viewing active network connections:

      netstat -tulnp
      ss -tulnp
    

2️⃣ Managing Network Services

I practiced controlling network services with:

  • Restarting networking services:

      systemctl restart networking
    
  • Checking domain name resolution:

      nslookup example.com
      dig example.com
    

3️⃣ Firewall & Security

Securing servers is crucial, so I learned about:

  • UFW (Uncomplicated Firewall):

      ufw enable
      ufw allow 22/tcp
      ufw status
    
  • iptables:

      iptables -A INPUT -p tcp --dport 80 -j ACCEPT
      iptables -L -v -n
    

4️⃣ Secure Remote Access

Managing remote servers requires secure access. I explored:

  • Connecting securely with SSH:

      ssh user@server-ip
    
  • Copying files remotely:

      scp file.txt user@server-ip:/home/user/
    
  • Syncing directories with rsync:

      rsync -avz /local/path/ user@server-ip:/remote/path/
    

5️⃣ Troubleshooting Network Issues

For diagnosing issues, I practiced:

  • Capturing network packets:

      tcpdump -i eth0
    
  • Checking if a port is open:

      nc -zv server-ip 22
    

Interesting Things:

  • Configuring firewall rules properly without blocking my own access.

  • Understanding differences between iptables and ufw.

#DevOps #LinuxNetworking #CyberSecurity #100DaysOfDevOps