Single Host / Alias through VPN
-
I have done some googling and searching. Found some guides that I cannot make work. I think what I am looking to do is this I have the PIA VPN up and running, it connects. If I follow PIA's directions I can get ALL traffic over the VPN. However I would like just specific hosts to go over. When I follow the previous guide, or others I either do not get internet at all, or the specified hosts just go through normal WAN.
-
@germz1986
The VPN server pushes the default route to you, hence all upstream traffic goes to it.
To avoid this check "Don't pull routes" in the client settings.Add all the IP you want to direct out to the VPN server to an alias. Then use it as source in a Policy Routing rule.
Ensure to put this rule to the top of the interface rule set.Consider that with this rule there is no internal access allowed from the concerned IPs. Assuming that this is desired, create a second alias and add all RFC 1918 networks to it. Use this alias in the above rule as destination together with "invert." checked.
So this rule is applied to any other destinations, but private networks.