Tuesday, July 10, 2018

Need help routing some traffic outside the VPN

Hello all.

First time posting in this sub, hopefully i'm respecting the rules.

So, i need some help to have a VM send most of its traffic through the VPN and a very specific traffic should not go through the VPN.

The issue:

I have a VM inside my NAS, that has a webservice. This service is accessible via lan on 192.168.2.90:6789 or via the internet on myddnsdomain.com:6789 (Properly port forwarded by the router).

I now need that this VM is connected to a VPN. Once I connect it to the VPN (using openvpn client), i can still access it on 192.168.2.90:6789 but not over myddnsdomain.com:6789.

So, I would need all the traffic to be routed over the VPN, except for the traffic that is requested from port 6789

The setup:

Router: 192.168.2.1

NAS: 192.168.2.216 (I think it's irrelevant, but just in case)

VM Inside NAS: 192.168.2.90 using enp0s3

VPN using tun0 172.21.91.169

Can anyone assist me with this?

Thank you in advance,

Edit: VM is running Ubuntu 18.04.



No comments:

Post a Comment