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

    After restart of pfSense server, I have to add default route again.

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 2 Posters 972 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
      jd.schmidt
      last edited by

      So every time I restart my firewall server or after update etc, I have to run the following steps in order to get it back in working condition. Anybody know why this would be or what I am missing so this doesn't happen?

      ifconfig ibg0 xx.xx.xx.xx(my IP address) 255.255.255.248
      route add default xx.xx.xx.xx(my gateway)
      pfctl -d # disables packet filter
      pfctl -e # enables packet filter
      
      J 1 Reply Last reply Reply Quote 0
      • J
        jd.schmidt @jd.schmidt
        last edited by

        @jd-schmidt Here is the forum topic that pointed me to trying this in the first place:
        https://forum.netgate.com/topic/22082/newbie-enable-wan-using-shell/3

        1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          That should not be necessary. Both those things should be configured in the GUI and held in the config across a reboot.

          Are they not configured in the main config?

          What IP settings do you see on igb0 before you run that? What is the default route?

          Steve

          1 Reply Last reply Reply Quote 0
          • J
            jd.schmidt
            last edited by

            Hi @stephenw10 Sorry for the late response on this. I do still have this issue and maybe it's because I have the gateway's incorrect. The command I had to type to eventually get this to work with a little more detail from above is:

            ifconfig igb0 xx.xx.xx.90 255.255.255.248
            route add default xx.xx.xx.89
            pfctl -d
            # login to firewall
            pfctl -e
            

            Here are my gateways from the console.
            Screenshot from 2020-08-19 14-16-31.png
            It appears WANGW is the default IPv4 but WANGW1 is the one I should be using. Does that seem correct? Thanks for your help!

            1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              I can still think of no good reason to have to do that. To me that's a sign something in your config is broken.

              Are those three gateways in the same subnet on WAN?

              Which of them is actually defined on the WAN interface?

              What do you have set as the default IPv4 gateway in the GUI?

              You are setting the WAN IP address at boot every time. What IP does igb0 have if you do not run those commands?

              The only reason I can think of the interface would come up without an IP is if it conflicted with another interface somehow.

              Steve

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