cannot load /etc/bogonsv6: Invalid argument
-
My pfSense was unable to connect any of the LAN networks to the internet. The system was displaying this in the notifications every 15 minutes:
There were error(s) loading the rules: /tmp/rules.debug:23: cannot load "/etc/bogonsv6": Invalid argument - The line in question reads [23]: table <bogonsv6> persist file "/etc/bogonsv6"
No results found on google for this error. Luckily I had a CARP failover set up, so I didn't experience any down time. In the command prompt, I executed:
tail /etc/bogonsv6
The file ended with a "28" on the last line, which didn't seem to be the proper syntax, so I deleted the file:
rm /etc/bogonsv6
After rebooting, my LAN networks are able to connect to the internet again. Weird. Seems like there should be some code added to throw out improperly formatted lines or something. I tried to go to Diagnostics->Tables and reload the table, but there were no tables to select in that interface, until after I deleted the table and rebooted. Things seem normal now, but were quite messed up before.
Thought I would post this to help others, thanks,
Nathan -
Hmm, so the actual file appeared to be corrupt?
Was that in 2.7?
Steve
-
@stephenw10 yes 2.7
-
Hmm, not seen that before. Open a bug if you see it again: https://redmine.pfsense.org/
-
I had the same issue just now. It appeared after a reboot of the firewall:
There were error(s) loading the rules: /tmp/rules.debug:18: cannot load "/etc/bogons": Invalid argument - The line in question reads [18]: table <bogons> persist file "/etc/bogons" @ 2023-10-08 13:09:06 There were error(s) loading the rules: /tmp/rules.debug:18: cannot load "/etc/bogons": Invalid argument - The line in question reads [18]: table <bogons> persist file "/etc/bogons" @ 2023-10-08 13:09:27
I have checked the /etc/bogons file using a text editor, but it was not readable apparently. I dont know why this happened. I have deleted /etc/bogons and /etc/bogonsv6 and this solved the issue for me.
-
Usually it's because the file was not present when it initially tried to load the file at boot. After it populates the ruleset loads as expected.
-
@Caveat This was the magic bullet to finally be able to get nginx reverse proxy manager to actually redirect to nextcloud when accessing by domain instead of just showing up at the pfsense login by default. Don't know why it stopped working but this definitely solved it.
-
You had to remove the bogons fles?
It probably wasn't loading the new ruleset if that's what you saw.