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

    Remove Default Route?

    Scheduled Pinned Locked Moved Firewalling
    4 Posts 4 Posters 2.9k 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.
    • D
      dturbo
      last edited by

      Hi Folks,

      Hope you are all well. I am new to pfsense, and I am just now setting up a firewall / router to replace my basic linux router. This is an intermediate router / firewall, just to give me more granular control as I do not have access to the ISP router.

      One thing I have in place currently, which I really like, is that I don't have a default route on my linux router. I have explicit routes for the networks which I need to route between, but then with no default route, this means that any direct attempts to connect out to any other destination, will fail by definition. There is no route in the networks upstream in any case, which would allow such general traffic to progress, however this approach just gives me one more, 'blunt hammer' piece of protection.

      From setting up pfsense, my LAN gateway is also defined as 'default gateway'. I still have my specific routes defined, but this means that at least the routing side would attempt to forward other traffic (such as a trojan attempting to 'get out' directly). I realise that I can just build appropriate rules to only allow specific traffic out, on the firewalling side, but I just wondered - is there any way on the routing side in pfsense, to achieve what I currently have?  ie use all defined routes, but have no default route?

      Many thanks for your time.

      1 Reply Last reply Reply Quote 0
      • JKnottJ
        JKnott
        last edited by

        On System / Routing / Gateways it appears you can delete a gateway.  Try that.

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

        1 Reply Last reply Reply Quote 0
        • D
          dexener
          last edited by

          @JKnott:

          On System / Routing / Gateways it appears you can delete a gateway.  Try that.

          It is not possible to delete Gateways. Just another silly bug… :o

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

            The firewall should always have a default route out or things like the update check, packages, etc, will fail. DNS Resolution will also fail unless you make sure it can only talk to DNS servers you have a route to.

            That said, you can delete gateways so long as they are static. If you have a dynamic interface such as DHCP or PPPoE, those will always have the gateways given to them by the upstream service and those cannot be removed or deactivated. To remove a static gateway, you will also need to remove it from the interface first if it's there. So for example, go to Interfaces > WAN, set the gateway to none, save, apply, then go to System > Routing and remove it.

            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
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.