Resolve wan hostnames

Hello I'll try to be succinct.

I have two OpenWrt devices, one is set up as AP and the other is the client which connects to the AP.

AP - | james.lan
client - dhcp) | (lan static) | joe.wrt (lan domain)

The client's wan zone forward option is set to ACCEPT so it can access the subnet.

What works:
james> ping
james> ping joe.lan
joe> ping

What doesn't work:
joe> ping james.lan (bad address)

So what I'm asking is how to get joe to access james and its other clients by their hostnames.

Thank you

As you have local private IP Addresses also on the wan side, the DNS server in Joe discards the DNS response from James by default (as wan should normally have public IPs)

See dnsmasq options. You might need to set rebind protection to 0, or define domains to allow rfc1918 responses (private IP addresses)

  • rebind_protection boolean 1 --stop-dns-rebind
    Enables DNS rebind attack protection by discarding upstream RFC1918 responses
  • rebind_domain list of domain names (none) --rebind-domain-ok
    List of domains to allow RFC1918 responses for, only takes effect if rebind protection is enabled. The correct syntax is: list rebind_domain '/'


Adding this in config dnsmasq

list rebind_domain 'lan'

allows joe to successfully ping james.lan and any of james' clients.

Thank you

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