Wednesday, 5 October 2011

Linux commands - Networking

sudo vi /etc/network/interfaces


auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
sudo /etc/init.d/networking restart


netstat -natu  [also nap]
arp -a
tail -f /var/log/messages
ps -aux | grep blah
lsof (list open files) [-i network based]
lsof -p pid [investigate process]
find / -uid 0 -perm -4000 -print

No comments:

Post a Comment