As root from SSH term:
wget http://www.rfxnetworks.com/downloads/apf-current.tar.gz
tar -xvzf apf-current.tar.gz
cd apf-*/
./install.sh
Check for install errors
Installation Details:
- Install path: /etc/apf/
- Config path: /etc/apf/conf.apf
- Executable path: /usr/local/sbin/apf
- AntiDos install path: /etc/apf/ad/
- AntiDos config path: /etc/apf/ad/conf.antidos
- DShield Client Parser: /etc/apf/extras/dshield/
Edit the config file:
vi /etc/apf/conf.apf
Turn on DShield.org blocklist
USE_DS=”1″
Allow Plesk Ports (add or remove the ports relevant to your configuration here)
IG_TCP_CPORTS=”20,21,22,25,53,80,110,143,443,465,993,995,8443″
IG_UDP_CPORTS=”37,53,873″
EGF=”1″
EG_TCP_CPORTS=”20,21,22,25,53,37,43,80,113,443,465,873,5224″
EG_UDP_CPORTS=”53,873″
Run in debug mode first, and check to make sure everything is open/blocked appropriately, then turn debug mode off.