نویسنده : Arvan

How to Whitelist ArvanCloud IP addresses in CSF

linkedin

In the ArvanCloud CDN service, all visitors’ requests will be forwarded to the origin server through ArvanCloud’s edge servers. It is possible that your origin server detects ArvanCloud IP addresses as an attack and, as a result, blocks the traffic from them.

In this user guide from ArvanCloud, we will provide a solution to whitelist ArvanCloud IP addresses in CSF.

How to Install CSF

ConfigServer Security and Firewall, or as it is more commonly known as CSF, is an advanced firewall configuration script for most Linux distributions. You can have CSF Installed on your origin server using the following instructions:
Download the file using:

wget http://download.configserver.com/csf.tgz
Decompress the downloaded file using:
tar -xzf csf.tgz
Install the CSF using:
cd csf
sh install.sh

Please note that if you have been using UFW as the firewall on your origin server, you need to disable it before the installation of CSF. In order to this, use this command:

ufw disable

After the installation of CSF, you can ensure that iptables modules are accessible, using the following command:

perl/usr/local/csf/bin/csftest.pl

Whitelisting ArvanCloud IP addresses in CSF

To add ArvanCloud IP addresses to your CSF’s whitelist, use the following commands:

wget https://github.com/alisalehiman/Arvan-Whitelist/raw/master/firewall.sh
chmod u+x firewall.sh
‏./‏firewall.sh

Then restart and rerun CSF by:

csf –r

csf –s

Use the following command to ensure that the whitelisting is done correctly:

iptables-save

If the process is done correctly, all ArvanCloud IP addresses must be displayed as ALLOWIN.

مطالب مرتبط