Networking cheatsheet

Get DNS records

Using default DNS resolvers:


Using Cloudflare ( DNS resolver:


Setup HTTP server with netcat

Run the following to start a HTTP responder on port 5555:

while :; do echo -e "HTTP/1.1 200 OK\nContent-Length: 3\n\n ok" | nc -l -p 5555; done

To verify TCP connectivity, run the above and then:

curl localhost:5555
# or
wget -qO - localhost:5555

Verifying port connectivity

To verify that port 443 is open on, use:

nc -zv 443

Generic structure of command:

nc -zv ${HOSTNAME} ${PORT}

Last updated