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

    Configure specific IPs to go through VPN

    OpenVPN
    3
    5
    1.5k
    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.
    • D
      derekdw
      last edited by

      I currently have pfsense routing all of my traffic through an openvpn with strongvpn.

      I would like to have only certain devices on my network route through the vpn, while the rest goes out normal.

      My clients are all Static ip

      Here is the tutorial i originally used:
      http://swimminginthought.com/update-strongvpn-pfsense-working-file-config/

      any help?

      1 Reply Last reply Reply Quote 0
      • A
        Assassin
        last edited by

        As you may have the OpenVPN as an own gateway, just create some firewall rules on top of the LAN Section or whereever the specific clients connect from and build rules for those certain hosts with the advanced gateway OpenVPN.

        1 Reply Last reply Reply Quote 0
        • D
          derekdw
          last edited by

          ok i must be doing something wrong

          i did that, and everything still seems to be going out the vpn connection (checked via going to www.whatismyip.com)

          I first added it (the 192.168.2.99 rule) to just the LAN config… didnt work... added it to the LAN and WAN config, still didnt work... so i added it to all, and nope everything still goes out the vpn

          any ideas? here are SS of my rules.... I have two clients right now, 192.168.2.99 and 192.168.2.98.... both with the following config are going out the VPN

          1 Reply Last reply Reply Quote 0
          • D
            derekdw
            last edited by

            nevermind

            I am an idiot…. i failed to set the gateway for everyone else not .99

            everything works now... hopefully this post might help others.

            1 Reply Last reply Reply Quote 0
            • K
              kantlivelong
              last edited by

              I am trying to do the same as you and it works as expected if the VPN is up.. However if the VPN is down or you disable the service it seems to route through the default gateway regardless of rules. Do you see this as well?

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