OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Virtual private networks »
  • How to route only specific networks/addresses over VPN?
« previous next »
  • Print
Pages: [1]

Author Topic: How to route only specific networks/addresses over VPN?  (Read 1123 times)

hilfubsi

  • Newbie
  • *
  • Posts: 43
  • Karma: 2
    • View Profile
How to route only specific networks/addresses over VPN?
« 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?
« Last Edit: September 21, 2021, 02:07:15 pm by hilfubsi »
Logged

lfirewall1243

  • Hero Member
  • *****
  • Posts: 1358
  • Karma: 45
    • View Profile
Re: How to route only specific networks/addresses over VPN?
« Reply #1 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
« Last Edit: October 14, 2021, 10:50:05 am by lfirewall1243 »
Logged
OPNsense Telegram Group: https://t.me/joinchat/0o9JuLUXRFpiNmJk

PM for paid support

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Virtual private networks »
  • How to route only specific networks/addresses over VPN?
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2