Redirect Vbox NAT to non default interface
Posted: 29. Sep 2020, 17:48
The default interface that all traffic passes through on my linux box is: eno1 with an ip of 192.168.1.201. I also have a wireless interface at wlx9cefd5fd0db7 with ip 192.168.2.75.
In NAT configuration all the traffic from my VM passes through the Vbox NAT engine and gets pushed to the default interface eno1. I'm looking for a way to pass a specific VM's traffic to the wireless interface mentioned above instead of the default. The documentation leads me to believe this is possible using but I can't get it to work. Is there something I'm missing or something I still need to configure?
I know that one way I could solve this would be to run in Bridged mode and just assign the wireless interface as the network adapter but I don't want to do that. My use case looks like this:
On my home network, all traffic on the 192.168.1.xxx subnet gets pushed through a vpn on the router (protectli box running pFsense) and all traffic on the 192.168.2.xxx subnet does not get pushed through the vpn. I'm running Whonix (routes all traffic through TOR) in Virtual Box and want to avoid the subnet using the vpn (192.168.1.xxx). The default configuration for Whonix gateway is NAT and I don't want to mess with any of the default settings the devs put in there.
How can I tell Vbox to send that VM's traffic to non-default interface while still being in NAT mode?
In NAT configuration all the traffic from my VM passes through the Vbox NAT engine and gets pushed to the default interface eno1. I'm looking for a way to pass a specific VM's traffic to the wireless interface mentioned above instead of the default. The documentation leads me to believe this is possible using
Code: Select all
vboxmanage modifyvm "vm-name" natbindip1 <ip of interface>I know that one way I could solve this would be to run in Bridged mode and just assign the wireless interface as the network adapter but I don't want to do that. My use case looks like this:
On my home network, all traffic on the 192.168.1.xxx subnet gets pushed through a vpn on the router (protectli box running pFsense) and all traffic on the 192.168.2.xxx subnet does not get pushed through the vpn. I'm running Whonix (routes all traffic through TOR) in Virtual Box and want to avoid the subnet using the vpn (192.168.1.xxx). The default configuration for Whonix gateway is NAT and I don't want to mess with any of the default settings the devs put in there.
How can I tell Vbox to send that VM's traffic to non-default interface while still being in NAT mode?