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

    Default gateway not set correctly

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 3 Posters 2.5k 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.
    • J
      jeffsmith82
      last edited by

      I'm trying to remotely setup a pfsense box through an Idrac and need to get the WAN working so I can use the GUI.

      The issue i'm having is that the default gateway appears to be getting set incorrectly.

      I configured the ipv4 address 66.X.X.227 /28 with the default gateway as 66.X.X.225 using the "Set interface(s) IP address"

      but it appears using netstat -rn to be using 66.X.X.224 as the default gateway.

      I have tried "route add default 66.X.X.225" but this returns the error

      "route: writing to routing socket: File exists
      add net default: gateway 66.X.X.225 fib 0: route already in table"

      Any suggestions as to why this might be happens and how to fix it, using 2.3.2-RELEASE ?

      1 Reply Last reply Reply Quote 0
      • J
        jeffsmith82
        last edited by

        Any recommendations on what to do here, maybe manually configure the IP address and routes?

        1 Reply Last reply Reply Quote 0
        • H
          heper
          last edited by

          please post your routing table & gateway config

          1 Reply Last reply Reply Quote 0
          • J
            jeffsmith82
            last edited by

            netstat -rn looks like this (sorry cant copy and paste it through the Idrac Console

            Internet:
            Destination          Gateway                Flags                NetIf    Expire
            default                66.X.X.224            UGS                  bge0
            66.X.X.224/28      link#1                    U                      bge0
            66.X.X.227          link#1                    UHS                  lo0
            127.0.0.1            link#6                    UH                    lo0

            This I think shows the default gateway as 66.X.X.224 though I am definitely setting it as 66.X.X.225

            If I manually add this with

            ifconfig bge0 inet 66.X.X.227 netmask 255.255.255.240
            route add default 66.X.X.225

            It then shows the correct default gateway when doing netstat -rn though i still can't route any traffic out t the internet but i suspect that's an issue at the data center.

            1 Reply Last reply Reply Quote 0
            • K
              kpa
              last edited by

              Can you post the interface configuration (screenshot preferable) for WAN and the gateways screen at System->Routing->Gateways.

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