Skip to content

Instantly share code, notes, and snippets.

@rponte
Last active January 6, 2020 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rponte/98924612c0191187e3b8965d5bb1ac70 to your computer and use it in GitHub Desktop.
Save rponte/98924612c0191187e3b8965d5bb1ac70 to your computer and use it in GitHub Desktop.
Verifying whether a remote port is open or not using Netcat (nc)
# https://www.2daygeek.com/how-to-check-whether-a-port-is-open-on-the-remote-linux-system-server/
nc -zvw3 -G5 <host> <port_or_range_of_ports>
# -z : scanning mode
# -v : verbose
# -w3: read timeout in seconds (3 sec) / obs: On Mac OS X the -w3 parameter is ignored.
# -G5: connect timeout in seconds (5 sec)
@rponte
Copy link
Author

rponte commented Jan 6, 2020

@rponte
Copy link
Author

rponte commented Jan 6, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment