Interfaces
Get the list of all wireless networks reachable by the wlan0 interface:
1
$ iwlist wlan0 scanning | grep ESSIDGet some information about open ports:
1
$ netstat --taupen2$ netstat --laputeWatch network activity in real-time:
1
$ watch -n 1 "lsof -i"Reboot machine if the 192.168.0.254 host doesnβt reply to at least one ping after 15 attempts or 600 seconds:
1
$ ping -c 15 -o -t 600 192.168.0.254 || shutdown -r now
Domain names
Get the IP address where a domain points to:
1
$ host kevin.deldycke.comGet different kind of DNS records of the example.com domain:
1
$ dig example.com CNAME2$ dig example.com MX
Content inspection
Save all images passing through eth0:
1
$ driftnet -i eth0 -a -d ./http-pics
Samba / CIFS
Mount a samba share:
1
$ mkdir /mnt/freebox2$ mount_smbfs -I 192.168.0.254 //Guest@/Disque\ 1/ /mnt/freebox