Architektūra
┌────────────┐ HTTPS ┌──────────────┐ CF Tunnel ┌──────────┐
│ Vartotojas │ ────────→ │ Cloudflare │ ─────────────→ │ nginx │
│ (browser) │ │ edge POP │ │ origin │
└────────────┘ └──────────────┘ └──────────┘
│
├── WAF + Bot Fight Mode
├── AI scrapers BLOCK
├── TLS 1.3, HTTP/3, HSTS 1y preload
└── CF Access (Zero Trust) on panel
DNS strategija
| Hostas | Mode | Paskirtis |
|---|---|---|
play.army | 🟠 Proxied (Tunnel) | Landing page, CF cache + WAF |
panel.play.army | 🟠 Proxied (Tunnel) | Pterodactyl UI, CF Access OTP gate |
node.play.army | 🟠 Proxied (Tunnel) | Wings WSS konsolė |
status.play.army | 🟠 CF Worker | Uptime monitor + status page |
brain.play.army | 🟠 CF Pages | Quartz žinių bazė |
sftp.play.army | ⚪ Grey | SFTP port 2022 — CF tik HTTP/S |
dayz.play.army | ⚪ Grey | DayZ UDP — CF tik HTTP/S |
CF Tunnel
Tunnel ID: 21359603-c2b1-4721-b3e7-a50047bb495e
Origin serveris neturi public 443 — visas web traffic eina per Cloudflare Tunnel. Tai reiškia:
- Negalima tiesiogiai pasiekti origin IP per HTTPS
- DDoS atakos prieš origin IP neefektyvios (443 uždarytas)
- Kiekvienas request autentifikuotas per tunnel credentials
Ingress taisyklės:
ingress:
- hostname: play.army
service: https://localhost:443
originRequest: { noTLSVerify: true }
- hostname: panel.play.army
service: https://localhost:443
originRequest: { noTLSVerify: true }
- hostname: node.play.army
service: https://localhost:443
originRequest: { noTLSVerify: true }
- service: http_status:404CF Access (Zero Trust)
Du subdomenai apsaugoti CF Access — visi lankytojai redirectinami į OTP login:
| App | Subdomenas | Session | Pastaba |
|---|---|---|---|
| Pterodactyl Panel | panel.play.army | 24h | Admin OTP |
| Quartz KB | brain.play.army | 720h (30d) | Personal wiki |
node.play.army neturi CF Access — Pterodactyl Panel atidaro WebSocket į Wings per šį subdomeną, ir CF Access reikalauja atskiro OTP cookie per subdomeną, kas sulaužo konsolės funkciją. Wings turi savo Bearer token autentifikaciją.
- Policy: Admin Only — email OTP
- Planas: Free (iki 50 vartotojų)
Security settings
| Setting | Vertė |
|---|---|
| SSL/TLS Mode | Full (strict) |
| Min TLS Version | 1.2 |
| TLS 1.3 / HTTP/3 | ON |
| HSTS | 1y, includeSubDomains, preload |
| Bot Fight Mode | ON |
| AI Bots Protection | BLOCK |
| Always Use HTTPS | ON |
| WebSockets | ON |
Origin hardening
Origin serveris neturi atvirų 80/443 portų UFW — visas HTTP/S traffic eina tik per CF Tunnel. Tai eliminuoja:
- Direct-to-origin atakas (net žinant IP)
- CF bypass per port scan
nginx konfigūruotas su set_real_ip_from Cloudflare IP rangams + real_ip_header CF-Connecting-IP, kad fail2ban ir logai matytų tikrą vartotojo IP.
Certbot naudoja DNS-01 challenge (CF API token) — nebereikia 80 porto.
CF IP rangai atnaujinami kasdien per cloudflare-ips-update.timer.