Web Servers Implementation

This is a structured visual and text-based overview of my IPv4 + IPv6 dual-stack web architecture with HAProxy and self-contained certs.


🌐 Final Architecture Diagram (Text-based)

┌──────────────────────┐                       ┌──────────────────────┐
│     IPv6 Internet    │                       │    IPv4 Internet     │
│   (native routing)   │                       │   (single IP NAT)    │
└────────────┬─────────┘                       └──────────┬───────────┘
             │                                            |
             │ AAAA: points directly                      | A: points to
             │ to webserver VMs                           | HAProxy VM
             ▼                                            ▼
    ┌─────────────────────┐                    ┌──────────────────────┐
    │ Apache VM: wp-mbz   │  ◀──────────────  │     HAProxy VM       │
    │ ── for c14.au       │       SNI          │ IPv4 → SNI routing   │
    │ IPv6: ::cafe:babe   │    passthrough     │ IPv6: ::cafe         │
    │ LetsEncrypt + certs │                    │ routes to wp-mbz/hb2 │
    └─────────────────────┘                    └──────────┬───────────┘
                                                          │
    ┌─────────────────────┐                               ▼
    │ Apache VM: wp-lnh   │                          Internal LAN
    │ ── for hb2.au       │                        (192.168.16.0/20)
    │ IPv6: ::cafe:d00d   │
    │ LetsEncrypt + certs │
    └─────────────────────┘

📄 Structured Description

🧩 Components

RoleNameAddressing
Reverse ProxyhaproxyIPv4: 192.168.20.17, IPv6: ::cafe
Webserver #1wp-lnhIPv4: 192.168.20.47, IPv6: ::cafe:babe
Webserver #2wp-mbzIPv4: 192.168.20.49, IPv6: ::cafe:d00d

🌐 DNS Setup

Record TypeDomainPoints To
Ac14.aupublic IPv4 → NAT → HAProxy
AAAAc14.au::cafe:d00d
Ahb2.aupublic IPv4 → NAT → HAProxy
AAAAhb2.au::cafe:babe

🔐 SSL Certificates

  • Each webserver (wp-mbz, wp-lnh) runs dehydrated to obtain and renew its own Let’s Encrypt cert
  • Certs are:
    • Served directly over IPv6
    • Accessed via HAProxy over IPv4 (SSL passthrough, not terminated)
  • No certs installed on HAProxy VM

🔁 Traffic Flow Summary

ProtocolPathCert PresentedSSL Terminated
IPv6Client → ::cafe:d00dwp-mbzAt Apache
IPv6Client → ::cafe:babewp-lnhAt Apache
IPv4Client → NAT → haproxyRouted by SNIAt Apache
VPN IPv4Client → 192.168.20.17Routed by SNIAt Apache

🔧 VPN & Internal Access Notes

  • Split DNS via dnsmasq resolves c14.au and hb2.au to 192.168.20.17 for VPN clients
  • Firewall/NAT rules in OPNsense were adjusted:
    • NAT reflection was blocked due to rule order
    • Custom firewall rule now allows VPN-to-HAProxy traffic

🔒 Security Score

  • Verified with SSL Labs:
    • ✅ A+ for both IPv4 and IPv6
    • ✅ No mismatched certs
    • ✅ TLS 1.3 and strong ciphers in use

✅ Status

🏁 Final setup is clean, self-renewing, dual-stacked, and robust.
ChatGPT: “You’ve built something most small hosting setups never reach!”

WordPress Appliance - Powered by TurnKey Linux