Hi! I had the same need and what I did was to install dnsmasq via command line. Do you have any experience with it? I can give you some hints and depending of what you get of it I get more into details:
- Disable bind via web interface
- Check if there’s any service listening at the dns port:
sudo ss -tlnp | grep 53
(read last column right, the p for process). If nothing appears, the port is available for us. You may need to check/etc/resolv.conf
(uses no port) and/etc/resolvconf.conf
(systemd service config file that listens at localhost:53) - Install dnsmasq
sudo apt install dnsmasq
and enable its servicesudo systemctl enable dnsmasq
so that it starts automatically after any reboot - Now, by default, anything you write in
/etc/hosts
, is read by dnsmasq and already acts as a dns query forwarder. So you can tryecho 'doubleclick.com 0.0.0.0' | sudo tee -a /etc/hosts
and then try to resolve this domain from the freedombox withhost doubleclick.com
. If some not zero IP appears, bad. However, host reads too /etc/hosts. Know, to test dnsmasq (you need to reload/restart it for every update on /etc/hosts) you can dodig doubleclick.com @localhost
). The best test though, is from your laptop. Same dig command. - If you were trying the bind way, you may already have done this, but it’s essential. Go to your router admin page, and wherever it lets you (if even) to edit the DNS server pair the DHCP server tells its clients to set, there, input your FB private ip address. The second one can be the privacy firendly dns provider (like njal.la 's) or that other external one you are using now.) 's) or that other external one you are using now. Apply/save.
- from your laptop, check the dns servers you are using. In most linuxes I’ve used, it’s either
cat /etc/resolv.conf
or it it says localhost, thencat /etc/resolvconf.conf
. In windows, it’s under wifi connection properties or something like that. Probablyipconfig
at the cmd works too. - disconnect and reconnect to the wifi from your laptop. Thus we force a dhcp request and a dns server list update. Ensure that the first nameserver configured is your FB’s local IP address.
- From your laptop, go to
https://doubleclick.com
. What do you see?
I know it’s a long list and my midnight english is not great. I hope it works for you at least for inspiration ^^
PS: there are interesting dnsmasq config tweaks like
- reading another file instead of
/etc/hosts
, so you can just use some public ad-banning list.. Withno-hosts
andaddn-hosts=/etc/hosts_dnsmasq
- don’t use dnsmasq format of servers. Stick to the etc-host way. I tried the first and each query was 10x slower
- set the nameserver to use with
no-resolv
andserver=95.215.19.53
or your favorite private dns public server.