> ## Content Index
> Fetch the complete content index at: https://kudithipudi.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# HOW TO : Route traffic to loopback interface in Linux
- URL: https://kudithipudi.org/how-to-route-traffic-to-loopback-interface-in-linux/
- Published: 2012-03-27T04:02:12.000Z
- Updated: 2012-03-27T04:02:12.000Z
- Description: Back in 2009 (last decade!! 🙂 ), I wrote a blog post on how you can trick windows to route traffic destined to a particular IP...
- Author: admin
- Tags: HOWTO, Linux, Networking, Uncategorized, #wp, #wp-post, #Import 2026-08-23 02:32

Back in 2009 (last decade!! 🙂 ), I wrote a [blog post](https://kudithipudi.org/microsoft-windows-routing-to-devnull/) on how you can trick windows to route traffic destined to a particular IP address to a black-hole. In it, I mentioned the command to route traffic to /dev/null in Linux was

```
<code>route ADD IP_ADDRESS_OF_MAIL_SERVER MASK 255.255.255.255 127.0.0.1</code>
```

I ran into a need to try it today and looks like the trick doesn’t work :). So here is the right command if you want to route traffic to the loopback (or blackhole) destined to a particular IP address

```
sudo route add -host IP_ADDRESS_OF_HOST/NETWORK_MASK lo
```

For example if I want to black-hole traffic destined to 74.205.216.2, I would do the following

```
sudo route add -host 74.205.216.2/32 lo
```