You are here

Subdomains on the mesh?

8 posts / 0 new
Last post
KM6SLF
KM6SLF's picture
Subdomains on the mesh?
I'm trying to add subdomains to one of my mesh services. I added the subdomains to /etc/hosts and I created the Apache virtual host file that should point that subdomain to the right directory. I can ping the subdomain from the host, but can't seem to access it from another device on the network. Is there a way to add DNS records to the mesh node the server is connected to? Or is there something I'm missing on the host to get this working?
AE6XE
AE6XE's picture
When you reserve an IP
When you reserve an IP address in AREDN setup, provide the fully qualified domain name. Early on, this was in mind when code was written. However, I don't recall anyone using or testing for a long time. Give it a try, and let's see what happens? Joe AE6XE
KM6SLF
KM6SLF's picture
Do you mean adding it like
Do you mean adding it like this under DHCP Address Reservations?
subdomain.hostname - this gets a "is not a valid hostname" error.
Same if I try subdomain.hostname.local.mesh.

Under Advertised Services, the URL option is a drop-down list and no subdomains can be added. Am I misunderstanding your advice or is this not going to work?
KM6SLF
KM6SLF's picture
(No subject)

I'm trying to set up a mail server which requires DNS records:
Warning:
Before you start the installation, please make sure the following DNS records exist for domain 'tcr.local.mesh':
  mail IN A   <IP ADDRESS OF YOUR SERVER>
       IN MX  mail.tcr.local.mesh.

I think this migt need to be done on the mesh node it's attached to. I'm pretty green with OpenWRT, can it be done in terminal if I ssh into the node?

KM6SLF
KM6SLF's picture
Joe, 
Joe, 
Interestingly, if I provision a second IP address to the NIC and if I enter the MAC address with the letters in lower case, the AREDN firmware lets me save it as a reservation. If I make a subsequent change I need to put letters in the MAC address in lower case again, or it will stop with the error that the MAC address is already in use. 

I was able to ping both IP addresses and using the different hostnames I provisioned them in /etc/hosts, but I ended up putting a fresh install of Ubuntu server 20.04 on it due to me messing up some things I didn't want to invest time into fixing. I think this might be a path to doing what I'm trying to do, but if a better way to create a subdomain and to create DNS records is available as an OpenWRT package or something like that, I think that would be the better way to go.
AE6XE
AE6XE's picture
The only way to propagate a
The only way to propagate a hostname across the mesh is via OLSR, although I've not tested this, I assume it would work.  If it does work, then the FQDN would need to be entered to access from across the mesh network.   Short names would default to .mesh.local .

It's been too long since I've looked at this and I'm out of town this week, with limited access to look through the code.  It might be that the FQDN can be entered with a different domain for the node's name, but this doesn't help with LAN devices.  If the DHCP reservation is not accepting a FQDN, e.g. "AE6XE-mydevice.ae6xe.local", then this OLSR config file settings would need to be looked at.  The config file used at run time is built by scripts, so it's not just as simple as editing a file. 

While this should be technically possible, is there value in supporting a custom domain?   This adds complexity.  In my case, sometimes I use my work computer on the mesh network (because that's what I have handy at the moment), and the policies on my laptop require me to enter the FQDN to access mesh services.  It would be problematic if I also had to remember the various and different domain names in use.

Joe AE6XE
KM6SLF
KM6SLF's picture
I think it's worthwhile...
I think it's worthwhile... Not everyone would use it, but mesh power users definitely would, to the benefit of the entire mesh and the public safety entities we serve. A few high end services I'm trying to provide would be a lot easier to set up if subdomains and DNS records could be utilized. Map and routing server builds generally call for them, as do the majority of mail servers, and some of the nicer chat and messaging services I'm looking at. A quick search suggests that OpenWRT supports these features, so hopefully adding them as advanced config options or creating installable packages should be more of an exercise in tweaks and mods than a major coding endeavor.
KM6SLF
KM6SLF's picture
In my intended applications,
In my intended applications, a user wouldn't need to remember subdomains. They would be more more for back end elements and be those that would be accessed would be linked to from mesh web pages for easy access.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer