Using nmap to traceroute on a specific port

user25427

The short version of this is that from client A to server B, some connections are getting all the way there, and others are being dropped in transit. I know they're being dropped in transit because, when I do a tcpdump at the server, I see hits for the ports that work, but nothing for the ones that don't.

I tried the nmap command:

nmap -p <port> --traceroute <dst_ip>

which works perfectly when the connection is successful, but if the connection fails for whatever reason, it marks the port as filtered and then switches to icmp for the traceroute.

Is there something I can do to force the traceroute to stay in the port supplied even if the connection is unsuccessful? I need to be able to see how far the specific port(s) get before being dropped.

Example nmap commands and outputs here: enter image description here

Steven Lee - MSFT

I can't find any parameter to control this behavior in the document of nmap.

If you want to find which hop drops the specific packet, you may try to use traceroute. The parameter -P is for protocol and -p is for port.

Hope this helps.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Are there any port mapping specific features in a Spring application using Docker Compose?

Can you target a specific port using icmp?

nmap skip port scan but execute --script?

How do I log a deny of connection to a specific port using firewalld?

How to check if a specific port is listening using Python script?

No error output when using subprocess with traceroute

Binding to same port using INADDR_ANY and a specific IP simultaneously

Simulate network latency on specific port using tc

One command to kill a process using a specific port

run pm2 in specific port and using cluster mode

Clean Nmap output [IP:Port]

Finding the PID of the process using a specific port?

Three different time values when using traceroute

Extracting specific pattern from nmap

How to identify a device broadcasting data over a specific port using Python?

How to simulate traceroute using ping?

Can you send a TCP packet with RST flag set using IPTABLES as a way to trick NMAP into thinking a port is closed?

Postfix and open port 25 but this port is not showed open with nmap

problem using nmap with proxychains

After opening port with ufw, nmap output shows port as closed

Nmap check if port is open in bash

nmap search for specific IP range

The speed of port scan using nmap -sS and nmap -sT?

Why this oddity when using nmap?

nmap or ping a url with embedded port number?

Traceroute number of hops changes depending on the tcp port used

using Nmap with proxychains4

port scanning a home network using nmap but can't understand how was nmap able to find open ports ,when more than 1 devices were connected

Does STATE LISTEN or ESTABLISHED means I should see an open port when using nmap?