Skip to content

Instantly share code, notes, and snippets.

@pidzej
Forked from krisek/nettols.md
Created May 12, 2023 13:21
Show Gist options
  • Save pidzej/36eaa69c94ee9b725937c61a561c3c0f to your computer and use it in GitHub Desktop.
Save pidzej/36eaa69c94ee9b725937c61a561c3c0f 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