Watergent Notes

Systems &
Networking Notes

Practical commands for checking HTTPS, diagnosing DNS, and maintaining small Linux servers.

Read the dual-stack checklist
Checking a dual-stack host
$ dig +short example.net A
$ dig +short example.net AAAA
$ curl -4 -I https://example.net/
$ curl -6 -I https://example.net/

In this notebook

Checking a dual-stack host

When a hostname works over one address family, test the other using the same URL and from the same client.

dig +short example.net A
dig +short example.net AAAA
curl -4 -I --connect-timeout 5 https://example.net/
curl -6 -I --connect-timeout 5 https://example.net/
  • An empty answer for the relevant record means the resolver supplied no address of that family. Inspect the DNS reply status to distinguish an empty answer from a query failure.
  • A connection timeout suggests checking the route, firewall and listener. A certificate error means TLS verification failed after the connection was attempted.
  • If the hostname has several addresses, use curl --resolve with the address under test to preserve the hostname and certificate checks.

Tracing a DNS record change

Check which server supplied the answer and compare record values and TTLs before changing resolver settings.

dig example.net AAAA +noall +comments +answer +authority
dig @1.1.1.1 example.net AAAA +noall +comments +answer +authority
dig +short example.net NS

Use one of the returned name servers as the @server argument to query the authoritative answer. For a host in a subdomain, use the name servers for its actual DNS zone.

Reading the reply

NXDOMAIN means the queried name does not exist. A NOERROR reply can have no records of the requested type. Recursive resolvers can cache either kind of negative response, so an old result can persist after the authoritative data changes.

Reading memory and swap on Linux

A short sample can distinguish a full-looking cache from memory pressure during active work.

free -h
swapon --show
vmstat 1 6
zramctl

Start with available in free. In vmstat, use the interval rows after the first line and check whether si and so stay elevated while the workload is active.

For zram, DISKSIZE reports logical device capacity, and TOTAL reports memory used by the compressed device, including overhead. Swap usage alone tells you little about how often the system is paging.