Showing posts with label ip. Show all posts
Showing posts with label ip. Show all posts

Monday, April 18, 2011

TCP dump for only port 80

Here is a way to dump all tcp traffic on port 80 to and from the bond0 interface:

tcpdump -w tcpdumpPort80.pcap -i bond0 tcp port 80

If you wanted to use only the eth0 interface (more common), use this example:

tcpdump -w tcpdumpPort80.pcap -i eth0 tcp port 80

Wednesday, January 7, 2009

DNS lookups

To find a hostname when you know the IP address:

nmblookup -A <ip_address>

eg. nmblookup -A 192.168.0.148

or

host <ip_address>

eg. host 192.168.0.148

To find an IP address when you know the hostname, try the following ways:

whois www.google.com
dig www.google.com
nslookup www.google.com