Top Domain?

@ Master

I was looking at your screenshot with all the requests to wpad.fritz.box.

I'm using pfsense as a router/firewall, and it's mandatory to define a domain (the default is localdomain, but you obviously used fritz.box). On my older router, a domain wasn't mandatory, so I never had these queries.

As soon as windows machines (and possibly others) receive a domain setting via DHCP, this behavior starts. You can find your domain setting, using ipconfig /all and look at the setting Connection-specific DNS Suffix
It would supprise me if yours wasn't reporting fritz.box

I have been looking for a solution for this, found it, here it is:

  • First thing to do is to ensure wpad & wpad.fritz.box resolves to your raspberry pi. There are different methods to achieve this, I looked at this topic to implement a solution.
    Basically it comes down to creating a line that says:
192.168.x.xx    raspberrypi.fritz.box	   wpad.fritz.box	   raspberrypi   wpad

Replace the IP address with your pihole IP address and raspberrypi with your hostname.
Ensure both wpad and wpad.fritz.box can be solved on your pi, using dig.

Now create a file in /var/www/html called wpad.dat, containing the following:

function FindProxyForURL(url, host)
{
return "DIRECT";
}

This tells the browser (who is responsible for the dns query) that it should never use a proxy server (always DIRECT), so don't do this if you are using a proxy server (like squid)

This will NOT eliminate the entries in your log (or web interface), but it will ensure a valid answer is provided to the browser, thus eliminating timeouts.

You can monitor the succesfull retrieval of the file in /var/log/lighttpd/access.log, you will find something like this:

1492334155|wpad.fritz.box|GET /wpad.dat HTTP/1.1|200|56