Install Firewall on CentOs

Status
Not open for further replies.

Albert.Nawaro

Active Member
88
2012
4
0
The very first first step on securing a server is installing a firewall (atleast IP tables based) to close all unused or unwanted ports. Once the firewall is installed it is often considered 50% of work done. You can install CSF firewall or APF firewall. Often BFD (brute force detection) utilities comes with firewall.

We will install CSF (Config security firewall) as it is easy to install with plenty of features and easily integrated to CPanel (if you are running)

PHP Code:
PHP:
wget http://www.configserver.com/free/csf.tgz 
tar zxf csf.tar.gz 
sh /csf/install.sh


Follow the installer and once installed, you can start the firewall.
PHP Code:
PHP:
csf -s 
// start the firewall 
csf -r 
// restart the firewall 
csf -f 
// flush the rules or stop the firewall.
 
6 comments
Please make sure that you have made the following changes after the csf installation
vi /etc/csf/csf.conf
TESTING=1 >> TESTING=0
Otherwise the changes you have made on csf configuration will not save.
 
If you wish i could do this for you for a few bucks, hope this is a dedi though and not vps if its a vps csf requires special settings/strings
 
im using dedi...and follow the official instructions, but can't access my website :D
now im uninstall this firewall.
 
Status
Not open for further replies.
Back
Top