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

    WAN only connects on unplug and plug back in

    Scheduled Pinned Locked Moved General pfSense Questions
    59 Posts 4 Posters 3.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.
    • GertjanG
      Gertjan @randombits
      last edited by

      @randombits

      The dhcp client does it's work, the connection is created, dpinger is lauched to 'check' it, but .... this might be a simple one : yiour 'isp.gateway.ip' (your redacted WAN IP right ?) does not answer to ICMP or ping.
      And then , yeah, this will fail right away.

      A solution is : pick another IP for dpinger to use :
      Instead of
      a88dae2d-c6e4-46b1-a529-c3174c1f2a03-image.png

      do this :

      7f9d3df7-7e52-4c82-ad53-17c7460f2684-image.png

      ( half the planet uses 8.8.8.8 as this seems to be the IP the most close to their pfSense ...... ๐Ÿค )

      or, why not, experiment with this :

      14284e85-fa6a-4fa5-8a31-ed2f11b2527b-image.png

      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

        @randombits said in WAN only connects on unplug and plug back in:

        Aug 23 14:50:40 php-cgi 465 rc.bootup: The command '/sbin/dhclient -c /var/etc/dhclient_wan.conf -p /var/run/dhclient.em0.pid em0 > /tmp/em0_output 2> /tmp/em0_error_output' returned exit code '1', the output was ''
        Aug 23 14:50:40 check_reload_status 445 Linkup starting vtnet0

        Are those error files still present? /tmp/em0_output and /tmp/em0_error_output

        It looks like it pulls a lease then dumps it during bootup. I think you said the IP and subnet were still present on the device before you bounce the link though? But the gateway was no longer in the ARP table?

        1 Reply Last reply Reply Quote 0
        • randombitsR
          randombits
          last edited by randombits

          @Gertjan I tried all those combinations and nothing worked - yes I deleted the gateway and my ip

          @stephenw10 none of the errors are in either of those locations.

          In the gui it says all's ok
          2024-08-23 17_07_25-pfSense.home.arpa - Status_ Dashboard.png

          But it's not until I bounce the interface.

          GertjanG stephenw10S 2 Replies Last reply Reply Quote 0
          • GertjanG
            Gertjan @randombits
            last edited by

            @randombits said in WAN only connects on unplug and plug back in:

            I tried all those combinations and nothing worked

            So, imho, it's not pfSense that takes your connection down. Whatever happens, its on the other side of the WAN cable.

            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 @randombits
              last edited by

              @randombits said in WAN only connects on unplug and plug back in:

              In the gui it says all's ok

              Is that before bouncing the NIC in Proxmox?

              randombitsR 1 Reply Last reply Reply Quote 0
              • randombitsR
                randombits @stephenw10
                last edited by

                @stephenw10 yes

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

                  Oh right we went through this already. Too many threads! ๐Ÿ™„

                  At that stage it can ping the gateway but has no default route.

                  When it starts throwing:

                  Aug 23 14:51:11	kernel		arpresolve: can't allocate llinfo for isp.gateway.ip on em0
                  Aug 23 14:51:11	kernel		arpresolve: can't allocate llinfo for isp.gateway.ip on em0
                  

                  I would expect that gateway to show as down in the dashboard?

                  When that happens the WAN must be losing it's lease because the firewall ends up without an IP in the gateway subnet.

                  This must be a timing issue. Though it shouldn't be possible.

                  You can almost certainly workaround this with a shellmd in the mean time.

                  When it's in the failed state try running these commands at the CLI:
                  /etc/rc.newroutedns
                  /etc/rc.newwanip

                  Check in between if either of those re-add the required default route. If so you can add them as a shellcmd so it runs at boot.

                  randombitsR 1 Reply Last reply Reply Quote 0
                  • randombitsR
                    randombits @stephenw10
                    last edited by

                    @stephenw10 Neither of those commands did anything, /etc/rc.newwanip did take a while though.

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

                      Hmm, try: /etc/rc.reload_interfaces wan

                      randombitsR 1 Reply Last reply Reply Quote 0
                      • randombitsR
                        randombits @stephenw10
                        last edited by

                        @stephenw10 YES!! That did it ! ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ˜€ Now after my over exuberance how do I add that into a reboots .... ?

                        (It was all a bit worry given that the phone here (FreePBX VM) goes over the internet and we do get power blips that can cause reboots and no phone. Mobiles are very poor in this area)

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

                          Add it as a shellmd. The easiest way to do that it to install the Shellcmd package then add the command like:

                          Screenshot from 2024-08-24 15-38-47.png

                          randombitsR 1 Reply Last reply Reply Quote 1
                          • randombitsR
                            randombits @stephenw10
                            last edited by randombits

                            SOLVED !

                            @stephenw10 Well that worked !.

                            Many thanks for bearing with me on this. The whole thing is weird as to why it started to happen. I can sleep better thinking everything will come back up after a power failure or backup.

                            The first I noticed it is when Proxmox does it's twice it's week back overnight and the internet would be down in the morning. I set pfSense to backup on early Fridays mornings and on Saturdays Docker would update containers - Watchtower. And then on early Sunday mornings Proxmox would do another back.

                            Thanks Stephen for all your help I appreciate it.

                            Dave.

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

                              Ah, cool! Shouldn't be required though, be good to find out what's actually causing that. Someday!

                              Anyway glad we were able to get a workaround in place. ๐Ÿ‘

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