How can I add a second local domain or an alias of the first?
I have some stupid hard-coded software that expects hostname.local to work.
And another one that expects hostname.lan
While I personally would like to offer things like wiki.workshop to the end-user.
Is this possible with dnsmasq or some rebinding magic?
I kinda know how to do it with dnsctptproxy, but would rather not have to send DNS requests back to dnsmasq and leave the pre-filter of local domains in dnsmasq on.
Can put any FQDN + IP address in: Network -> DHCP and DNS -> Hostnames.
root@OpenWrt:/etc/config# cat dhcp
..
config domain
option name 'wiki.workshop'
option ip '192.168.100.1'
Note modern browsers will try and 'help' with a domain like wiki.workshop so while the underlying OS will resolve it fine if given a chance the browser will tend to convert it to a search.
I tried that but could not find a way to get wildcard to work.
I don't really want to manually curate a list of IPs and services and what device is hosting what.
I'm after a setup that allows me to resolve any-hostname.lan but also any-hostname.local and any-hostname.workshop
Something like:
config domain
option name '*.workshop'
option ip '*.lan'
For me, looking up for example fritz.lan works just fine to get to a fritzbox that's currently running as dumb access point, but I do need to mess with the URL to convince the browser to just open fritz.
But if you have seen problems with hostname.lan what do you suggest as local domain to get around that.
But it does not accept wild cards *, aka requires me to manually take care of things.
I'm also not sure if CNAME can rewrite something like any-random-hostname.worksop to the-same-random-hostname.lan
Best would be if I could just tell dnsmasq to create multiple local domains, but nothing I tried it liked ... might be a limit of uci, still have to try directly editing dnsmasq conf.
Do you expect an infinite amount of subdomains and you cannot make a list of CNAMEs ?
Or maybe if you could describe what is the situation right now, we could think of a better way.
Well, I have some stupid IoT that tries to find each other on .local ..
I personally like .lan to ping local machines by hostname and for general administrating.
I would like to offer everything that provides a "web-page" under hostname.worksop(just an example) to the end-user because they will remember that name and things like wiki.workshop or kodi.workshop or printer.workshop make a bit more sense than .lan especially for people for whom lan just means 3 random letters.
if it's http based, then redirect can be done in the webserver, apache got mod_rewrite, and I think there's one in lighttpd too, but I guess you have to point all those DNS names to the IP of the web server.
I expect random people to bring in a random TV box or their NAS or a development setup or ... and if it's hosting something it should be available preferable under .local .lan and .workshop