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

    Force LAN Traffic Through OpenVPN Tunnel

    Scheduled Pinned Locked Moved Routing and Multi WAN
    2 Posts 2 Posters 1.3k 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.
    • J
      jlittle988
      last edited by

      The title gives the basics, but for more detail: I have a pfsense VM with two physical interfaces, one connected to my local network (and assigned an IP by my local DHCP server), and the other connected to a virtualbox host-only network, with a few other VMs on it. With default settings, the VMs can access the internet.

      However, I would like to force any and all traffic through an openvpn tunnel. I've tried several things, but the closest I've gotten is having it working for a moment, then suddenly the vpn gateway's dynamic ip in pfSense started getting consistently set to an address one below that of the vpn virtual IP. Does anyone know why that would be happening? If not, do you know of a better way of achieving this? Thanks!

      A 1 Reply Last reply Reply Quote 0
      • A
        acc4ever @jlittle988
        last edited by

        @jlittle988 Hi, I have done this configuration, following this tutorial..

        https://www.netgate.com/docs/pfsense/vpn/openvpn/routing-internet-traffic-through-a-site-to-site-openvpn-connection-in-pfsense-2-1.html

        what makes the magic is put this in Advanced Configuration -> Advanced -> redirect-gateway def1;

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