Interfaces

  • Get the list of all wireless networks reachable by the wlan0 interface:

    1 $ iwlist wlan0 scanning | grep ESSID
  • Get some information about open ports:

    1 $ netstat --taupen
    2 $ netstat --lapute
  • Watch 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.com
  • Get different kind of DNS records of the example.com domain:

    1 $ dig example.com CNAME
    2 $ 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/freebox
    2 $ mount_smbfs -I 192.168.0.254 //Guest@/Disque\ 1/ /mnt/freebox