Network Debug Commands

May 18, 2019

Ifconfig

    Used to configure network interface parameters. 
    Checking ip of the machine.

traceroute

Print the route packets take to network host.

dig(Domain information groper)

Dig (domain information groper) query DNS related information like A Record, CNAME, MX Record etc

telnet

Connects to host on given port using telnet protocal. 
If connection successful then host is working fine.

nslookup

It queries internet domain name servers.

Options

> use with -r option to display route table information.

netstat

Displays each of network connections and open sockets.

ip

$ ip addr show 

iptables ( blocks or allows traffic on a Linux host )

$ sudo iptables -S
-P INPUT DROP
-P FORWARD DROP
-P OUTPUT DROP
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -i eth0 -p udp -m udp --sport 53 -j ACCEPT

sudo iptables -S

scp

To copy files remotely.

w

w prints a summary of the current activity on the system, 
including what each user is doing, and their processes.

nmap

Checks all open ports on given server.
Its a powerful tool.

ping

pings given host to check the connection.