A firewall controls incoming and outgoing network traffic. This article covers basic firewall configuration using UFW on Ubuntu/Debian and firewalld on CentOS/RHEL.
Using UFW (Ubuntu/Debian)
Enable UFW:
sudo ufw enable
Allow SSH:
sudo ufw allow 22/tcp
Allow HTTP and HTTPS:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
Check status:
sudo ufw status
Using firewalld (CentOS/RHEL)
Enable firewalld:
sudo systemctl enable firewalld
sudo systemctl start firewalld
Allow SSH:
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload
Need Help?
If you accidentally lock yourself out, contact us through the Circle City Servers Support Portal.