53

In our company, I want to check if users are running web servers on port 80 and 8080.

I downloaded nmap and ran this command:

nmap -p 80,8080 192.168.1.0-255

I got a list of IPs and tried to access them in my browser (EG: 192.168.1.1:8080) but wasn't able to connect.

Is my nmap command correct?

Thanks!

EDIT:

Here's the response:

Host is up (0.050s latency).
PORT     STATE SERVICE
80/tcp   open  http
8080/tcp open  http-proxy
  • Can you post you NMAP output. It may be detecting a web server on those ports but the server may not be serving a page. – Shikoru Feb 21 '10 at 6:13
  • // , Just because a port is open doesn't mean anything is using it. – Nathan Basanese Dec 7 '15 at 19:22
50

Your NMAP command is fine. It's the service you're trying to connect to that is the "problem".

You can find that a "server" has an open port on 80 or 8080 but still not be able to connect it. For instance, I have about three dozen polycom phones that are accessible at port 8080 but they have bum config files. When someone tries to access them at that port they aren't able to connect.

And it may depend on how you're trying to connect. Even though its port 8080 maybe you aren't supposed to use a browser to connect to it.(I know - crazy idea).

Find out what type of device you're trying to connect to using this (you'll need sudo or root):

nmap -sS -O -p80,8080 192.168.1.0/24
  • How do I use this to check port 22? – IgorGanapolsky Aug 15 '16 at 7:20
  • 2
    @IgorGanapolsky -p22 – Jared Burrows Aug 20 '16 at 3:30
  • 1
    only the opened nmap -sS -O -p80,8080 192.168.1.0/24 | grep "tcp open" -B 4 – m3asmi Mar 23 '18 at 12:45
  • 1
    If you only want to see the IP addresses of servers that respond to the ports, you can use: nmap -n -Pn 192.168.1.0/24 -p80,8080 -oG - | grep '/open/' | awk '/Host:/{print $2}' (assumes all hosts are online). – XtraSimplicity May 17 '18 at 9:10

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.