Gateway drops and never comes back
-
@ludo9176 said in Gateway drops and never comes back:
@mindtwist : I confirm this change is permanent (I tested it, it survives a reboot), until an OS upgrade of course.
If you really don't feel comfortable, you may backup the original file, and work on a copy, so that you can restore it in case something goes wrong (WinSCP is perfect for this). But adding a single line is not a big deal, it's easy to revert. ;-)I am not even sure what is the file I have to modify, or what change to apply.
I think I need to make the change scottmsilver posted on 16/Dic/21 on line 204 of rc.newwanip, but I am unable to find that rc.newwanip file.
-
@mindtwist : I hadn't read @scottmsilver message, didn't go backwards enough in the thread... this is almost the same solution indeed, at least same cause identified.
-
@mindtwist /etc/rc.newwanip as mentioned above, or apply the patch and not edit any files by hand.
-
@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. -
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".
Oh boy, do I suck at this... :(
-
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:
- 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/
-
@mindtwist :
I'm thinking of something : have you specified monitor IPs for your WAN connections ? Or did you let the default gateway IPs ? -
@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").
@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!
-
@mindtwist :
It does work on pfSense CE v2.6.0. Maybe give a chance to pfSense CE ? -
Re: Gateway drops and never comes back
So, I am looking at the patch:
https://redmine.pfsense.org/projects/pfsense/repository/1/revisions/ec73bb89489d830ec21c4e04ffa3ec401791b55d/diffAnd all of this changes already seem to be applied on my PFS version?
No, I have not installed any patch manually.Some of the line numbers differ, but everything is there.
Even with a comment about issue 11570.
rc.newwanip
rc.newwanipv6
-
@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.htmlBut 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.
-
@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 -
@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-monitoringI 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.
-
@mindtwist it’s a YY/MM date based version. They are targeting 3 Plus versions per year.
-
-