Skip to content

Instantly share code, notes, and snippets.

@mr-karan
Created November 3, 2015 04:14
Show Gist options
  • Save mr-karan/2a09cc462666edeccde1 to your computer and use it in GitHub Desktop.
Save mr-karan/2a09cc462666edeccde1 to your computer and use it in GitHub Desktop.
Networking commands (*nix)

ifconfig arp ping : icmp packets example : ping 10.6.15.254 -s 2000 -M {dont // do} for DF bit on/off wget/curl -tcp port 80 (http traffic) netstat -rn : for default gateway address arp -a : gives address in cache sudo arp -d xx.xx.xx.xx : clearing cache //filter on wireshark : eth.addr==( your mac address) to find out arp traffic sent from your computer to local network

traceroute –I web.address.com (-I for ICMP instead of usual UDP probes)

sudo dhclient -v -r wlan0/eth0/interface_name to lease IP address sudo dhclient -v wlan0/eth0/interface_name to renew the lease capture DHCP traffic on udp port 67 or udp port 68 dig @198.41.0.4 snu.edu.in to send a request to "a" nameserver whose IP address is 198.41.0.4 capture DNS traffic on udp port 53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment