I am trying to set up dnsmasq as an address resolver on an Ubuntu 18.10.
So far I disabled systemd-resolved as the default resolver and brought dnsmasq in. Running netstat -tulpn shows the following:
> sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 31609/dnsmasq
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 561/sshd
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 4614/openvpn
tcp6 0 0 :::53 :::* LISTEN 31609/dnsmasq
tcp6 0 0 :::22 :::* LISTEN 561/sshd
udp 0 0 0.0.0.0:53 0.0.0.0:* 31609/dnsmasq
udp 0 0 XXX.XXX.XX.XX:YY 0.0.0.0:* 440/systemd-network
udp6 0 0 :::53 :::* 31609/dnsmasq
I think this is fine so far, as now dnsmasq is listening on port 53.
My /etc/resolv.conf looks like this:
nameserver 127.0.0.1
nameserver 127.0.1.1
nameserver 127.0.0.53
I am not sure about the second line, but I think this should be fine so far, too.
Nevertheless, when I try to run dig, ping or whatever, the connection always times out:
> dig askubuntu.com
; <<>> DiG 9.11.4-3ubuntu5-Ubuntu <<>> askubuntu.com
;; global options: +cmd
;; connection timed out; no servers could be reached
Where did I do something wrong, so I broke those functions?