Guidelines

This site is for tech Q&A. Please keep your posts focused on the subject at hand.

Ask one question at a time. Don't conflate multiple problems into a single question.

Make sure to include all relevant information in your posts. Try to avoid linking to external sites.

Links to documentation are fine, but in addition you should also quote the relevant parts in your posts.

0 votes
80 views
80 views

We have a rather complex network setup, and in order to debug a non-working connection to a remote port 80/tcp I want to send a continuous stream of TCP packets (basically like ping is continuously sending ICMP packets), so that we can find at which hop the packets are dropped.

Of course I could wrap netcat in a loop, but that would be rather inconvenient. Is there a better way?

in Sysadmin
edited by
by (100)
1 4 13
edit history

Please log in or register to answer this question.

1 Answer

0 votes
 

What you're asking can be accomplished with hping3.

hping3 -S -p 80 192.168.23.42

-S tells the command to send TCP SYN packets, so that each packet is a new connection attempt and doesn't get dismissed as "unrelated to an existing TCP connection."

-p 80 tells the command to connect to port 80 on the remote host (192.168.23.42, replace the address with your actual host).

You can add -i NUM to wait NUM seconds between each packet.


edited by
by (100)
1 4 13
edit history
...