Ports and Services


Uitzoeken welke service op welke poort draait
service --status-all (laat alle services zien)
sudo netstat -lptu # show all named services
sudo netstat -tulpn # show all named (numeric)

sudo lsof -i

lsof -i :22 # which process bound to port 22

ls -l /proc//exe # gives the process' path

nc — arbitrary TCP and UDP connections and listens

whatis mysqld



Ubuntu wireless network Wifi via the command line

iwlist scan - shows wireless networks 
lshw -C network - interface and driver associated with networking devices
lspci -nn
lshw -C usb - Additional info on USB related hardware (good for USB dongles)

cat /etc/modprobe.d/blacklist<...> - modules not loaded at boot time

route -n
netstat -rn

sudo route add default gw
sudo route del default gw

sudo ifup/ifdown
sudo ifconfig up/down

sudo dhclient - Request IP address from DNS server for specified interface
sudo dhclient -r - Release IP address associated with specified interface
sudo iptables -L - Lists firewall rules

/etc/resolv.conf - DNS servers associated with network connections
/etc/dhcp3/dhclient.conf - set or modify dns settings