[Solved] Wireguard Peer Resolves hostname But Not hostname.local

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?

This is expected behavior. The.local domain is reserved for use with mdns which does not route across subnets (including VPNs).

https://en.wikipedia.org/wiki/.local#:~:text=The%20domain%20name%20.,localhost.

1 Like

@psherman WOW! Thank you for the information, I was not aware of that.

I may consider switching back to .lan or some other designation or just live with remembering to make sure to format the URL properly otherwise it ends up in my search engine.

You're welcome. Glad I could help clarify.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile:

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