Skip to content

Latest commit

History

History
98 lines (74 loc) 路 2.13 KB

File metadata and controls

98 lines (74 loc) 路 2.13 KB
title <Network Domain Lesson Title>
domain network
subdomain <subdomain>
tags
network
dns
tls
proxy
firewall
load-balancer
tcp
http
ssl
vpn
status draft
confidence 0.8
created <YYYY-MM-DD>
updated <YYYY-MM-DD>
source <your-source>
verified_date
domain_expert

Problem

Root Cause

Solution

Diagnosis

# Example: Check DNS resolution
dig +short example.com
nslookup example.com 8.8.8.8

# Example: Check TLS handshake
openssl s_client -connect example.com:443 -servername example.com

# Example: Check connectivity
curl -v --max-time 5 https://example.com/
nc -zv example.com 443

# Example: Check firewall
iptables -L -n
ufw status

Fix

# Example: Fix DNS
echo "nameserver 8.8.8.8" >> /etc/resolv.conf

# Example: Fix TLS certificate
openssl x509 -in cert.pem -text -noout  # Check cert
certbot renew  # Renew Let's Encrypt

# Example: Fix proxy
export HTTPS_PROXY=http://proxy:port
export HTTP_PROXY=http://proxy:port

# Example: Fix firewall
ufw allow 443/tcp
iptables -A INPUT -p tcp --dport 443 -j ACCEPT

Monitoring

# Example: Check connection latency
ping -c 5 example.com
traceroute example.com

# Example: Check HTTP response
curl -sI https://example.com/ | head -5

# Example: Check certificate expiry
echo | openssl s_client -connect example.com:443 2>/dev/null | openssl x509 -noout -dates

Verification

  1. Run the diagnostic command before and after the fix
  2. Verify connection succeeds (curl returns 200)
  3. Check TLS handshake completes (openssl shows "Verify return code: 0")
  4. Monitor for 5 minutes to confirm stability

Notes