Thursday, October 15, 2009

IPTABLES

Replace IP-ADDRESS with actual IP address. For example if you wish to block ip address 65.55.44.100 for whatever reason then type command as follows:
# iptables -A INPUT -s 65.55.44.100 -j DROP ================================================ If you just want to block access to one port from an ip 65.55.44.100 to port 25 then type command:
# iptables -A INPUT -s 65.55.44.100 -p tcp --destination-port 25 -j DROP =================================================== TO REMOVE THE BLOCKED IP FROM FIREWALL

1) Login into the server via shell access.
2) Go to the path of APF firewall. It should be:
/etc/csf
3) Edit the file csf.deny.
vi csf.deny
4) Remove the IP address from the list and save the file to unblock the IP address.

Once the IP address removed one need to restart the Firewall…To Restart Firewall one need to execute below mentioned command:

csf -r
===============================================================================

# LFD----CSF
############
/var/log/lfd.log
/etc/init.d/csf restart
tail -f /usr/local/apache/logs/error_log
/etc/init.d/lfd restart
crontab -l
rm -fv /etc/csf/csf.error
iptables -L -n | grep 72.29.86.55
service chkservd restart > restart service after done any in csf
csf -v
csf -x > disable
csf -e >enable

No comments:

Post a Comment