Hello everyone,
I'm encountering a DNS issue and would appreciate some help from the community. Here's my setup:
Setup:
-
I have three routers:
- A router running vanilla OpenWRT 23.x
- A GL.iNet Mango V2 running OpenWRT 19.x (GL.iNet firmware 3.x)
- A Beryl AX (MT6000) running OpenWRT 22.x (GL.iNet firmware 4.x)
-
At home, I have a Raspberry Pi running Pi-hole with Unbound, acting as both the DHCP server and DNS resolver. I also have a VPN set up (PiVPN) so I can connect remotely to my home network. The Pi-hole filters and resolves DNS for the VPN connection.
-
I use several devices (smartphones, tablets, laptops) that connect via WireGuard, and when they connect directly to the VPN, DNS resolution works fine for internal services such as:
plex.domain.lan
promox.domain.lan
nas.synology.me
pi.hole
Problem Details:
When I use the router running vanilla OpenWRT 23.x, everything works as expected:
- The router connects to my VPN and uses Pi-hole as the DNS resolver.
- However, initially, the router doesn't resolve internal DNS names (though I can ping the servers).
- To fix this, I go to the LAN interface in LuCI and add a custom DHCP option (option 6, with the IP of my Pi-hole). After restarting the router, all devices connected to the router resolve DNS correctly via Pi-hole.
The same fix works with my Mango V2 (GL.iNet firmware 3.x). I add DHCP option 6 (with the Pi-hole IP), restart, and everything works fine. No extra changes are needed on the Pi-hole or router side.
Issue with Beryl AX (Firmware 4.x):
When using the Beryl AX (GL.iNet firmware 4.x), even after adding DHCP option 6 with the Pi-hole IP, DNS resolution is still handled by the router instead of Pi-hole. It's as if the router is ignoring the DNS server specified in option 6.
This issue only happens on the Beryl AX with firmware 4.x. The same configuration works perfectly with the Mango V2 and other routers using GL.iNet firmware 3.x or vanilla OpenWRT.
Question:
Has anyone experienced this issue with firmware 4.x? Is there something new or different in the DNS handling that I need to adjust?
Any help or guidance would be greatly appreciated!
Thanks in advance.
I can add my config files:
DHCP
``config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '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'
option rebind_protection '0'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option force '1'
list dhcp_option '6, 10.80.198.1'
list ra_flags 'none'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
config domain
option name 'console.gl-inet.com'
option ip '192.168.60.1'
config domain
option name 'console.gl-inet.com'
option ip '::ffff:192.168.60.1'
config dhcp 'guest'
option interface 'guest'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv6 'disabled'
option ra 'disabled'
just in case here is my config of my wireguard peer, it works fine in a openwrt vanilla router, glinet mango and I tested another glinet GL-AR750S slate but those two were using firmware 3.x The issue is with the firmware 4.x
Wireguard Peer
[Interface]
PrivateKey = redacted
Address = 10.x.198.11/24
DNS = 10.x.198.1 #pihole vpn dns (used pivpn)
[Peer]
PublicKey = redacted
PresharedKey = redacted
Endpoint = dns.apple.com:51820
AllowedIPs = 0.0.0.0/0
currently the beryl ax is using 4.6.2 stable.
Also I tried to check the resolv conf but even if I put the dns of my pihole dns manually is overwritten, so my guess something overwrites the dns or gives more priority. I don't have any issue with other glnet routers is just this one using 4.x
/tmp/resolv.conf
search lan
nameserver 127.0.0.1
nameserver ::1
/tmp/resolv.conf.d/resolv.conf.auto
# Interface wan
nameserver 10.105.10.1
search lan