After pfblockerNG config:There were error(s) loading the rules: /tmp/rules.debug



  • I'm getting an error trying to load firewall rules after mucking around with the new pfblockerNG. Line 34 -which is the end of this block is the apparent error:

    
    # User Aliases
    table <pfb_asia_v4>persist file "/var/db/aliastables/pfB_Asia_v4.txt"
    pfB_Asia_v4 = "<pfb_asia_v4>"
    table <pfb_asia_v6>persist file "/var/db/aliastables/pfB_Asia_v6.txt"
    pfB_Asia_v6 = "<pfb_asia_v6>"
    table <pfb_top_v4>persist file "/var/db/aliastables/pfB_Top_v4.txt"
    pfB_Top_v4 = "<pfb_top_v4>"
    table <pfb_top_v6>persist file "/var/db/aliastables/pfB_Top_v6.txt"
    pfB_Top_v6 = "<pfb_top_v6>"
     = "{  }"</pfb_top_v6></pfb_top_v6></pfb_top_v4></pfb_top_v4></pfb_asia_v6></pfb_asia_v6></pfb_asia_v4></pfb_asia_v4> 
    

    The error message reads:
    [There were error(s) loading the rules: /tmp/rules.debug:34: syntax error - The line in question reads[34]: = {}]

    The things I did was install the new pfblockerNG package, notice the old pfblocker memu item was still there so I followed this guide:
    https://forum.pfsense.org/index.php?topic=88443.0

    Then I tried to configure the new pfblockerNG which apparently errors.

    Any ideas?



  • Getting rid of the old pfblocker rules got rid of the line 34 issue now a similar error happens at line 26:

    User Aliases

    = "{  }"

    I'm guessing there is a firewall alias that is missing - deleting line 26 entirely does not fix as the error comes back once you reload the firewall rules.



  • FYI - After talking with BBcan177, who wrote the php script for removing pfblocker he found an extra alias in config.xml. Removing this tag and deleting /tmp/config.cache fixed the problem :)

    So if anyone else runs in to this , after backing up the config, they might want to and try this:

    
    So to fix it, I suggest the following (USE AT YOUR OWN RISK!! :) )
    
    Are you comfortable using the Shell and a text editor like VI or nano or ee ? or edit the file from the
    pfSense Diagnostics: Edit File GUI
    
    1) First Backup the pfSense configuration from Diagnostics: Backup/Restore
    
    2) goto the Shell and edit the file /conf/config.xml
    
    3) Find the <aliases>XML tag
    
    4) Delete the line <alias>5) Save the file
    
    6) Delete the config cache file with this command:  rm /tmp/config.cache
    
    7) Load the pfSense Dashboard to get the Updated config file settings.
    
    The error should be gone....
    
    The config should look like the following when you remove that one line:
    
      <aliases></aliases> 
    	 <proxyarp></proxyarp></alias></aliases>