Help with routing internal reverse proxy with *.lan domain

Hey everyone, I would like to route internal domains, such as jellyfin.lan or something.lan to specific internal IP address + ports. In this example, I have jellyfin running on 10.0.0.121:8096, and I use Nginx Proxy Manager to do reverse proxy for WAN > LAN (subdomain.domain.com). But I am having trouble getting it to work just on the LAN.

I put this line in /etc/dnsmasq.conf: address=/jellyfin.lan/10.0.0.193. Where 10.0.0.193 is where Nginx Proxy Manager resides.

Then in Nginx Proxy Manager, this is the setting:

# ------------------------------------------------------------
# jellyfin.lan
# ------------------------------------------------------------
server {
  set $forward_scheme http;
  set $server         "10.0.0.121";
  set $port           8096;

  listen 80;
listen [::]:80;
  server_name jellyfin.lan;
  access_log /data/logs/proxy-host-28_access.log proxy;
  error_log /data/logs/proxy-host-28_error.log warn;
  location / {
    # Proxy!
    include conf.d/include/proxy.conf;
  }
  # Custom
  include /data/nginx/custom/server_proxy[.]conf;
}

If I run nslookup jellyfin.lan 10.0.0.1 it will reach the correct IP address, I think. If I ping jellyfin.lan it will pint 10.0.0.121. I'm not sure what is happening. I also do not see any data in the logs. I don't mind running something different, such as Traefik, for just the internal reverse proxy. Thank you for your help.

Check this from the client omitting the DNS server:

Be sure to flush DNS caches for the router and client OS and browser.

Thanks, I did not know I had to flush for all three. I was only flushing in the client OS. Before, it was returning 10.0.0.121. I stopped working on it for a few hours and it is pointing to the Nginx host, and is correctly redirecting :slight_smile: :man_shrugging:

xilex> nslookup jellyfin.lan
Server:  OpenWrt.lan
Address:  10.0.0.1

Name:    jellyfin.lan
Address:  10.0.0.193

Is putting all this into the dnsmasq.conf file the right way to do things? I can see it filling up with a lot. Does address=/*.lan/10.0.0.193 work?

address=/jellyfin.lan/10.0.0.193
address=/something.lan/10.0.0.193
address=/another.lan/10.0.0.193

https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#a_and_aaaa_rr