I have one Virtual Machine (VirtualBox) with Bridged Network on my PC, Host OS: UbuntuHost, Guest OS: UbuntuGuest
On the guest OS I have VPN enabled, which routes all traffic through the gateway of the VPN. From there I can access ServerX.
Goal: access ServerX from the UbuntuHost
I need a way to access ServerX from UbuntuHost, so when I type ServerX:PORT on my UbuntuHost, this should be routed to the UbuntuGuest and the request should be made by UbuntuGuest (which uses the VPN-s gateway)
I'm doing that to keep the internet traffic split in two: - UbuntuGuest for VPN related stuff - UbuntuHost for everything else
I tried configuring routing tables, but the VPN client resets them on some time interval, read about and tried iptables also, but the ServerX doesn't return IP which I can use.
I read different questions similar to mine, didn't find solution for my case. I'm also not sure about what options I have for scenario like this.