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

    WAN is 0.0.0.0 after power loss, have to "renew" to get IP

    Scheduled Pinned Locked Moved General pfSense Questions
    12 Posts 6 Posters 2.3k 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.
    • RyanMR
      RyanM
      last edited by

      I have noticed this a couple of times. I think it is happening when my pfSense is rebooted, but I noticed it the other day when the power went out at my house.

      After the power came back up, I had my local network, but did not appear to have internet access. So I pulled up pfSense WebGUI and noticed the WAN interface was "up" but didn't have an IP. When I opened the Status > Interfaces page, I noticed that the IP of WAN was 0.0.0.0. So I clicked the Release/Renew button and my public IP showed up and I could access the internet.

      How can I get pfSense to automatically fix this? I travel frequently and use services hosted at home (particularly Plex).

      I did see Auto DHCP Renew not working on WAN (How to fix it). Is that the appropriate fix?

      1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan
        last edited by

        @RyanM:

        ….
        I did see Auto DHCP Renew not working on WAN (How to fix it). Is that the appropriate fix?

        Be ware that you cited a fix for a pfSense version that is more then ancient.

        However, the issue "pfSense does not retrieve an IP WAN running DHCP client from modem device" is known. Typically, this can happen when both devices boot up at the same time and pfSense boots faster then the modem, it start to fire DHCP requests, but the modem can't reply yet. Restart the requests by hand or rebooting pfsense by hand will solve the issue (but impossible if your are away).

        You should mention your region and ISP, so other can share their experiences.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • ?
          Guest
          last edited by

          As Gertjan has said, this can happen when pfsense boots quicker than the modem.

          There is a pretty easy fix, you run a script that monitors the WAN connection by pinging an external address. If the ping fails to respond at all in given period then one of two things happens, firstly it will set the WAN port Down and then back UP again, this is often enough to re-trigger the DHCP process and everything will kick back into life. If that fails, the ping failure timeout will then trigger a reboot of pfSense.

          Here's the script. extract and copy it to usr/local/bin, make sure it's set to executable ( 755 )

          Now create a Cron event, install the Cron GUI if you wish to make it easy.

          Capture.JPG
          Capture.JPG_thumb
          ping_check.zip

          1 Reply Last reply Reply Quote 0
          • RyanMR
            RyanM
            last edited by

            I don't think this is an issue with the modem as it is on a battery backup UPS. I have fiber optic internet service from Montana Opticom.

            Also, I would need to test to confirm, but I am pretty sure I have seen this behavior after updating pfSense. I currently have 2.4.2 and 2.4.2_1 is available. I may try to update today and see if I can replicate.

            1 Reply Last reply Reply Quote 0
            • ?
              Guest
              last edited by

              It's not an issue with the modem, but I've seen the 0,0.0.0 issue before, taking the WAN interface down and back up again fixes it. The script I have posted not only helps that, but if pfSense for any reason has a problem then providing the it's not totally dead it will reboot pfsense, even when you are thousands of miles away, it happened to me once and the script saved a LOT of grief.

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

                Now create a Cron event, install the Cron GUI if you wish to make it easy.

                How often do you run it?  I currently have it set for 10 minutes (*/6).

                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
                • JKnottJ
                  JKnott
                  last edited by

                  In the line ping -o -s 0 -c 10 8.8.8.8, what does the -o do?  It's not listed in the man page.  Also, why -s 0?  That's setting the packet size to 0, which is smaller than the minimum allowed for a packet size.  When I run the script as is, it kills my system.

                  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
                  • RyanMR
                    RyanM
                    last edited by

                    Thanks marjohh, I will try this. Does this output to the logs somewhere? I would like to see that it is working…

                    @marjohh:

                    As Gertjan has said, this can happen when pfsense boots quicker than the modem.

                    There is a pretty easy fix, you run a script that monitors the WAN connection by pinging an external address. If the ping fails to respond at all in given period then one of two things happens, firstly it will set the WAN port Down and then back UP again, this is often enough to re-trigger the DHCP process and everything will kick back into life. If that fails, the ping failure timeout will then trigger a reboot of pfSense.

                    Here's the script. extract and copy it to usr/local/bin, make sure it's set to executable ( 755 )

                    Now create a Cron event, install the Cron GUI if you wish to make it easy.

                    1 Reply Last reply Reply Quote 0
                    • GertjanG
                      Gertjan
                      last edited by

                      @RyanM:

                      Does this output to the logs somewhere? I would like to see that it is working…

                      Noop.
                      But find, as an example, this part in the script :

                      # A message to the console (I like feedback)
                      echo "Testing Connection at" `date +%Y-%m-%d.%H:%M:%S` "uptime:" $uptime "seconds" >> file.txt
                      wall file.txt
                      rm file.txt
                      

                      and run this from the command line :

                      /usr/sbin/logger -ip notice "This line goes to the system log file"
                      
                      

                      and check your logs  ;)

                      Now you have all the ingredients ;)
                      Good luck !

                      No "help me" PM's please. Use the forum, the community will thank you.
                      Edit : and where are the logs ??

                      1 Reply Last reply Reply Quote 0
                      • M
                        maxtkirk
                        last edited by

                        @Guest said in WAN is 0.0.0.0 after power loss, have to "renew" to get IP:

                        ping_check.zip

                        Hello, anybody can public the attachments?

                        GertjanG 1 Reply Last reply Reply Quote 0
                        • GertjanG
                          Gertjan @maxtkirk
                          last edited by

                          @maxtkirk

                          From 2017 ?

                          No "help me" PM's please. Use the forum, the community will thank you.
                          Edit : and where are the logs ??

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

                            Yup, no way to recover those as far as I know. There are scripts named the same available via Google though.

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