Hello everyone.
I have the following task. I want a remote user who connects to the VPN have access to the local hosts, but use their own gateway. Is it possible to give the remote user a static route so he connects to the host on a local domain using their own gateway?
I should also point out that VPN and local server are on different subnets. I.E.:
Server: 172.17.0.0/24
VPN: 172.17.100.0/24
You cannot push a static route to the client, it has to be configured at their end.
On Windows using the inbuilt VPN client you unselect the ‘Use default gateway on remote network’ option to enable split tunneling, and if ‘Disable class based route addition’ is also unselected a /8, /16 or /24 route is automatically added if the VPN address is 10.x.x.x, 172.16.x.x - 172.31.x.x, or 192.168.x.x respectively.
This may be sufficient in your case as a route for 172.30.x.x would be added via the VPN, otherwise use the PowerShell Add-VpnConnectionRoute to add permanent static routes which become acive when the VPN connection is established.