I’m able to setup a domain name on VLAN1 (mydomain.example)
I’m able to set a name and IP for a device connected (server1, ip:10.10.10.12)
I can PING and do an NSLOOKUP to server1.mydomain.example and i get a reply with the correct IP 10.10.10.12
my problem is that the host in question has a bunch of docker containers running and i would like to be able to setup some aliases for it. example:
plex.mydomain.example → 10.10.10.12
jellyfin.mydomain.example → 10.10.10.12
whatever.mydomain.example → 10.10.10.12
Can (and if yes how) we setup aliases for a static IP with name and domain name ? I looked under root@Route10:/etc/config/dhcp but i dont want to mess anything up on the front end.
For the time being (until we add something like this in the UI), you can use the /cfg/post-cfg.sh script, which will run after every configuration change automatically. This could persist your manual changes through reboots. Of course you will need to be careful with this option.
@Alta-Jeff … small update … looks like after about 48hrs the cnames stop working. if i reboot the router, they all work again. I’ll try next time to just restart dhcp service to see if that will do the trick too.
(not sure if it has to do with the fact that i added some commands to replace the https-dns-proxy)
# Remove existing configurations
while uci -q delete https-dns-proxy.@https-dns-proxy[0]; do :; done
# NextDNS for LAN
uci set https-dns-proxy.lan=https-dns-proxy
uci set https-dns-proxy.lan.listen_addr='127.0.0.1'
uci set https-dns-proxy.lan.listen_port='5053'
uci set https-dns-proxy.lan.resolver_url='https://dns.nextdns.io/xxxxx'
uci set https-dns-proxy.lan.bootstrap_dns='45.90.30.0,45.90.28.0'
# Commit and restart the service
uci commit https-dns-proxy
/etc/init.d/https-dns-proxy restart
Check the logs to see if any updated configurations came in from the controller, but if there weren’t any, there’s not reason why cnames would stop resolving. You can also look at the /var/etc/dnsmasq* configuration to make sure the cnames are still in there, and try restarting just dnsmasq (/etc/init/dnsmasq restart) to see if it it is reloading the config incorrectly.
@Alta-Jeff … some issue I discovered while using the /cfg/post-cfg.sh script …
every time im making a change in gui … I’m loosing the changes that the script did (in this case cnames don’t work anymore).
/etc/config/dhcp still has my changes, but I cannot access any of the cnames.
if I reboot route10, everything works again.
@erpn7 You could add some “echo $(date) adding to dhcp config >>/tmp/dhcp.log” lines in to your script to debug what’s going on. Most likely dnsmasq needs to be restarted after you make your custom changes to /etc/config/dhcp.
the file didn’t exist and the script created the file, but It only added the date and some text I told it to add; no other rows were added on that /tmp/dhcp.log file
however: service dnsmasq restart
fixed the issue without route10 reboot.