Cannot access DNS running on DIY router

by Erik Lievaart   Last Updated September 12, 2019 00:00 AM

I have been trying to setup my own DIY router with Ubuntu server 18.04.3 LTS. I have managed to get working: networking, DHCP, IP forwarding and masquerading, but I am stuck on the DNS server.

I installed pi-hole on the router and it seems to be working:


only the first resolves

dig @
dig @

both resolve, so it appears as if pi-hole is working properly.

The client gets assigned an ip address (e.g. through dhcp. If I configure isc-dhcp-server to assign the DNS server (google) then the client can browse the internet without problem. However, if I assign the DNS, then I can open websites using their IP address, but not using their domain name.

From the client

dig @


dig @

does not work:

; <<>> DiG 9.9.5-3ubuntu0.11-Ubuntu <<>> @
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

This suggests that the client cannot access the router directly, but when the client opens the IP in a web browser, the pi-hole admin panel shows up.

The firewall is configured in firehol:

version 6

interface enp7s0 wan
    client all accept

for i in 3 4 5 6
    # accept all traffic on lan
    interface enp"$i"s0 "lan$i"
        policy accept
        # server "dns http" accept

    # route packets between lan and wan
    router "lan2wan$i" inface enp"$i"s0 outface enp7s0
        route all accept

Does anyone know what is causing the DNS resolution to fail, or even better, what needs to be done to fix the problem?

Related Questions

How does DNSMasq integrate with my router?

Updated July 15, 2018 18:00 PM

Local DNS server (bind) and the router DHCP

Updated September 03, 2015 18:00 PM