How to whitelist a hostname in CSF firewall

Firewalls usually allow or block IP addresses. If you need to allow a hostname, you need to find the IP address and white list the IP address. If you use dynamic DNS services like noip, dyndns, the IP address of your hostname changes when your internet provider assigns you a new IP address.

ConfigServer Security and Firewall (CSF) has support for dynamic DNS. This feature can be used to whitelist normal hostname too.

To allow a hostname, login to your server using SSH.

Edit file

In this file, you can add your hostname to the whitelist.

In the CSF config file, you need to make the following changes.

Set value for DYNDNS

This will tell the CSF firewall to check for the IP address of whitelisted hostnames every 10 minutes. You can change this as needed.

By setting the value of DYNDNS_IGNORE to 1, the CSF firewall will never block these IP addresses even if there are failed login attempts or too many connections.

Back to CSF Firewall

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *