OPNsense Forum

English Forums => Virtual private networks => Topic started by: hilfubsi on September 21, 2021, 02:03:42 pm

Title: How to route only specific networks/addresses over VPN?
Post by: hilfubsi on September 21, 2021, 02:03:42 pm
I was happily using a US based VPN to get around the geolock for pandora.com (I don't live in the US).

I think an update might have broken that setup, so I'm trying to re-create it.

I have the US VPN connected as a VPN client and showing as connected in the status page.

Then I go to interfaces, and create a USVPN interface using ovpnc1 as the interface. Once I do that, I can't setup that interface to be DHCP for IPv4 (I'm getting an error message: "Cannot assign an IP configuration type to a tunnel interface.")

If I create the interface anyway and leave it at None for IPv4 config, and then add a rule on my LAN network in the firewall to pass packets to pandora.com over the USVPN gateway, the packets are caught by the rule but go over the regular WAN gateway instead; and pandora.com sees my non-US IP.

How do I selectively route packets to pandora.com over the US VPN, and all the rest over the regular WAN interface?
Title: Re: How to route only specific networks/addresses over VPN?
Post by: lfirewall1243 on October 14, 2021, 10:47:03 am
Create an Alias with pandora.com .
Modify your existing Rule, change Destination from "ANY" to your created Alias.

What have you selected as "remote network" in your VPN config?



https://docs.opnsense.org/manual/how-tos/multiwan.html