Reject routes

From Fratm.com

Jump to: navigation, search

Rejecting a route, or null routing is a quick and easy way to stop a DOS or prevent someone from accessing your server. Now I should warn you, this is not a great solution, but it works. There are better ways of doing this with firewall rules.

Rejected route or null route

/sbin/route add -host IPADDRESS reject

or 

/sbin/route add -host 192.168.1.5 reject

The above example will reject packets from one IP address (In this case 192.168.1.5).

There are better ways to do this, but this is the quick and dirty way, and works well when you need to stop someone from accessing your server right away.


I read this may be a better way to drop packets, I still like the route way, but I may try this out too.

iptables -A INPUT -s $ATTACKER_IP -j DROP

(replace $ATTACKER_IP with the IP of the host you want to block.)

Fratm 08:47, 27 April 2007 (PDT)

Personal tools