How to route traffic via another machine before the default gateway

Posted by Rich on Super User See other posts from Super User or by Rich
Published on 2012-09-01T09:21:03Z Indexed on 2012/09/01 9:40 UTC
Read the original article Hit count: 156

Filed under:
|
|
|

At the moment I have a router on 192.168.0.1, a Linux box on 192.168.0.2 and desktop clients from 192.168.0.3.

Everything works with 192.168.0.1 as the default gateway.

I'd like to send the traffic from the desktop clients via the Linux box before it goes out through the router so I can sniff the traffic (some of these are wireless connections).

Can I set the default gateway to 192.168.0.2 on the desktop clients and then perhaps add some iptables rules to forward this traffic through 192.168.0.1?

Quite happy to change the client desktops to another subnet if that makes it easier. Thanks in advance.

© Super User or respective owner

Related posts about linux

Related posts about networking