Archive for May, 2012

Redirect traffic to a specific network

This is a little trick which can be useful in some very specific case.

For example, you could have a machine with two network cards. One of the network is behind a proxy and the other one is connected directly to the internet.
You might want to forward all the traffic for google.com to the network which doesn’t have a proxy.

To do this, I am using the command route:

route add <hostname> <target network>

For example:

route add google.com 192.168.101.1

Note that this command is available on both Linux and Mac.

, , , , ,

1 Comment