Dumb AP OpenWrt connecting to DNS server on port 54

Hi,

I installed on my primary openwrt router adguardhome and change the local dnsmasq port to 54.

I also have a dumb AP (also oepnwrt) and now I want to that the device resolves the localhosts from the primary openwrt router.

Is there something possible like this?

config interface 'lan'
	option proto 'static'
	option ipaddr '192.168.199.110'
	option netmask '255.255.255.0'
	option device 'br-lan.99'
	option gateway '192.168.199.254'
	option delegate '0'
	list dns '192.168.180.254:54'
or
    option dns '192.168.180.254:54'

No, dns is always port 53.
Put AGH on 54, and use it as upstream resolver for dnsmasq, running on 53.

1 Like

OK. Than I must find how to setup AGH to port 54, and where I can setup that dnsmasq can use the upstream DNS AGH on port 54. Anybody have experience with that?

Doesn't need to be 54 specifically, AGH might have some presets, like 5353, it'll work just the same.

How to change DNS on Putty - #2 by Grommish add #54 after the IP - 127.0.0.1#54.

1 Like

OK thanks, so dnsmasq to use in dnsforwardings het ip adres and for port #portnumber, so 127.0.0.1#54

Now I need to find out how to set adguard on port 54

if it can't be done through some webui (I don't use AGH), look for adguardhome.yaml

You can keep using the standard port and change the address to 127.0.0.53 for example.

dnsmasq binds to all interfaces, he'll need to make AGH bind to 127.0.0.1 only,
and dnsmasq not to bind to 127.0.0.1.

then point dnsmasq to 127.0.0.1 (no port change needed) as upstream.

or ?

I will try later today to bind dnsmasq to the interfaces on my vlans, and than localhost 127.0.0.1 to AGH and that use as upstream. I let know if this works

I don't use AGH myself, so it was more general suggestion on how to avoid using non-standard ports. I've used this approach myself with pi-hole and local DNS proxies running on the same host.

Hi,

I did some tests. I tried the inline 127.0.0.1 as upstream dns, but adguard gives only the client localhost. Now I created an additional routeable interface for adguardhome dns

config interface 'dns'
        option device 'br-lan.199'
        option proto 'static'
        option ipaddr '192.168.195.254'
        option netmask '255.255.255.0'
        option ip6assign '64'

I did in the dnsmasq, /etc/config/dhcp

option dns '192.168.195.254'
list server '192.168.195.254'
list notinterface 'br-lan.199'

and in the adguardhome.yaml

dns:
  bind_hosts:
    - 192.168.195.254

and in the dhcp options I set as dns server 192.168.195.254

config dhcp 'lan'
	option interface 'lan'
	option start '20'
	option limit '120'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option dns_service '0'
	list dhcp_option '6,192.168.195.254'

Now it works well, I see all the local clients in the differen openwrt devices and in the adguardhome interface.

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