I have Wireguard up and running with my iPhone as a peer. I am able to connect from my iPhone over the Wireguard VPN connection and access the internet through my Openwrt router, I am also able to access hosts on my lan.
The trouble is that to access hosts on my local lan I can get to them with their IP address or their hostname but not hostname.local. I am able to access hosts on my lan from my iPhone when it is connected directly to my home WiFi with hostname.local.
I did change the option local
and option domain
in /etc/config/dhcp
from the default of "lan" to "local". This is the config dnsmasq
section of /etc/config/dhcp
config dnsmasq
option domainneeded '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/local/'
option domain 'local'
option expandhosts '1'
option cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option localservice '0'
option ednspacket_max '1232'
option localise_queries '1'
I have read over the dnsmasq settings but do not see which setting may be stopping or allowing the use of hostname.local when connecting over the Wireguard VPN connection.
Why does that work when I am locally attached but not when connecting through the Wireguard VPN?