Skip to content

Instantly share code, notes, and snippets.

@krisek
Last active May 12, 2023 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save krisek/533342884df831fd65e6c97f1c36ab77 to your computer and use it in GitHub Desktop.
Save krisek/533342884df831fd65e6c97f1c36ab77 to your computer and use it in GitHub Desktop.
Most important connectivity test and network discovery tools

Most important connectivity test and network discovery tools

Netcat

Package: netcat-openbsd

Connect to a server on a given IP and port (telnet on steroids)

nc 10.10.2.1 80

Check connectivity towards a server on a given IP and port

nc -vz -w 4 10.10.2.1 80

v: verbose z: just check if the connection can be opened w: 4 seconds timeout

Start a simple TCP listener on a port

nc -l -p 4080

Nmap

Package: nmap

Discover all hosts on a network with ping

nmap -sP 10.10.2.0/24

Discover open ports on a given host

nmap -sS 10.10.2.30

OpenSSL

Package: openssl

Connect to an TLS server and check certificate

openssl s_client -showcerts -verify 5 -connect 10.10.2.33:443 < /dev/null

cURL

Package: curl

Connect to a Webserver and check the status code, headers and content returned

curl -s -D - https://google.com

Add -k to skip certificate verification.

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