Skip to content

Firewall (UFW)

Status

UFW is active with the following default policies:

DirectionPolicy
IncomingDeny
OutgoingAllow
RoutedDeny

Allowed Incoming Ports

PortProtocolPurpose
22/tcpSSHSecure shell (protected by Fail2Ban)
80/tcpHTTPCaddy HTTP redirect
443/tcpHTTPSCaddy HTTPS

nftables Integration

UFW manages nftables rules. The active rule set includes:

  • Loopback traffic permitted
  • Established/related connections permitted
  • ICMP types: destination-unreachable, time-exceeded, parameter-problem, echo-request permitted
  • DHCP (67→68) permitted
  • mDNS (5353) and SSDP (1900) permitted
  • Docker integration via DOCKER-USER chain in FORWARD

iptables Policies

ChainPolicy
INPUTDROP (managed by UFW)
FORWARDDROP (with Docker exceptions)
OUTPUTACCEPT

Implementation Notes

  • Only ports 22, 80, and 443 are exposed to the public internet
  • All application services (Nextcloud, n8n, Radicale, Portainer, code-server) listen on 127.0.0.1 only
  • Caddy handles TLS termination and reverse proxies to local services
  • Docker bypasses UFW for published ports via the FORWARD chain — currently all application ports are bound to 127.0.0.1 only, so this is not a concern

Northeast Systems · Aux Server · Infra Server