Firewall & networking
Open ports, set up UFW and configure IPv4/IPv6.
schedule5 min reading timeupdateLast updated: 10/21/2026
UFW (Uncomplicated Firewall)
UFW is the recommended firewall for Ubuntu/Debian. It is inactive by default after installation.
bash
# Install & enable UFW apt install ufw ufw default deny incoming ufw default allow outgoing ufw allow ssh # Port 22 ufw allow 80/tcp # HTTP ufw allow 443/tcp # HTTPS ufw enable
Opening individual ports
bash
ufw allow 25565/tcp # Minecraft ufw allow 30120/tcp # FiveM ufw allow 8080/tcp # Custom port ufw status verbose # Show current rules
Using your IPv6 address
Every KVM server automatically receives an IPv6 address. To connect via IPv6:
bash
ssh root@[2a01:4f8:xxxx:xxxx::1]
lightbulb
UFW filters IPv4 and IPv6 alike (IPV6=yes in /etc/default/ufw is the default on Ubuntu). Only open the ports you really need. No server firewall protects against large DDoS attacks – that is the job of the data center's DDoS protection, which is included with every KVM server. Offering a service over IPv6 only adds no extra protection here.
Was this article helpful? Need clarification?
support_agentOpen ticket