Task 002: Setting up a simple DNS hierarchy w/ OpenWRT

I want to use .lan as TLD for the entire network (which is OpenWRT's default behaviour), and create .eon.lan subnet for my room network. Devices in both area should be able to talk to each other. This requires configuring DNS and static routes.

Configuring Home router (192.168.1.1)

  1. Network > DHCP and DNS > General Settings tab.
  2. Add /eon.lan/192.168.1.2 to DNS forwarding
  3. Add eon.lan to Domain whitelist. (This option appears only when Rebind protection is on.)
  4. Disable Local Service Only (You might want to add WAN to Exclude interfaces. e.g. eth1.2)
  5. Network > Static Routes
  6. Add route to 192.168.2.0/255.255.255.0 through 192.168.1.2

Configuring Subnet router (192.168.1.2)

  1. Network > DHCP and DNS > General Settings tab.
  2. Set Local server to /eon.lan/
  3. Set Local domain to eon.lan
  4. Disable Local Service Only
  5. Add lan to Domain whitelist. (This option appears only when Rebind protection is on.)
  6. Add 192.168.1.1 to DNS forwardings.

Notes

  • Dnsmasq by default disallows any DNS from resolving to local addresses like 192.168.x.x, as a part of "rebind protection". This is why it's necessary to add local domains to "domain whitelist", so that dnsmasq omit such checks on those domains.