68

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
2
  • 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, 2010 at 6:13
  • // , Just because a port is open doesn't mean anything is using it. Dec 7, 2015 at 19:22

1 Answer 1

63

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
4
  • How do I use this to check port 22? Aug 15, 2016 at 7:20
  • 3
    @IgorGanapolsky -p22 Aug 20, 2016 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, 2018 at 12:45
  • 2
    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). May 17, 2018 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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