Route all traffic from Whonix Gateway through another host on my LAN?


I’ve got both Whonix hosts set up on my host Windows workstation (would use a dedicated machine if I could afford it) and I’ve also got a secondary router on my LAN which has a “more anonymous” way to access the Internet, than my private ISP connection. I would like all traffic from Whonix Gateway to be routed through that router, rather than through my residential ISP connection.

This is how the relevant parts of my L3-topology looks today:

( Internet
( Residential gateway (NAT) ( - ( Windows workstation ( - ( Whonix Gateway ( - ( Whonix Workstation
— ( Secondary router with NAT inside on and NAT outside on a public IP ( - ( Internet[/pre]

I’ve got the secondary router able to route traffic to and from the Internet, back to my internal network. So if I ping a public address from my Windows workstation it will pass through my RGW to the internet and then back again. If I set its default gateway to, it will work just fine too, but the traffic will pass through my secondary router and never touch my RGW.

So I want the Whonix Gateway to use as its default gateway, instead of which the Windows workstation uses. Since the Windows workstation (which I host Whonix on) uses NAT to translate the Whonix traffic to the LAN, I can’t just change the default gateway on the Whonix gateway. I suppose I could use a VirtualBox bridge instead of a NAT interface, but what security implications would that have? Also, I could probably set up source routing on the Windows workstation, but I doubt that’s possible. How would you solve this? The best solution would be adding another box with two network interfaces which hosts Whonix gateway, with one interface in my LAN and its default gateway out its public facing interface, but that’s not possible until I can buy another box in the future.

Also, what would I have to do on the Whonix Gateway iptables to get this to work? I would be grateful for any help!

I ended up solving this by using a bridged interface on my Whonix Gateway VM instead of a NAT interface, and changing the default route of the Gateway to my secondary router. Except for isolating the gateway traffic behind my host (and making the gateway see my entire LAN) I don’t think it’s enough of a security risk this far. Really, it puts my VM in the same position as it would be if I were running the Gateway on its own physical host.