Tips and Tools for troubleshooting Linux Network

  1. Nslookup – can I resolve the hostname?

  2. /etc/hosts – is the entry in host file?

  3. Ifconfig – or ip add – check network interface configuration

  4. more /etc/network/interaces or /etc/sysconfig/network-scripts

    1. contents

    2. auto eth1 – bring up interface at startup

    3. eth1 dhcp

  5. If your address starts with 169.254. Then you are configured for DHCP, but DHCP failed

  6. Ping www.google.com – see if it is alive

  7. Use telnet or netcat domain port - netcat google.com 443

  8. For example

  9. Sudo /etc/init.d/network restart

  10. netstat –nat – numeric (don’t resolve) t=TCP (not UDP) l=listening

  11. sudo ufw status – uncomplicated firewall

    1. SSH is blocked by default

    2. Sudo ufw allow 22 #before enabling firewall

    3. More /etc/services to see list of services with ports

    4. Sometimes an application will override entries in /etc/services and break things

  12. /lib/ufw/user.rules

  13. Opensource network defined software firewalling