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

    WAN loss = package restart

    General pfSense Questions
    3
    10
    911
    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.
    • T
      TSE 0
      last edited by

      Hi folks,

      This evening my ISP ran some maintenance that briefly took out my internet connection. As it came back to life, the pfsense box reinitialised the interface, taking down and restarting all my installed packages…

      I can see why package restart makes sense, but it seems quite a blunt tool to blindly force all packages down… (what actually bothered me was bringing telegraf down lost a couple of hours worth of buffered metrics; my influxdb service was down at the time).

      So - q - is there any way to avoid the need to bring down all the packages as the interface comes back up after a connection loss (perhaps choosing which I do not want impacted)?

      Cheers for any pointers.

      1 Reply Last reply Reply Quote 0
      • F
        FSC830
        last edited by

        Have had several WAN outages here, including a construction team which cuts my line by accident.
        Never seen such a behavior at my pfSense. 😐

        Regards

        1 Reply Last reply Reply Quote 0
        • S
          SteveITS Galactic Empire
          last edited by

          IIRC when the WAN link goes down (as opposed to stays up but packet loss) then rc.newwanip triggers, in case there's a new IP.

          Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
          When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
          Upvote 👍 helpful posts!

          T 1 Reply Last reply Reply Quote 1
          • T
            TSE 0 @SteveITS
            last edited by

            @steveits yep, that’s what the logs indicate… dynamic IP is unfortunately something I have to deal with (or pay more for static).

            So…. There’s no way around a complete reinitialisation, short of (maybe) ensuring I have a static IP on the WAN side?

            S 1 Reply Last reply Reply Quote 0
            • S
              SteveITS Galactic Empire @TSE 0
              last edited by

              @tse-0 I haven't paid terribly much attention. You might look for past threads about it. Maybe putting a switch between pfSense and the ISP might help keep the link "up"?

              Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
              When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
              Upvote 👍 helpful posts!

              1 Reply Last reply Reply Quote 1
              • F
                FSC830
                last edited by

                Is that related to connection type?
                I get my WAN IP from provider by DHCP and never had this issue.
                Connection is a PPPoE type.

                Regards

                S T 2 Replies Last reply Reply Quote 0
                • S
                  SteveITS Galactic Empire @FSC830
                  last edited by

                  @fsc830 Don't really know, honestly. Here's a thread talking about it, but the context in it was someone had a laptop plugged into an interface port and triggering the restarts.

                  https://forum.netgate.com/topic/174723/hotplug-event-causes-rc-start_packages-restarting-starting-all-packages

                  Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                  When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                  Upvote 👍 helpful posts!

                  T 1 Reply Last reply Reply Quote 1
                  • T
                    TSE 0 @FSC830
                    last edited by TSE 0

                    @fsc830 Mine is also DHCP...

                    The message in the logs reads:

                    /rc.newwanip: Netgate pfSense Plus package system has detected an IP change or dynamic WAN reconnection - xxx.xxx.xxx.119 -> xxx.xxx.xxx.119 - Restarting packages

                    I'm wondering - why does pfsense need to trigger this package restart script if the WAN IP has not changed?

                    1 Reply Last reply Reply Quote 0
                    • T
                      TSE 0 @SteveITS
                      last edited by

                      @steveits thx for the link... I think the key is in this comment (with which I agree):

                      Most installs don't see an interface go up/down except in a significant network event and it's safer for those to restart packages than to leave then potentially running with the wrong IP

                      However, it seems pfsense knows the pre-event IP address, and should be able to compare it to the (potentially new) post-event IP ... and not do a package restart if they match... however, I'm no expert ... there may be other reasons for this behaviour with which I am not aware...

                      It'd be nice to be able to configure which packages were subject to restart ... I think I'll follow the code a ways to see if I can work out how that might be achieved ...

                      Cheers!

                      T 1 Reply Last reply Reply Quote 0
                      • T
                        TSE 0 @TSE 0
                        last edited by TSE 0

                        @tse-0 hmm.. no time right now to examine further but the code does seem to validate old IP vs new:

                        if (!is_ipaddr($oldip) || ($curwanip != $oldip) || file_exists("{$g['tmp_path']}/{$interface}_upstart4") ||
                        (!is_ipaddrv4($config['interfaces'][$interface]['ipaddr']) && ($config['interfaces'][$interface]['ipaddr'] != 'dhcp'))) {
                        ....
                        <package restart here>
                        ...

                        Could be one of the other conditions here I guess... Might hack in some debug code for the log so I can see what's going on ...

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