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

    Set one IP to use OpenVPN gateway

    Scheduled Pinned Locked Moved OpenVPN
    2 Posts 2 Posters 849 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.
    • Y
      Ynothna
      last edited by

      Hey,

      I've been using Pfsense for a few years and am fairly familiar with it, but I don't do anything super advanced with it so I'm a little lost. Today I connected an OpenVPN client and after a bit of troubleshooting I have that working. It's getting an IP address, etc, it all seems good. Where I'm struggling now is setting one of my Ubuntu 12.04 headless servers to only use that gateway for it's outgoing internet access.

      Is there a way I can configure it to route all outgoing traffic from that IP address through the VPN? I also have a little bit of incoming traffic that needs to run over the normal network but otherwise everything else is internal.

      Thanks!

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

        Interfaces > (assign), assign the VPN and then enable it with an IP type of "none", then go back and edit/save the VPN to make sure it's started back up OK.

        After that you should see a gateway for the VPN in System > Routing, and you can use that gateway in firewall rules to make traffic exit that path.

        Depending on the other side you might also need to setup manual outbound NAT rules to do NAT as the traffic leaves the VPN

        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.