stack: iproute2 · ufw · tcpdump · nginx

Networking, Firewall & TLS

Socket inspection, routing tables, packet capture, UFW rules, DNS debugging, SSL handshake timing, and Nginx reload checks.

Listening Sockets & States (ss)

Inspect open ports, owning processes, and TCP connection distribution.

sockets ports
All listening TCP/UDP sockets with PIDs
ss -tulnp
Established TCP connections on port 443
ss -tan state established '( sport = :443 or dport = :443 )'
Socket summary statistics
ss -s

Interfaces, Routes & Neighbors (ip)

Check link states, CIDR addresses, default gateways, and ARP/NDP cache.

ip routing
Brief interface & address overview
ip -br -c addr show
Routing table and source path lookup
ip -c route show && ip route get 1.1.1.1
ARP / neighbor table and interface error counters
ip neigh show && ip -s link show eth0

Live Packet Capture (tcpdump)

Capture targeted traffic without DNS slowdown or save PCAP for Wireshark.

tcpdump debug
Capture 50 HTTPS packets across any interface
tcpdump -ni any port 443 -c 50
Write full packets for a specific host to PCAP
tcpdump -ni eth0 -s 0 -w /tmp/capture.pcap host 203.0.113.10
Inspect plaintext loopback traffic in ASCII
tcpdump -ni lo -A -s 0 port 8080

UFW Firewall Management

Audit active rules, allow scoped subnets, and remove stale entries safely.

ufw firewall
Show numbered rules with verbose defaults
ufw status numbered
Allow SSH only from a trusted management CIDR
ufw allow proto tcp from 10.10.0.0/24 to any port 22 comment "mgmt ssh"
Delete rule by index (check numbered status first)
ufw delete 4

DNS & Resolver Diagnostics

Verify systemd-resolved upstreams, trace delegation, and query specific records.

dns debug
Inspect active DNS servers and flush local cache
resolvectl status && resolvectl flush-caches
Direct A/AAAA lookup against public resolver
dig @1.1.1.1 files.storage-node.online A +short
Trace full DNS delegation path from root
dig +trace files.storage-node.online

HTTP & TLS Handshake Checks

Measure TTFB, inspect response headers, and verify certificate expiry.

tls http
Timing breakdown (DNS, TCP, TLS, TTFB, Total)
curl -so /dev/null -w "dns:%{time_namelookup} tcp:%{time_connect} tls:%{time_appconnect} ttfb:%{time_starttransfer} total:%{time_total}\n" https://files.storage-node.online/
Check certificate dates, SANs, and issuer
echo | openssl s_client -connect files.storage-node.online:443 -servername files.storage-node.online 2>/dev/null | openssl x509 -noout -subject -issuer -dates
Inspect HTTP/2 headers
curl -sIL https://files.storage-node.online/

Nginx Config & Logs

Validate syntax before reloading and audit active server blocks.

nginx http
Test configuration and reload gracefully
nginx -t && systemctl reload nginx
Dump active server names, roots, and upstreams
nginx -T 2>/dev/null | grep -E "server_name|root |proxy_pass|listen "
Follow Nginx error log
tail -n 50 -f /var/log/nginx/error.log

Reachability & Path Quality

Probe remote TCP ports and measure packet loss across hops.

routing debug
20-packet MTR report without DNS lag
mtr -rwzc 20 1.1.1.1
Quick TCP port reachability check (3s timeout)
nc -zv -w 3 files.storage-node.online 443
Check physical link speed and duplex
ethtool eth0 | grep -iE "speed|duplex|link detected"

No matching command groups found on this page.