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

    Prefer one route over another?

    Scheduled Pinned Locked Moved Routing and Multi WAN
    3 Posts 2 Posters 1.2k 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.
    • ? This user is from outside of this forum
      Guest
      last edited by

      I have 2 gateways on a pfsense box, one WAN link and one OpenVPN client link. The WAN gateway is set as the default gateway,and I want most of the traffic to go through this gateway, with only a few machines going over the OpenVPN link. The problem is the OpenVPN client is pulling 0.0.0.0/1 and 128.0.0.0/1 routes from the other side, which is more specific than the default route. As a result, all traffic is going over the OpenVPN link. I tried setting the gateways manully in the firewall rules, but the problem is I have multiple LAN subnets, and if I specify the gateway manually, those LAN subnets can no longer reach each other. I even tried setting up static routes for the WAN gateway, but pfsense seems to prefers the Openvpn client route over static routes.

      How can I configure pfsense so that traffic will go out the WAN gateway by default, and still be able to communicate with the other LAN subnets? Thank-you.

      –-------------------------------------------
      Current version: 2.1-BETA1
       NanoBSD Size : 4g
            Built On: Mon Feb 11 09:41:16 EST 2013

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

        1. Use "route-nopull" in the client config so it doesn't redirect all traffic there.
        2. Make rules on your LAN to pass from local to local subnets with no gateway set.
        3. Use gateways on rules to direct the rest of the traffic however you like.

        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
        • ? This user is from outside of this forum
          Guest
          last edited by

          That worked, thank-you so much.

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