I'm writing a simple client to ping a server with a packet on port 7 (echo) and then waiting for a reply. Is there a server that I can use to test this?
Asked
Active
Viewed 8,764 times
2 Answers
3
sudo nc -vvlp 7 -e /bin/cat
If you happen to have a inetd
installed, most of them have echo
built-in. Snippet from /etc/inetd.conf
:
echo stream tcp nowait nobody internal echo dgram udp wait nobody internal

user1686
- 10,162
- 1
- 26
- 42
-
(with nc.traditional / the one by Hobbit) – Tobu Jan 30 '10 at 22:15
-
Tobu: Works fine on GNU netcat too. – user1686 Jan 31 '10 at 17:42
-
Use `nc` from package `ncat` which supports option `-e` (as opposed to `netcat-openbsd`) – macieksk Jul 30 '20 at 13:48
-
It doesn't work. See bug https://github.com/nmap/nmap/issues/962 – cagney Nov 01 '21 at 19:51