How-to: Null Route IP in Linux


It does get quite annoying when you are trying to work(which most of the time, my work involves a lot of research online) and someone(Mr. X) in your network is hogging everything down by his movie downloads. Now, our network is secured by ClearOs, which in my opinion is a really good solution. But.. it does not work when Mr. X is using IDM via an SSH Tunnel, which is not really easy to detect.

So today, after the pain of waiting for 5minutes to wait for my OWN web site to load.. I decided to null route the SSH Tunnel’s IP to the gateway.

[root@clearos ~]# cat /etc/redhat-release
CentOS release 5.4 (Final)

ClearOS is running on CentOS 5.4 32-bit, which is great for the command below as root:

route add that_ip_that_i_hate gw 127.0.0.1 lo

use netstat -nr to verify

To delete the routing;

route delete that_ip_that_i_hate

VOILA! Mr.X is gone and my post is here!

Gulshan Yashveer Beejan

Gulshan holds a BSc(Hons) Computer Science with Distributed systems from the City University of London. He is currently working at DSOGroup(Mauritius) as a Linux Administrator on SaaS Solutions. More about Gulshan

Leave a Reply

Your email address will not be published. Required fields are marked *