3

I have an OpenWRT/LEDE router with Dnsmasq. I currently have a local domain (something.lan) that is appended to DHCP names, so I can access devices on my network just by connecting to, let's say, computer.something.lan. Neat.

Recently, I have finally gotten native IPv6 connection. This means I can now reach all my IPv6 capable devices from the internet.

I have a domain name (something.tld) and I want to use it for AAA records to DHCP names. Something like setting lan.something.tld NS record to routers IPv6 address and then letting Dnsmasq act as a nameserver (somehow)? Then I would be able to use computer.lan.something.tld in both my local network and the internet.

Is something like this possible? Of course I can just set the AAAA records manually, but I would like it to be automatic.

  • 2
    I wouldn't be so eager to put my internal devices on the public internet. I'd probably not do this. – slm Jul 9 '18 at 23:41
  • @slm the devices are already on the public internet. This way they would just have their hostname on a public domain. And of course the OpenWRT router acts as a firewall, so I would have to open ports to make the device accessible from the public internet. – Josef Miegl Jul 10 '18 at 10:48
1

What you're asking about is entirely possible, but highly discouraged, IMO.


Overview

You'd have to define your IP address for your router as the SOA for your domain and then specify NS records that point to your router's IP. I used to do this a few years back using a cable modem just to see if I could do it.

The other area where you might get tripped up is your ISP may not allow the DNS ports into your network.

Bottom line

Assuming you can either create the SOA record directly, or whomever is your domain registrar lets you set NS records for your domain (they all let you do this typically through their web UI's) you can do what you're asking.

Resources

  • I'm not sure if dnsmasq can act like that. It is forwarding dns requests (and resolving dhcp hostnames). – Josef Miegl Jul 11 '18 at 22:33
  • Also, if this works, is it possible to sign the zone with DNSSEC? – Josef Miegl Jul 11 '18 at 22:34
  • @JosefMiegl - dnsmasq can. I used bind to do this previously but now use dnsmasq via my Pi-Hole Raspberry Pi device to do my internal LAN DNS, in looking at the features it could be used in this manner. – slm Jul 12 '18 at 0:11
  • @JosefMiegl - to your DNSSEC question - dnsmasq supports it, I've not ever used it so I cannot say how easy it is to setup or operate - blog.josefsson.org/2015/10/26/combining-dnsmasq-and-unbound – slm Jul 12 '18 at 0:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.