Something Different In Linux

Home » How to » How to block IP

How to block IP

Posted by Rishikesh Vispute Categories: How to

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

Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...