Sunday, March 7, 2010

Debian 18

To determine if a remote host is alive, use:ping hostname

To change ping packet size, use:
ping -s 32 hostname

To change interval and count, use -i and -c parameters respectively.

To query open ports, use:
telnet hostname port

To look at network connection information from the kernel (/proc/), use:

/proc/ is stored in memory. By default netstat does not return listen sockets. To dump all sockets (for services based in /etc/services), use:
netstat -a

To dump all sockets without name resolution, use:
netstat -an

To dump all TCP sockets with programs:
netstat -ntlp

To dump all UDP sockets with programs:
netstat -nulp

To dump kernel routing table:
netstat -rn

To dump interface status:
netstat -i

To determine packet path, per-hop and round-trip times, use:
traceroute hostname

Traceroute makes use of the TTL field in IP.

An advanced version of traceroute is mtr (My Traceroute) which integrates ping as well:
mtr hostname

To resolve IP given a FQDN, use:
nslookup hostname

Dig is similar to nslookup, and it gives more output:
dig hostname

To perform a reverse lookup, use:
dig -x

To find information about a certain domain, use:
whois www.google.com

No comments :

Post a Comment