Confronto rapido
| Caratteristica | Firewall | Server Proxy |
|---|---|---|
| Livello OSI | Livello 3-4 (Rete/Trasporto: IP, porte, protocolli). Next-gen: L7 (DPI, App-ID). | Livello 7 (Applicazione: HTTP, HTTPS, FTP, SMTP, DNS, ecc.) |
| Funzione primaria | Controllo accesso: allow/block basato su regole (IP, porta, stato connessione, utente, app, firma minaccia). | Mediazione/Controllo contenuto: intercetta, ispeziona, modifica, logga, cache, autentica traffico applicativo. |
| Visibilità payload | Limitata (header L3/L4). NGFW: DPI/SSL inspection per vedere L7. | Nativa: vede URL, header, body, cookie, parametri, metodi HTTP, certificati TLS. |
| Direzione traffico | Bidirezionale (ingresso/uscita) per policy simmetriche/asimmetriche. | Tipicamente forward (client→Internet) o reverse (Internet→server). |
| Azioni tipiche | Drop, reject, allow, log, rate-limit, quarantine, redirect. | Allow/block URL, strip header, inject header, rewrite URL, cache, compress, auth (NTLM/Kerberos/SAML/OIDC), DLP, antivirus scanning, SSL inspection. |
| Deployment | Perimetro (edge), interno (segmentazione), host (Windows Defender, iptables, nftables, pfSense). | Forward: client config (PAC/WPAD), transparent (WCCP/PBR). Reverse: davanti a server (DMZ). |
| Stato connessione | Stateful (traccia tuple 5-tuple: src/dst IP, src/dst port, proto). | Stateless per richiesta (HTTP), ma sessioni via cookie/auth. Può essere stateful per TCP (SOCKS). |
Firewall: tipi e ruoli
- Packet filter (stateless): regole su IP/porta. Veloce, cieco su contesto.
- Stateful inspection: traccia stato connessione (SYN, SYN-ACK, ACK, FIN). Standard moderno.
- Application-layer / NGFW (Palo Alto, FortiGate, Check Point, Cisco FTD, pfSense+Suricata, OPNsense): App-ID, User-ID, Content-ID (AV, IPS, URL filtering, SSL inspection, sandboxing, DNS security, IoT security).
- Host-based: Windows Defender Firewall, nftables/iptables (Linux), PF (BSD), Little Snitch (macOS). Protezione endpoint, regole per processo/utente.
Server Proxy: tipi e ruoli
- Forward Proxy (outbound): client → proxy → Internet. Usi: filtro URL (categorie, reputazione), autenticazione utenti, logging compliance, DLP (regex, fingerprinting dati sensibili), SSL inspection (terminazione TLS, ispezione, ri-cifratura), antivirus gateway, cache (banda, latenza), anonimato (mask IP). Es: Squid, Blue Coat / Symantec ProxySG, Zscaler, Forcepoint, Microsoft Entra ID Application Proxy.
- Reverse Proxy (inbound): Internet → proxy → server interni. Usi: load balancing (L4/L7), SSL offloading (terminazione TLS centrale), WAF (OWASP Top 10: SQLi, XSS, RCE, bot), caching statico, compressione, rate limiting, autenticazione/SSO (pre-auth), masking topologia backend, A/B testing, canary deploy. Es: nginx, HAProxy, Traefik, Envoy, Cloudflare, AWS ALB, Azure Front Door, F5 BIG-IP.
- Transparent Proxy: intercetta traffico senza config client (WCCP, PBR, TPROXY, eBPF). Uso: ISP, captive portal, forza SSL inspection.
- SOCKS Proxy (v4/v5): tunneling TCP/UDP generico. Uso: SSH tunnel (
ssh -D 1080), Tor, circumvenzione firewall, app non-HTTP.
Sinergia: architettura defense-in-depth
Internet │ [Edge Firewall / NGFW] ← L3/L4 + App-ID + IPS + SSL Inspect (opt) + GeoIP block + DoS protection │ [DMZ: Reverse Proxy / WAF] ← L7: load balance, SSL offload, WAF, cache, auth pre-check, rate limit │ [Internal Segmentation Firewall]← L3/L4 + Micro-segmentation (Zero Trust: identity-based, not IP-based) │ [Forward Proxy / SWG] ← L7: URL filter, DLP, AV, SSL Inspect, CASB, logging, auth (SAML/OIDC) │ [Endpoint: Host Firewall + EDR] ← Process-level, behavioral, memory protection, exploit mitigation
Quando usare cosa
- Bloccare paese/IP/porta: Firewall (veloce, stateless/stateful).
- Bloccare Facebook/YouTube/gambling: Forward Proxy / SWG (URL category, regex, reputazione).
- Ispezionare HTTPS per malware/DLP: Forward Proxy con SSL Inspection (cert CA aziendale su client) OPPURE NGFW con SSL Inspection.
- Proteggere server web pubblico: Reverse Proxy + WAF (non firewall solo).
- Autenticare utenti prima di farli uscire: Forward Proxy (NTLM/Kerberos/SAML/OIDC) + Firewall (User-ID mapping).
- Segmentare rete OT/IT/IoT: Internal Firewall (Zero Trust: identità dispositivo/utente, non VLAN statiche).
Conclusione: Firewall e proxy operano a livelli diversi e risolvono problemi diversi. La sicurezza moderna richiede entrambi, integrati (log correlati, policy unificate, identity-aware).
- Sony Vaio: come uscire dalla modalità ibernazione e risolvere problemi
- Come collegare altoparlanti a un crossover: passivo vs attivo, cablaggio e impostazioni
- --热点software