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

    Stop all traffic going over OpenVPN when 'default' gateway is selected

    Scheduled Pinned Locked Moved OpenVPN
    2 Posts 1 Posters 683 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.
    • M
      mrkman
      last edited by

      Hello,

      I have googled for this and all I can find is the inverse. If there is an existing thread that mentions my exact problem exactly, please link to it and accept my apologies.

      Despite having my internet connection nominated as the default gateway, when the OpenVPN connection is established and I have a LAN subnet using 'default', the traffic goes over the OpenVPN link. Why is it behaving like this? If I want a host or a LAN subnet to go over the OpenVPN link for internet access, I will just nominate it by overriding the gateway option.

      I know I can just manually select gateway A as a work around, but if I say perform a traceroute from the pfSense shell itself, the traffic will go via the OpenVPN.

      Long and short, when using the OpenVPN client, how do I get the default gateway that I have nominated under 'Routing' to do exactly what it's supposed to; act as the default gateway rather than have pfSense 'decide' to route all 'default' traffic via the OpenVPN?

      Thanks in advance,

      MrKMan

      1 Reply Last reply Reply Quote 0
      • M
        mrkman
        last edited by

        To answer my own question, it was pulling routes from OpenVPN. I checked the "Don't pull routes: Bars the server from adding routes to the client's routing table" box and everything is working as desired!

        Routing before:

        Internet:
        Destination        Gateway            Flags      Netif Expire
        0.0.0.0/1          10.69.0.5          UGS      ovpnc1
        default            InternetIPGoesHere      UGS        em0

        Routing after:

        Internet:
        Destination        Gateway            Flags      Netif Expire
        default            InternetIPGoesHere      UGS        em0

        Special thanks to FPSRogerRamjet for the help!

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