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

    Redirect all traffic from one IP through OpenVPN site to site connection

    Scheduled Pinned Locked Moved Routing and Multi WAN
    3 Posts 3 Posters 2.0k 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.
    • G
      Gerald Vegas
      last edited by

      Hoping someone can point me in the right direction….

      I have managed to create an OpenVPN tunnel between two sites on two PFSence boxes. (one in Uk and one in germany).

      What I would now like to do is route all traffic from an IP address on the German network through the UK internet connection.  I am assuming this will be some form of route??

      Any help would be really appreciated.

      1 Reply Last reply Reply Quote 0
      • N
        Nachtfalke
        last edited by

        I am no expert with that configuration but it could work if you assign your OpenVPN as an interface. This interface can then be used as a "gateway" on your LAN firewall rules for the particular client you want to rout all traffic through OpenVPN. If I am not completely wrong then the interface mode of OpenVPN should be "none" and not DHCP, static or something else.

        I am not sure if this is the correct way.

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          Once you assign the VPN interface – Interfaces  > (assign), add the interface, then enable it with an IP type of 'none' and restart that VPN instance -- you'll get a gateway entry automatically. Once you have the gateway entry, you can craft a firewall rule to catch the traffic from the IP you want and force it to use that VPN gateway.

          You will have to make sure that NAT will apply to that traffic, either locally as it leaves the VPN interface, or remotely at the other side of the VPN, or it won't make it out to the Internet.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

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