dnsmasq crashing when adblocking list is "large"

Discussion in 'Tomato Firmware' started by Bunsen, Dec 26, 2017.

  1. Bunsen

    Bunsen Connected Client Member

    Is anyone else experiencing dnsmasq crashing while using a "large" [about 1million unique entries] adblocking list?
    It it seems to run ok for about a day or two, but then dnsmasq starts a restart cycle loop.

    The syslog has entries stating that dnsmasq is out of memory, but the system itself says there is more than 50% RAM free so I assume it allocates memory when the process starts [just a guess]. Is there a way to reserve more for the dnsmasq process?

    My actual goal is to block youtube ads on my appleTV, but I haven't found a list that is updated often enough to keep up with them so I just keep adding lists.

    If anyone can help its greatly appreciated.
  2. Rangaistus

    Rangaistus Reformed Router Member

    1 million? wow. most likely unnecessary.
    are you using the list from pihole?
    i am merging the following lists and they add up to 37609 entries after removing duplicates, etc.
    in my experience blocking 100% ads on the youtube app was not possible with only dns blocking.

    you can view the DNS requests from the appleTV and create your own list --
    go to Advanced > DHCP/DNS and either enable Debug Mode, OR alternatively enter "log-queries" in the custom configuration section. to separate the dns log, enter "log-facility=/var/log/dnsmasq" in the custom config section. the server should restart after you Save. then go to CLI and do "tail -f /var/log/dnsmasq" or /var/log/messages if you didn't separate the dns log. if you have a lot of devices on your network, you can append "| grep -A1 'from A.B.C.D$'" to the end of the line, where A.B.C.D is the IP of your appleTV.

    now run the youtube app on your appleTV and watch videos. you can see the requests that appleTV sends when an ad is displayed. then you can create your own list based on that.

    i was getting some ads slip thru. the app was sending queries for x.youtube.com; no external servers. so my guess is that the youtube app uses some trickery. i stopped using the app. i use the youtube plugin thru kodi and that works well without ads.
  3. Bunsen

    Bunsen Connected Client Member

    Definitely overkill - but still not accomplishing my goal.
    Most of the entries come from hosts-file.net, not pihole.
    I'll play with the logging and see if i can find the ads sneaking thru - thanks for the direction on that.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice