linux - nc -u 192.168.1.255 9999 fails -


i trying broadcast 192.168.1.255 broadcast address. ifconfig says

eth0      link encap:ethernet  hwaddr 50:e5:49:51:0b:cb             inet addr:192.168.1.2  bcast:192.168.1.255  mask:255.255.255.0           inet6 addr: fe80::52e5:49ff:fe51:bcb/64 scope:link 

but if nc -uv 192.168.1.255 9999 reports

nc: connect 192.168.1.255 port 9999 (udp) failed: permission denied

but nc -uv 192.168.0.255 9999 works fine

try using socat instead since nc tools don't support udp broadcasting.

echo "hello" | socat - udp4-datagram:192.168.1.255:9999,broadcast 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -