ntadmin / DGND3700v2

Custom firmware for the Netgear DGND3700v2
12 stars 4 forks source link

Get ad-blocking working #7

Closed ntadmin closed 8 years ago

ntadmin commented 8 years ago

Currently, a list of sites to be blocked is downloaded from yoyo, processed and placed in /var/tmp/host.adblock; dnsmasq is configured to read it. However, it doesn't seem to be blocking those domains, as pings to them return valid IPs. ORder of preference for solution:

  1. Return an IP address that, when a request goes to, returns a very light "ad blocked" html file
  2. Return an IP address that, when sent a request, fails quickly.
  3. Return an IP address that simply isn't there (ie fails slowly)

Once working, we need a control from the web page to turn it on and off. (Not for NEWTB2 though)

ntadmin commented 8 years ago

Error in command line options found, now testing

ntadmin commented 8 years ago

However, although dnsmasq is reading the list, it doesn't seem to be using that; or else dnsmasq isn't actually providing the DNS?

ntadmin commented 8 years ago

Changed the hosts file entries to 0.0.0.1 (as 0.0.0.0 seems to be some kind of loopback code) but it still seems to go and get the real address.

ntadmin commented 8 years ago

OK, fake IPs should either be officially listed as never used; OR it should point to the router and the web server on the DGND3700v2 should realise that it is a blocked ad and respond with a simple "add blocked" piece of html.Trying second tack at present.

ntadmin commented 8 years ago

mini_httpd seems to be controlled rather deeply by the system, so reconfiguring it in some different way is a bit complex ... going back to using an 'known never used' IP (192.51.100.1)

ntadmin commented 8 years ago

Setting ad servers to a fake, known unused, IP address is now working. (preference 3). This is sufficient for Beta 2, so closing this issue and opening new ones.