URL Table Formatting?
-
Hey everyone.
I'm currently generating a text file (via php script) with a list of IPs that pfSense will read using Firewall : Aliases -> URL Table. I know that pfSense can access it, but I end up getting the following error:
There were error(s) loading the rules: no IP address found for grep:
/tmp/rules.debug:84: file "/var/db/aliastables/test.txt" contains bad data
pfctl: Syntax error in config file: pf rules not loaded The line in question reads [
/tmp/rules.debug]:The php script is pretty basic (doing fwrites to a file), but I am wondering if my format is wrong?
The file reads like:
192.168.1.100
172.17.1.100
198.18.0.100/29Line by line and I also trimmed out any whitespace Is this format ok? I've also tried this without the IP block, but I get the same error.
Any help would be greatly appreciated. I'm not sure where to go from here. :(
Thanks.
-T -
Hello again,
Just wanted to update this as I'm still looking for a solution. It would seem that the formatting that I created was correct as the rc.update_urltables script it uses to feed the IPs into the pftctl table works fine. I can see all my IP addresses in the table. But the error emails still persists. I receive these errors at least every hour. I think it has to do with the script after the fact that processes the IPs and places the firewall rules.
Would anyone know which script performs that? Maybe I can look at that file and see why its giving that grep error.
Thanks.
-T -
The format is right, it's just one IP per line, or a CIDR masked net per line, it should skip whitespace and commented lines.
If you cat /var/db/aliastables/test.txt it should show only the IP/CIDR lines