Netcat udp port test R7800 working?


after installing netcat on a Netgear R7800 I'm trying a simple upd test:
netcat -vvz -u 123

netcat end immediately without error.

Same test using nmap nmap -sU -v return a result:

53/udp   open   domain
123/udp  open   ntp
161/udp  open   snmp
520/udp  closed route
1900/udp closed upnp
5353/udp closed zeroconf

123/udp is open.

PS: netcat and nmap all tests performed from ssh directly on router.
PS²: Same netcat test from ubuntu laptop via ethernet link through the router is working.

Thank you for your advices.

Kind Regards

I was not able to reproduce your issue.

root@magiatiko:[~]#netstat -lnp | grep 123
udp        0      0 :::123                  :::*                                4631/ntpd
root@magiatiko:[~]#nc -vvz -u 123
Total received bytes: 0
Total sent bytes: 0
root@magiatiko:[~]#netcat -vvz -u 123
Total received bytes: 0
Total sent bytes: 0


I think that netcat reply with somthing like Connection to 123 port [udp/ntp] succeeded! when port is open.

I don't see this in your output.

I have the same output with Total received bytes: 0 / Total sent bytes: 0, but without any succeed.

When I use netcat to test a port which is not opened it only reply Total received bytes: 0 / Total sent bytes: 0 due to -vv or nothing with only -v

Kind Regards

Maybe I misunderstood that your problem was that there was no output at all.
Indeed the netcat from another linux host will report differently
magiatiko.mrv [] 123 (ntp) open sent 0, rcvd 0
Still the sent and received is zero.
However netcat version in OpenWrt is 0.7.1 and is a rewrite. In my linux host it is 1.10 and has more options.


Thanks for your return.
Yes you are right sent and received are always 0 with -z

I was just searching an output or something else which is saying opened or closed.

Standard behavior is:

  • output containing open or succeed port is open
  • no output port is closed

Whether the port is open or closed I don't have any output.
How to know using netcat.

Kind Regards