Issue : To block an IP for a particular domain


Fix: You can block an IP from accessing a particular domain by editing the .htaccess file of corresponding domain as follows
————-

<Limit GET>
order allow,deny
deny from IP

</Limit>

————-

Please replace “IP ” with the IP you need to block.

That’s all..!!!

Issue: can’t access to ConfigServer Security&Firewall (internal server error :500)


Fix:

You can resolve this  by updating csf with the following command

# csf -u

How to find whether an IP is blocked in server firewall or not?


1.csf -g IP

OR
2.grep -irl IP /etc/csf

OR

3.iptables -Ln | grep IP

We can unblock it using the following commands.

1. Remove and unblock an IP address in /etc/csf.deny
#csf -dr IP address

2. Remove an IP address from the temporary IP ban list
#csf -tr IP address

3.Remove the IP address from IP table block.

iptables -I INPUT -s IP -j ACCEPT

You can also check whether the IP is blocked in Cphulkd. For that You can use the following command.

#grep -irl IP /var/lib/mysql/cphulkd/

You can  remove the blocked IP in cphulkd using the following commands.

First you have to enter to mysql, For that just type mysql and press enter as root user

Then enter to cphulkd database using the command ” use cphulkd ”

Then do the following steps.

SELECT * FROM `brutes` WHERE IP = ‘machineIP’ ;

Example: SELECT * FROM `brutes` WHERE IP = ‘80.191.226.129’;

DELETE FROM `brutes` WHERE IP = ‘machineIP’ ;

Example: DELETE FROM `brutes` WHERE IP = ‘80.191.226.129’;

After that use the following command from your command line

echo “delete from brutes ; delete from logins;” | mysql cphulkd

Thats It……!!!!!!

Blog Stats

  • 37,402 hits