Neckrez

UFW firewall rules generator

Choose what your server should accept and get the ufw commands in a safe order: SSH is allowed first and the firewall is enabled last, so your session survives.

Why the order matters

ufw enable starts filtering at once. If SSH is not allowed before that moment, your session freezes and you are locked out. The generator always adds the SSH rule first and enables the firewall last.

Limit or allow

ufw and Docker

Docker writes its own iptables rules, so a port published with -p 8080:8080 is reachable even when ufw denies it. Publish it as 127.0.0.1:8080:8080 and put nginx or Caddy in front.

More tools