Created
December 29, 2016 02:12
-
-
Save rcanepa/4ca0bef7e4a36a6cb975bb4b7a412e23 to your computer and use it in GitHub Desktop.
ARP and nmap to scan a network
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get broadcast IP | |
| $ ifconfig | grep broadcast | |
| Ping the IP | |
| $ ping broadcast | |
| Check the ARP table | |
| $ arp -a | |
| ARP will only list address that are on the same subnet as your computer. | |
| To do what you want you might want to use nmap to check all computers that are connected to a certain network. | |
| Or If all your devices are configured via DHCP—yes, DHCP can serve multiple subnets, depending on the DHCP server that is being used—you might check the DHCP leases file. | |
| Edit as requested: | |
| $ nmap -n -sn 10.0.0.0/24 | |
| or | |
| $ nmap -n -sP 10.0.0.0/24 | |
| depending wich version of nmap you have (-sn is for newer versions). | |
| replace the 10.0.0.0/25 for each subnet you have. | |
| Example | |
| $nmap -n -sn 192.168.1.1/24 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment