Netcat (Linux nc) Practical Examples for Network Admins
Netcat (Linux nc) Practical Examples for Network Admins Send a test UDP packet to a remote server This command sends a UDP test packet to the specified host and port. The -w1 option sets the timeout to 1 second.
echo -n "foo" | nc -u -w1 192.168.1.8 5000
Open a UDP port to receive data nc -lu localhost 5000
Port scanning on a remote host This command scans TCP ports in the ranges 1-1000 and 2000-3000 on the specified host to see which ports are open.