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

    Traffic not flowing through openvpn connection

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 2 Posters 631 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.
    • N Offline
      nvdstruis
      last edited by

      Hi,

      I want to be able to remotely connect to my openvpn server and have the traffic forwarded to the internet. I.e. when I want to do internet banking in some untrusted vacation location, I connect to my openvpn server running on my pfsense router.

      I went through these steps:

      • I used the wizard to create the openvpn server. pfSense tells my its status is running and I can detect the port as open with an nmap scan from the outside.

      • I exported the client installer from within pfSense(in "Client Export" tab)

      • I ran the exported file from the previous step in a local windows VM

      • I successfully created a connection from the VM to the openvpn server on the external ip address, no issues here.

      The problem is, that the vpn connection in the VM shows up "alongside" the usual lan connection and all browser traffic is sent through the lan connection instead of through the vpn connection.
      What am I doing wrong?
      Thx

      1 Reply Last reply Reply Quote 0
      • N Offline
        nvdstruis
        last edited by

        I added the custom option "redirect-gateway def1;" to OpenVPN -> Client Export Utility -> Additional configuration options(see screenshot)
        Now it seems to be working just fine. Need more testing though.

        redirect-gateway.png
        redirect-gateway.png_thumb

        1 Reply Last reply Reply Quote 0
        • M Offline
          marvosa
          last edited by

          nvdstruis, the "redirect-gateway def1" directive is the equivalent of the following option in the GUI:

          You will find it in your OpenVPN config under the Tunnel Settings section.

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