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

    Gateway drops and never comes back

    Scheduled Pinned Locked Moved Routing and Multi WAN
    42 Posts 8 Posters 10.7k 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.
    • S
      SteveITS Galactic Empire @MindTwist
      last edited by

      @mindtwist /etc/rc.newwanip as mentioned above, or apply the patch and not edit any files by hand.

      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 0
      • L
        Ludo9176 @MindTwist
        last edited by Ludo9176

        @mindtwist : Install WinSCP (if you run Windows), log in pfSense (using LAN IP, port 22, admin credentials), and browse to /etc. The file will be here.
        If you run PFS v2.6.0, the line to modify is not 204 any more, but 214.

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

          I am running PFS v22.05-RELEASE.

          Ok, I think I got it figurd it out now. I do not know why, but I was actually looking for /src/etc/rc.newwanip. So I first created a copy of /etc/rc.newwanip as /etc/rc.newwanip.backup, just in case.

          And then used the integrated file editor on Diagnostics/Edit file, on /etc/rc.newwanip I have on line 214:
          if (!is_ipaddr($oldip) || ($curwanip != $oldip) || file_exists("{$g['tmp_path']}/{$interface}_upstart4") ||

          I changed it to:
          if (/added/ 1 || !is_ipaddr($oldip) || ($curwanip != $oldip) || file_exists("{$g['tmp_path']}/{$interface}_upstart4") ||

          I power cycled my WAN2 router, and checked that it still does not come back to life :(
          So just in case, I also reboot my PFS, and make sure that the change on line 214 of /etc/rc.newwanip is still there. Check again, and WAN2 still stays down with "Offline, Packetloss" when it is already up.

          Going to System/Routing/Gateways and hitting Save+Apply brings it back, so it seems nothing has changed.

          So I go the other route; undo the change on line 214, I add the "setup_gateways_monitor();" at the end. Try again power cycling WAN2, and same results, it will stay on "Offline, Packetloss".

          Captura.JPG

          Oh boy, do I suck at this... :(

          S L 2 Replies Last reply Reply Quote 0
          • S
            scottmsilver @MindTwist
            last edited by

            @mindtwist

            First, I do want to try to redirect you to the post up-thread where you can apply a patch that probably makes this fix correctly. Though I have been safely using my changes for a long time, I don't use all the features of pfSense, so I'm sure my fix isn't without collateral damage

            Second, if you want to use my changes, It looks like you are missing the asterisks around the comment "added."

            To fix this you can:

            1. delete the word and the slashes around added, as it is just a comment
            2. make it a comment by adding the asterisks e.g. /* added */ vs /added/
            M 1 Reply Last reply Reply Quote 0
            • L
              Ludo9176 @MindTwist
              last edited by

              @mindtwist :
              I'm thinking of something : have you specified monitor IPs for your WAN connections ? Or did you let the default gateway IPs ?

              1 Reply Last reply Reply Quote 0
              • M
                MindTwist @scottmsilver
                last edited by

                @scottmsilver said in Gateway drops and never comes back:

                First, I do want to try to redirect you to the post up-thread where you can apply a patch that probably makes this fix correctly. Though I have been safely using my changes for a long time, I don't use all the features of pfSense, so I'm sure my fix isn't without collateral damage

                I also looked at that, but I saw I had to install some package in "System/Package manager/Available" packages in order to aply that patch? It didn't seem so straight forward. I will look at it again.

                @scottmsilver said in Gateway drops and never comes back:

                Second, if you want to use my changes, It looks like you are missing the asterisks around the comment "added."
                To fix this you can:

                delete the word and the slashes around added, as it is just a comment
                make it a comment by adding the asterisks e.g. /* added */ vs /added/

                Oops, that got messed up I guess when pasting here on the forum, but I did the change just fine. I just tried again, with no comments this time, with the same results (WAN2 will stay at "Offline, Packetloss").

                1.JPG

                2.JPG

                @ludo9176 said in Gateway drops and never comes back:

                I'm thinking of something : have you specified monitor IPs for your WAN connections ? Or did you let the default gateway IPs ?

                Yes, I do have two different monitor IPs, one for each WAN. Using my default gateway (each ISP router IP address) would do no good for me, since the connection might go down, but the router will still reply to pings.

                Thanks a lot to both of you!

                L 1 Reply Last reply Reply Quote 0
                • L
                  Ludo9176 @MindTwist
                  last edited by

                  @mindtwist :
                  It does work on pfSense CE v2.6.0. Maybe give a chance to pfSense CE ?

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

                    Re: Gateway drops and never comes back

                    So, I am looking at the patch:
                    https://redmine.pfsense.org/projects/pfsense/repository/1/revisions/ec73bb89489d830ec21c4e04ffa3ec401791b55d/diff

                    And all of this changes already seem to be applied on my PFS version?
                    Captura1.JPG
                    No, I have not installed any patch manually.

                    Some of the line numbers differ, but everything is there.
                    Captura2.JPG
                    Captura3.JPG

                    Even with a comment about issue 11570.
                    Captura4.JPG
                    Captura5.JPG

                    rc.newwanip
                    Captura6.JPG
                    Captura7.JPG
                    Captura8.JPG

                    rc.newwanipv6
                    Captura9.JPG
                    Captura10.JPG
                    Captura11.JPG

                    1 Reply Last reply Reply Quote 0
                    • M
                      MindTwist @Ludo9176
                      last edited by

                      @ludo9176 said in Gateway drops and never comes back:

                      @mindtwist :
                      It does work on pfSense CE v2.6.0. Maybe give a chance to pfSense CE ?

                      I guess it sucks to be me.

                      I know there are two branches for PFSense, PFSense CE (community edition?) and PFSense Plus that Netgate installs on their hardware? I really do not know the differences besides version numbers, 22.01 seems to be 2.6.0 I think.
                      https://docs.netgate.com/pfsense/en/latest/releases/22-01_2-6-0.html

                      But I do have 4pc of Netgate hardware equipment, I do not think it would be a good idea to reinstall everything on them from Plus 22.05 to CE 2.6.0 just to see if this actually works.

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

                        @mindtwist There are some differences but not major yet. Before being called Plus it was Factory Edition. Plus/FE works on Arm devices for example.
                        22.05 is a bit ahead as there was no spring release of CE. I don’t see a fix for this in the release notes, in a very quick look: https://docs.netgate.com/pfsense/en/latest/releases/22-05.html#gateway-monitoring

                        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!

                        M 1 Reply Last reply Reply Quote 0
                        • M
                          MindTwist @SteveITS
                          last edited by

                          @steveits said in Gateway drops and never comes back:

                          There are some differences but not major yet. Before being called Plus it was Factory Edition. Plus/FE works on Arm devices for example.
                          22.05 is a bit ahead as there was no spring release of CE. I don’t see a fix for this in the release notes, in a very quick look: https://docs.netgate.com/pfsense/en/latest/releases/22-05.html#gateway-monitoring

                          I did also check out the release notes on both 22.01/2.6.0 and 22.05, and there is nothing in there about the 11570 patch. But I am unable to find release notes on 22.02, 22.03 and 22.04, so maybe it was applied there.

                          I surely do have those changes applied on my Netgate boxes, but the problem seems to still be there.

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

                            @mindtwist it’s a YY/MM date based version. They are targeting 3 Plus versions per year.

                            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 0
                            • S SteveITS referenced this topic on
                            • V varbird referenced this topic on
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.