There are several tools within linux to work with network settings and to help find information about the network that you are on. One thing that you will see if that I have hidden the mac address of my stuff here for this tutorial. The reason is that the mac address is considered to be the physical address of your network interface. If was brought up that it is similar to your home address.
Disclaimer: These should not be used to malicious activity and I do not condone and am not responsible for any malicious act committed by any command shown.
- ifconfig -a – In the example below, the ether name shows the MAC Address assigned to your network interface which is unique to each card. The inet is the network address given to your network interface in an IPV4 format. The inet 6 is also known as IPV6 and is not used by a lot of internet service providers yet.
- iwconfig – The iwconfig command give information about the wifi network that you are connected to. The Access Point that I marked through is the MAC address of that access point.
- sudo ifconfig wlp2s0 promisc – To place a wireless interface in promiscuous mode for monitoring your local wifi network, use the ifconfig command shown with the wireless interface. Keep in mind that you need to do this with sudo as you are making changes to the network interface.
- sudo ifconfig wlp2s0 -promisc – This command will take you out of promiscuous mode and back to normal wifi operations.
Before the change to promiscuous mode:
After the change to promiscuous mode:
- route command – The route command in linux shows the kernel routing table information. Under flags, the U is showing up while G is showing Gateway. Show UG is an up gateway.
- route -n – The route with the -n switch changes the host names in the route table is IP Address instead of showing the actual name itself.
- route add -net default gw gatewayname dev wlp2s0
- route -Cn – Shows the cache route table for faster network traffic routing. There may not be any cache available so don’t be concerned if you don’t see anything here.
- route add 22.214.171.124 gw 127.0.0.1 lo
- netstat -nr OR route -n
- route add -host IP-ADDRESS reject
- route add -host 126.96.36.199 reject
- ip route get 188.8.131.52
- route add -net 184.108.40.206/24 gw 127.0.0.1 lo
- ip route add blackhole 220.127.116.11/29
- route -n
- route delete 18.104.22.168