How to block IP

To find out whether any particular IP is blocked or not on the server =>
# route -n |grep <IP Address>  ::
for example: #route -n |grep
To unblock an IP =>
# route del <IP Address> reject
::for example: #route del reject
To block an IP =>
# route add <IP Address> reject
:: for example: #route add reject


How to check that ip is blocked or not:
#cat /etc/csf/csf.deny
check whether that the ip which you searching is present in the file and if you want that insert a ip in file to deny then after inserting a ip give the command:
#csf -r
Add ip in allow file by giving command
# cat /etc/csf/csf.allow                     // Then give  following  command
# csf -a ipadress

Related posts

Leave a Comment