Routing Specific URLS

  • 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 then route that via the VPN ?


  • 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 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.

  • 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

Log in to reply