[Solved] Ad-Blocking broken after VM Host reboot



  • Being that I run pfSense in Hyper-V and am subject to required host reboots after various Windows Updates, it seems that ad blocking does not function right after the host and pf are back online. Are the host files waiting to be copied to RAM or waiting for a scheduled update to take effect? It does seem to clear up later but even closing the browser and clearing the DNS cache on a client or the host does not seem to have any effect. Not complaining, only curious. It's a very remarkable package.


  • Moderator

    @provels said in Ad-Blocking after VM Host reboot:

    Being that I run pfSense in Hyper-V and am subject to required host reboots after various Windows Updates, it seems that ad blocking does not function right after the host and pf are back online. Are the host files waiting to be copied to RAM or waiting for a scheduled update to take effect? It does seem to clear up later but even closing the browser and clearing the DNS cache on a client or the host does not seem to have any effect. Not complaining, only curious. It's a very remarkable package.

    Are you using RAMdisks for this VM? If so, then the /var/ folder is wiped on reboots and will require a "Force Reload" to get it all back.
    If not using Ramdisks, what errors do you get? system.log, resolver.log and pfblockerng.log?



  • @BBcan177 Yes, that must be it. Using RAM for /var and /tmp.
    Thanks for a great package!


  • Moderator

    @provels said in Ad-Blocking after VM Host reboot:

    @BBcan177 Yes, that must be it. Using RAM for /var and /tmp.
    Thanks for a great package!

    Thanks for the feedback!
    Disabling Ramdisks will solve that issue. Or just run a "Force Reload - All" after each reboot to get it all back.



  • @BBcan177 Fixed by checkbox, thanks. You have made the package so much more friendly by including default lists. And whitelisting the right ones... I used to use a Windows app called Hostsman which worked fine for the most part but broke many sites, too. And had to be maintained on each machine.
    There are very few times I need to whitelist sites myself with NG. Seeing ads these days makes me want to throw a hammer through my screen! Thanks again for your help.



  • @BBcan177 said in [Solved] Ad-Blocking broken after VM Host reboot:

    @provels said in Ad-Blocking after VM Host reboot:

    @BBcan177 Yes, that must be it. Using RAM for /var and /tmp.
    Thanks for a great package!

    Thanks for the feedback!
    Disabling Ramdisks will solve that issue. Or just run a "Force Reload - All" after each reboot to get it all back.

    Would there be a way to add a script to automate "reload all" post-reboot when using RAM disks? I also use XigmasNAS (was NAS4Free) and they have a GUI option for that (adding pre- and postinit scripts), but I would have no idea how to add that to pfSense. I'm pretty BSDumb. Maybe add

    /usr/local/bin/php /usr/local/www/pfblockerng/pfblockerng.php cron >> /var/log/pfblockerng/pfblockerng.log
    

    somewhere?
    EDIT - Found this. I'll try. https://docs.netgate.com/pfsense/en/latest/development/executing-commands-at-boot-time.html


Log in to reply