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
Post a Comment