How to remove Menu items manually?



  • I've recently upgraded to pfsense 2.2 from 2.1.4 and well everything works great except pfblocker since they released a separate version for 2.2. I removed pfblocker from my packages list and it left behind the pfblocker in the menu list, and was wondering what file i need to edit to fix this problem. Any assistance is appreciated!
    ![menu item.png](/public/imported_attachments/1/menu item.png)
    ![menu item.png_thumb](/public/imported_attachments/1/menu item.png_thumb)



  • Some cruft got left behind in the config. If you can reboot, download the config, edit out the offending xml and restore.


  • Banned

    Reinstall and uninstall pfBlocker.



  • the old pfblocker is not available as a package to download anymore for 2.2, any other ideas?



  • @dotdash:

    Some cruft got left behind in the config. If you can reboot, download the config, edit out the offending xml and restore.

    Which config file are you referring to?



  • @kintaroju:

    Which config file are you referring to?

    The downloaded config file from Backup/Restore.



  • @kintaroju:

    @dotdash:

    Some cruft got left behind in the config. If you can reboot, download the config, edit out the offending xml and restore.

    Which config file are you referring to?

    WARNING – make a config backup first unless you are supremely confident in your XML editing capabilities ....  ;)

    If you are familiar with reading an XML formatted file, then open this file in the editor (Diagnostics > Edit File) –

    /conf/config.xml

    Scroll down until you find the section tagged with <installedpackages>…</installedpackages> .  Find the XML tags enclosing pfBlocker elements and delete them.  Save the changes.  Be very careful not to mangle the XML syntax!  If you corrupt the contents of this file, you can kill the firewall.

    Bill


  • Moderator

    Some additional steps that I take when editing the XML config.xml by hand  ;D Learning the hard way when it crashes is no fun!!!

    I always SSH into the box as this gives you some flexibility to quickly restore a backup before getting locked out.

    Once in the SSH shell make a backup

    cp /conf/config.xml /conf/config.xml.bk
    

    Make your manual edits to config.xml and save. Then

    rm /tmp/config.cache
    

    Refresh the GUI and ensure it looks ok… If you get any errors, Revert back

    cp /conf/config.xml.bk /conf/config.xml
    
    rm /tmp/config.cache
    

    Refresh the GUI and your back to where you started.  :)



  • BBcan177 is offering valuable advice and tips.  My way is more "brute force" and risky, but I do this mostly only on virtual machines that I do lots of testing and development on.  So they can be restored by reverting to a snapshot.

    Bill



  • I found installing pfblockerNG, finding it broken, and telling it to reinstall it removed all previous entries and gave me a working version.
    Not sure if this will work in your instance. HTH



  • @Sn3ak:

    I found installing pfblockerNG, finding it broken, and telling it to reinstall it removed all previous entries and gave me a working version.
    Not sure if this will work in your instance. HTH

    Worked like a charm in 2.2.4