Skip to content

Instantly share code, notes, and snippets.

@gotev
Last active September 10, 2017 00:19
Show Gist options
  • Save gotev/abe0259a84408b697012713ed54db254 to your computer and use it in GitHub Desktop.
Save gotev/abe0259a84408b697012713ed54db254 to your computer and use it in GitHub Desktop.
Remote host checks cheatsheet from linux

Check host reachability

IPv4

ping hostname_or_ip

IPv6

ping6 hostname_or_ip

Check DNS records

Prerequisite:

apt-get install dnsutils
dig hostname
dig hostname any
//there are many other things which dig allows to check

Check plain socket port availability

Prerequisite:

apt-get install netcat netcat6

IPv4

nc -vvv hostname_or_ip port

IPv6

nc -6 -vvv hostname_or_ip port

Check SSL socket port availability

Prerequisite:

apt-get install openssl nmap

IPv4

ncat --ssl -v hostname_or_ip port

IPv6

ncat -6 --ssl -v hostname_or_ip port
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment