My use case is to check open ports on multiple servers, so when I try:

nmap -iL list.txt

then nmap only scans for some particular ports whether they are open or closed, but when I try:

namp -p 1-1000

it checks for every single port whether it is open or not but it is limited to only one IP/server.

I want to perform a scan on multiple servers at one time.

The following did not work:

nmap -p 1-1000

It gave error.

  • 1
    How about: nmap -v -A -T5 -p1-65535 -iL list.txt – Jeroen - IT Nerdbox Apr 8 '16 at 7:34
  • Thanks, it is working. What attribute in above command is only responsible for checking open ports. I don't want to do service scans etc, only want to do port scanning. which attribute should i remove in command? – bhartay Apr 8 '16 at 7:43
  • Lose the -v -A -T5. Please note that this is only for TCP ports and will not scan for open UDP ports. – Jeroen - IT Nerdbox Apr 8 '16 at 7:45
  • man nmap is your friend. – GdD Apr 8 '16 at 8:34
  • "It gave error." What error? – bonsaiviking Apr 9 '16 at 4:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.