Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Adding ad blocking to nanobsd

    General pfSense Questions
    2
    2
    1.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • provelsP
      provels
      last edited by

      Hello there.  A friend pointed me to a site where ad blocking was enabled via cron script on DD-WRT loaded routers. (http://www.dd-wrt.com/wiki/index.php/Ad_blocking)  I copied the IP list from the url in the script (http://www.mvps.org/winhelp2002/hosts.txt) into my own workstation's hosts file and it seemed to work well.  No doubt it's unsupported, but is there a way to incorporate this list into the hosts file on nano?  The hosts file seems to be overwritten every time dnsmasq is restarted, so I found where it seems to be compiled on the fly in system.inc, but naturally that file is not editable b/c of the RO file system.  I tried to mount the FS as RW, but that did not go well, and resulted in a reimage.  As a longtime user of adzap, I'm quite spoiled and would love to get the same quality of experience for myself and family.  Any hints out there?  Heck, even a manual process would be better than nothing.  (Up to now, I have been using pfSense+Squid+Adzap on HD, but I had the flash and wanted to try something new.)

      (EDIT) Is an alias for the list the way to go (though I certainly can't add 16K+ entries manually)?

      PS - being a new user of nano here, are the packages that are listed in the configurator all nano-suitable packages?  Thanks for reading and appreciative of any replies.

      Peder

      Peder

      MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
      BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        You cannot use an alias for that since it is DNS/hostname based, and not IP-based.

        You might be able to install the cron package, and make a script that just grabs that list and adds it onto the end of /etc/hosts every few minutes, but even that may not work properly.

        A better way might be to add those entries as a blacklist for squid+squidGuard.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.