Iptables provide filtering, NAT and other packet mangling.
Viewing current configuration
iptables -L
Output will be like
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Storing iptables rules in a file
nano -w... [ Continue reading... ]
All you need is to run following commands
service iptables stop
chkconfig apf off
/bin/rm -rfv /etc/apf
/bin/rm -fv /etc/cron.daily/fw
/bin/rm -fv /etc/init.d/apf
iptables -L -n
[ Continue reading... ]
If you are getting error on apf
unable to load iptables module (ip_tables), aborting
It means, your kernel is compiled with iptables statically instead of as a module, and you will need to change this in the /etc/apf/conf.apf
MONOKERN="0" Set it to "1"
So open /etc/apf/conf.apf file and modify it restart the apf service and you wont see that... [ Continue reading... ]
firewall is always very important for the security of your system, specially if you are running a web server running very popular websites then firewall is the life of your server.
Previously I explained how to install CSF firewall, and here is the tutorial for APF which is another great firewall available.
cd /usr/local/src/
wget http://www.rfxnetworks.com/downloads/apf-current.tar.gz
tar -zxvf apf-current.tar.gz; cd apf-*
sh... [ Continue reading... ]
Previously I explained the list of ports to configure in firewall if you are running direct admin in your web servers.
Ports to configure in firewall for Directadmin
Here is the list of ports which are required to configure if you are running plesk control panel.
#20 ftp-data
#21 ftp
#22 ssh
#25 smtp
#53 dns (TCP and UDP)
#80 http
#106 poppassd (for localhost only)
#110 pop3
#113 auth
#143 imap
#443 https
#465 smtps
#990... [ Continue reading... ]
There was a time when I was about to select a firewall for a server which had DirectAdmin installed and I choosed CSF. CSF is one of the best firewall available for hosting servers.
Installation of CSF in directAdmin is really easy, just download csf.
Extract it
and Install it
Just a 3 step installation.
Login to server via ssh,
Download csf using wget
Run ./install.directadmin.sh
and it will automatically install and will... [ Continue reading... ]
[root@mailserver csf]# service csf status
Status of csf:Can't locate LWP/UserAgent.pm in @INC (@INC contains: /usr/local/cpanel /etc/csf /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at... [ Continue reading... ]
Last day one of our server had an attack, attack was not so big but still server was unresponsive because of this. After some research I found that this is because of iptables which are being load while handling so much traffic. Then I found a good article on the same issue which you can read by clicking below linking here. [ Continue reading... ]
Shore line firewall known as "Shorewall", it is a very high level firewall and very easy to install and ocnfigure
How to install :-
sudo apt-get install shorewall
configuring shorewall startup service :-
nano /etc/default/shorewall
#Now simply change the line below from 0 to 1
startup = 0
to
startup = 1
#save, and exit.
Shorewall configuration files are stored in two separate places
/etc/shorewall stores all the program... [ Continue reading... ]