Ask Your Question
1

nmap question: who has the port open?

asked 2018-03-01 11:49:12 -0500

toddandmargo gravatar image

Hi All,

Is there a way to get nmap to tell me who (IP) has port 6566 open?

$ nmap -p 6566 192.168.255.0/24

Starting Nmap 7.60 ( https://nmap.org ) at 2018-02-27 00:39 PST
Nmap scan report for rn6.foo.local (192.168.255.10)
Host is up (0.00010s latency).

PORT     STATE SERVICE
6566/tcp open  sane-port

Nmap done: 256 IP addresses (1 host up) scanned in 2.79 seconds

Many thanks, -T

edit retag flag offensive close merge delete

Comments

2

Well, it is already there rn6.foo.local (192.168.255.10). If you just want to have the IP address returned, just add the -n option to nmap: nmap -n -p 6566 192.168.255.0/24.

thomaswood gravatar imagethomaswood ( 2018-03-01 11:54:27 -0500 )edit

My misunderstanding. I thought the .10 was the address of the sender, not the return reply.

toddandmargo gravatar imagetoddandmargo ( 2018-03-01 11:59:25 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-13 03:43:56 -0500

hedayat gravatar image

No IP has it open. When a port is open, it means that a process is listening to it on the target system. It doesn't mean that something is actually connected to the port. BTW, for such information, you should use netstat not nmap.

edit flag offensive delete link more

Comments

netstat gives way too much information and it does not tell me what I want to know:

$ netstat | grep 6566
<nothing>

nmap does:

$ nmap -p 6566 192.168.255.10

Starting Nmap 7.60 ( https://nmap.org ) at 2018-03-13 03:47 PDT
Nmap scan report for 192.168.255.10
Host is up (0.000093s latency).

PORT     STATE SERVICE
6566/tcp open  sane-port

Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds
toddandmargo gravatar imagetoddandmargo ( 2018-03-13 05:48:38 -0500 )edit

What do you want to know?! If you want to know who is listening on ports on your machine, both nmap & netstat can tell you. But for netstat, you should use -l option.

But if you want to know if anybody is connected to the port, netstat is telling you: nobody. nmap doesn't tell you if anybody is connected to the port or not. It is just telling you that someone is listening to the port.

hedayat gravatar imagehedayat ( 2018-03-17 07:29:41 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-03-01 11:49:12 -0500

Seen: 83 times

Last updated: Mar 13