DNS (?): how to manage * subdomains of my reverse proxy? (*.mylan "point" to a same ip?)

I'm trying to introduce a sort of reverse proxy in my lan, so I have not to remember ip and port of each service. Note that most of them are on the same machine, so the only port can be used to distinguish them, for example is service1 while is service2.

I have installed a reverse proxy - nginx proxy manager - where I can add proxied hosts as subdomains of the proxy itself... but soon rise a problem: how/if should I configure the DNS on my openWrt router so it knows this? Infact it knows the hostname-ip couple of the proxy itself, but if I try to reach a subdomain, I cant.

I mean: suppose the host proxy.lan is I can reach it because openWrt DNS knows it too; this proxy manages the two services (on the same machine...) service2.proxy.lan and service1.proxy.lan. (The great thing will to not use the subdomain but having proxy.lan/service1 etc, but I have find how to do this yet).

Now, the questions: should I do something on the router? Can tell him somewhere that all *.proxy.lan name requests should "point" to, so the proxy can manage them? Or Am I forced to install a reverse proxy on openWrt (dont think, seems strange to me)? What is the best practice, what am I not considering? I read - fast - the DNS/DHCP wiki page but it is very difficult.

Note: I have dns-over-https installed but this mechanism/config I need should intercept my lan domain as dns manages the other hostnames, on a different level, that is "should not be a problem...


read here https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#a_and_aaaa_rr on the forum that this maybe the solution (code from wiki)

uci add_list dhcp.@dnsmasq[0].address="/home/"
uci commit dhcp
/etc/init.d/dnsmasq restart

in my case will be:

uci add_list dhcp.@dnsmasq[0].address="/proxy.lan/"
uci commit dhcp
/etc/init.d/dnsmasq restart


  1. dont understand it, may someone explains how it works, if it will (have not tested to avoid damage)? :frowning:
  2. dont know if works with dns-over-https proxy packages installed

ok I choose to risk and....

... It works!!!!
But why? How? :D:D:D:D:D

ok, this is a blog-thread :smiley:
Just seen that the above command just added an entry in:
Network => DHCP and DNS => General Settings => Addresses
The line is /proxy.lan/

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.