- Download and install the “self-installer” and WinPcap and Install WinPcap when asked by the Nmap installer.
echo 'alias nmap="/cygdrive/c/Program Files (x86)/Nmap/nmap.exe"' >> ~/.bash_profile
- close and reopen your Cygwin window
Troubleshooting nmap on Cygwin
- errors about interface, try running Cygwin as Administrator (right click on Cygwin icon).
- to find interface names available to nmap
Test nmap Cygwin install
$ nmap 22.214.171.124
Starting Nmap 7.12 ( https://nmap.org ) Nmap scan report for google-public-dns-a.google.com (126.96.36.199) Host is up (0.0092s latency). Not shown: 998 filtered ports PORT STATE SERVICE 53/tcp open domain 443/tcp open https
Nmap done: 1 IP address (1 host up) scanned in 7.41 seconds
- to find servers with a particular port open on a subnet, try this Python code that scans for servers without nmap.
- If you don’t install WinPcap when asked in the nmap installer, nmap would not give proper results (claimed no host existed at a known working IP address).