sudo nc -ulk 0.0.0.0 10002
Bind to port 10002 (explicitly specify to listen on all interfaces), and listen for UDP data.
-u
: UDP-l
: Listen-k
: Keepalive (default netcat behavior is to terminate after first message received)sudo netstat -anp | grep 10002
List all processes bound to port 10002
-a
: Shows all connections and listening ports-n
: Shows addresses and port numbers in numerical form (no DNS resolution)-p
: Shows the associated process ID (PID) and program nameecho "hello world" | sudo nc -u -w1 10.48.20.184 10002
Sends “hello world” over UDP to 10.48.20.184 on port 10002
-u
: UDP-w1
: Exit netcat after 1s (default behavior is to stay open and wait on stdin)openssl s_client -connect ottawa-pro-2:3303
Initiate TCP connection and attempt SSL/TLS handshake