Introduction
Exposing sensitive services (such as databases, SSH, or RDP) to the entire internet significantly increases the risk of unauthorized access and automated attacks. The most effective way to secure these services is by configuring a firewall to only allow traffic from trusted IP addresses.
Because every server environment is different, the method for restricting access depends on your operating system and whether you use a control panel.
Choose Your Environment to Continue:
1. Servers with a Control Panel
If you manage your websites through a dashboard, use these guides:
- cPanel/WHM: Configuring CSF (ConfigServer Security & Firewall)
- Plesk: How to use the Firewall Extension
2. Linux Servers (Command Line)
If you manage your server via SSH without a control panel:
- Ubuntu / Debian: Using UFW (Uncomplicated Firewall)
- CentOS / AlmaLinux / RHEL: Using Firewalld
3. Windows Servers
- Windows Firewall: Restricting IPs via GUI and PowerShell