
Can’t Connect to Your Application? Check the Firewall.
AlmaLinux has become the go-to Enterprise Linux distribution for VPS hosting, replacing CentOS. It comes with a robust firewall management tool called firewalld enabled by default.
While this is great for security, it often causes confusion for new server owners. You might install a web server (Nginx/Apache) or a game server, only to find that you can’t connect. The reason? You need to explicitly allow traffic through specific ports.
Get an AlmaLinux VPS instantly deployed with full root access. Perfect for hosting apps and websites.
Deploy AlmaLinux VPS Now
Step 1: Check Firewall Status
Before making changes, verify that the firewall is running. Log in via SSH and run:
systemctl status firewalldIf it says active (running), you are ready to proceed.
Step 2: Allow a Specific Port (Temporary)
To open a port (for example, port 80 for HTTP traffic) immediately, use the firewall-cmd tool:
sudo firewall-cmd --zone=public --add-port=80/tcpNote: This change will be lost if you reboot the server. It is good for testing.
Step 3: Make the Rule Permanent
Once you confirmed that everything works, you must make the rule permanent so it survives server reboots. Add the --permanent flag:
sudo firewall-cmd --zone=public --permanent --add-port=80/tcpYou can also open a range of ports (useful for passive FTP or game servers):
sudo firewall-cmd --zone=public --permanent --add-port=3000-4000/tcpStep 4: Reload the Firewall (Crucial!)
For the permanent changes to take effect, you must reload the configuration:
sudo firewall-cmd --reloadStep 5: Verify Open Ports
To see a list of all currently open ports and services, run:
sudo firewall-cmd --list-allConclusion
Understanding firewalld is essential for any Linux administrator. It ensures your WPressly VPS remains secure while allowing necessary traffic for your applications.
Looking for reliable hosting options?
- High-Performance VPS (AlmaLinux, Ubuntu, Debian)
- Shared Web Hosting (CPanel/DirectAdmin included)