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

    Single Host / Alias through VPN

    OpenVPN
    2
    2
    417
    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.
    • G
      germz1986
      last edited by

      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.

      V 1 Reply Last reply Reply Quote 0
      • V
        viragomann @germz1986
        last edited by

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

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