Install APF Firewall on a cPanel sever

To install APF firewall login to your server as root and follow this tutorial

Type

cd /usr/src
wget http://rfxnetworks.com/downloads/apf-current.tar.gz
tar -xvzf apf-current.tar.gz
rm -f apf-current.tar.gz
cd apf-*
./install.sh
cd /etc/apf
nano conf.apf

Configure the ports

# Common ingress (inbound) TCP ports
IG_TCP_CPORTS=”20,21,22,25,53,80,110,143,443,465,993,995,2082,2083,2086,2087,2095,
2096,3306,10000,35000_35999″

please note that ports 2082 to port 2095 is mostly used by cpanel, and port 19638 is only use in
ensim.

# Common ingress (inbound) UDP ports
IG_UDP_CPORTS=”20,21,53,1040″[/green[

Exit nano and save and then restart apf
(ctrl+x)
y
(enter)

service apf start

If APF is functioning properly and you are not locked out edit the conf.apf again

nano conf.apf
Set the DEVM parameter to 0
DEVM=”0″

Once done Exit and save the file.
CTRL-x, y to save enter to confirm
Restart APF
service apf restart

Facebook Comments

More Stuff

PHP 7 Is Here! One of our most requested features is for PHP 7 support.  We’ve heard you loud and clear, and over the last few weeks we’ve been working to bring PHP...
Top 3 benefits of company open source programs Many organizations, from Red Hat to internet-scale giants like Google and Facebook, have established open source programs (OSPO). The TODO Group, a ne...
Updated EasyApache 3 Deprecation Schedule EDIT: This post is also no longer accurate. EasyApache 3 support will end in December 2018, with nothing more than security updates effective immediat...
cPHulk makes brute force attacks melt like butter. >We've all been faced with the problem of weak passwords. As much as you inform users about password security, they want to use something they can eas...
Spread the love

Posted by News Monkey