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



  • 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



  • 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!


Log in to reply