Using Unbound as recursive DNS server is not listening on 127.0.0.1#5335

Hi,
I configured Unbound based on this docu in setup "Serial dnsmasq".

In my understanding dnsmasq is listening on port 53 and forwards all requests to Unbound. Herefore the setting in /etc/config/dhcp

config dnsmasq
  option port '53'
  list server '127.0.0.1#5335'
  list server '::1#5335'
[...]

and in /etc/config/unbound

config unbound
  option add_local_fqdn '0'
  option add_wan_fqdn '0'
  option dhcp_link 'none'
  option listen_port '5335'
[...]

However Unbound is not listening on 127.0.0.1#5335 as shown in netstat:

root@rb760igs:~# netstat -tulpn | grep unbound
netstat: showing only processes with your user ID
tcp        0      0 127.0.0.1:8953          0.0.0.0:*               LISTEN      23100/unbound
tcp        0      0 0.0.0.0:5335            0.0.0.0:*               LISTEN      23100/unbound
tcp        0      0 :::5335                 :::*                    LISTEN      23100/unbound
tcp        0      0 ::1:8953                :::*                    LISTEN      23100/unbound
udp        0      0 0.0.0.0:5335            0.0.0.0:*                           23100/unbound
udp        0      0 :::5335                 :::*                                23100/unbound

Can you please advise how to fix this?

THX

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

It listens on all IP addresses on the local machine.
You can check with dig openwrt.org -p 5335 @127.0.0.1

1 Like

True.
However this is neither what I need nor what I've configured.

Could you please advise how to modify configuration to ensure Unbound listens on localhost only?

Try setting
option interface_auto '0'

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.