Linux Networking: DNS, HTTP, and TLS Testing

DNS troubleshooting, resolver inspection, HTTP probing, and TLS certificate testing from Linux.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

DNS Resolution

Query DNS, inspect resolvers, and troubleshoot resolution issues.

Query A record

Fetch an A record in short output format.

bashLINUXdigdnsa-record
bash
dig +short example.com A

Fetch an A record in short output format.

Query MX record

Fetch MX records in short format.

bashLINUXdigdnsmx
bash
dig +short example.com MX

Fetch MX records in short format.

Trace DNS delegation

Follow delegation from root to authoritative answers.

bashLINUXdigdnstrace
bash
dig +trace example.com

Follow delegation from root to authoritative answers.

Query a specific resolver

Send a DNS query to a chosen DNS server.

bashLINUXdigdnsresolver
bash
dig @1.1.1.1 example.com

Send a DNS query to a chosen DNS server.

Resolve with host

Look up DNS records with the host command.

bashLINUXhostdnslookup
bash
host example.com

Look up DNS records with the host command.

Resolve with nslookup

Interactive or one-shot DNS lookup.

bashLINUXnslookupdnslookup
bash
nslookup example.com 8.8.8.8

Interactive or one-shot DNS lookup.

Show systemd-resolved status

Inspect current DNS servers and search domains.

bashLINUXresolvectldnssystemd
bash
resolvectl status

Inspect current DNS servers and search domains.

Query through systemd-resolved

Resolve a domain using resolvectl.

bashLINUXresolvectldnsquery
bash
resolvectl query example.com

Resolve a domain using resolvectl.

Resolve through NSS

Query host resolution through glibc NSS.

bashLINUXgetentdnsnss
bash
getent hosts example.com

Query host resolution through glibc NSS.

Inspect resolver config

Show the resolver configuration file.

bashLINUXresolv.confdnsconfig
bash
cat /etc/resolv.conf

Show the resolver configuration file.

HTTP and TLS Testing

Test URLs, certificates, proxies, and HTTP behavior from Linux.

Fetch response headers

Make a HEAD request to inspect headers.

bashLINUXcurlhttpheaders
bash
curl -I https://example.com

Make a HEAD request to inspect headers.

Verbose HTTP request

Display request and response details.

bashLINUXcurlhttpdebug
bash
curl -v https://example.com

Display request and response details.

Override DNS for one request

Pin a host:port to a chosen IP address.

bashLINUXcurldnsoverride
bash
curl --resolve example.com:443:203.0.113.10 https://example.com

Pin a host:port to a chosen IP address.

Send request from interface

Use a specific local interface for outbound traffic.

bashLINUXcurlinterfacehttp
bash
curl --interface eth0 https://example.com

Use a specific local interface for outbound traffic.

Use an HTTP proxy

Send an HTTP request through a proxy.

bashLINUXcurlproxyhttp
bash
curl -x http://proxy.example.com:3128 https://example.com

Send an HTTP request through a proxy.

Inspect TLS certificate chain

Open a TLS session and print certificate details.

bashLINUXopenssltlscertificate
bash
openssl s_client -connect example.com:443 -servername example.com

Open a TLS session and print certificate details.

Show certificate dates

Print notBefore and notAfter fields from a certificate file.

bashLINUXopensslcertificatedates
bash
openssl x509 -in cert.pem -noout -dates

Print notBefore and notAfter fields from a certificate file.

Test URL availability

Check whether a URL is reachable without downloading content.

bashLINUXwgethttpavailability
bash
wget --spider -S https://example.com

Check whether a URL is reachable without downloading content.

Recommended next

No recommendations yet.