Toshimaru's Blog

Connection Check with netcat(nc) command

nc command

To test TCP connection with nc command, add -v and -z option.

$ nc -vz hostname port
  • -v: verbose output
  • -z: do not send data

http connection check

$  nc -vz 80
Connection to port 80 [tcp/http] succeeded!

SSl/TLS connection check

$ nc -vz 443
Connection to port 443 [tcp/https] succeeded!

UDP connection check

$ nc -vzu 53
Connection to port 53 [udp/domain] succeeded!
Load more