Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Routing Specific URLS

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 3 Posters 575 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      zMaliz
      last edited by

      Hi

      In pfSense i have an openVPN connection to PrivateInternetAccess.

      This is configured as the default gateway for all traffic.
      On my LAN Interface I have a rule that routes traffic from one IP to WAN_PPPOE, so all of it's traffic bypasses the VPN.

      I'd like to add another rule that routes some traffic for this IP Address via the VPN.
      Is that possible ? ie: if the user goes to www.google.com then route that via the VPN ?

      Thanks

      1 Reply Last reply Reply Quote 0
      • M
        marvosa
        last edited by marvosa

        Understand that you can't technically route by a URL, but I understand what you want to do. The FQDN of the domain/subdomain will first need to be resolved to an IP and then policy routed to the VPN gateway.

        In other words:

        1. Create an IP alias, enter www.google.com as the FQDN

        2. Create a LAN rule above your LANnet/any rule with your Google alias as the destination, then switch the gateway line to your PIA gateway.

        Of course, this all assumes your clients are using PFsense for DNS. If not, there's a chance the queries won't match, which would lead to the traffic being routed through the default gateway instead of the VPN.

        1 Reply Last reply Reply Quote 0
        • M
          Markdarkus
          last edited by

          Hello! I had the same issue with my router and as it was said virtual interfaces solved the issue. VPN software was shown to be the most effective one. Though there's always a catch because some of them provide dynamic IP as well. Nord-VPN works for me but you might want to check reviews and compare different providers here's the source

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.