Dns doesn't resolve internal wireguard address

I set up custom DNS server via LuCI for my wireguard interface.

But I face this problem:

root@miro_Edge:~# nslookup my-address dns-address
Server:         dns-address
Address:        dns-address#53

Name:      my-address
Address 1: my-ip-address
*** Can't find openwisp.internal.chirpwireless.io: No answer

config /tmp/resolv.conf.d/resolv.conf.auto looks like:

# Interface WGMESH
nameserver my-dns-ip
# Interface lan
nameserver my-dns-ip

config /etc/config/dhcp looks like:

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option ra 'hybrid'
	option dhcpv6 'hybrid'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'
	list ra_flags 'none'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

It is not very obvious from the output what is your problem. The nslookup returned an address.
Also the nameserver that you add as custom dns under an interface will be used for all queries. If you want to achieve selective forwarding there are other ways to do it.

1 Like

I fixed it by applying command: uci set dhcp.@dnsmasq[0].rebind_protection='0'

1 Like

Telling us the responses were Private IPs would have been the needed information. Glad you got it working.

1 Like

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