How to access Openwrt luci in client mode on WAN zone by Hostname?

I have my Openwrt 24.10 on a Raspberry Pi router configured in client mode where the WAN zone Wi-Fi connects to the home router. On the ethernet LAN side I have no problem accessing Luci in the browser at hostname.local. I can access it by the assigned IP address on the WAN zone from a computer connected to the same home router. However, I cannot access it by hostname.local on that WAN zone. How do I do that?

The hostname.local connection is made possible by mdns. mdns advertisements only work on the downstream network, by default.

Try opening UDP port 5353 on the OpenWrt wan. In order to connect to LuCI, you also have to open the web interface (TCP 80, 443). Alternatively, you can just simply set your wan firewall zone to accept intput which will open all surfaces.

NOTE: Never do any of this this when the upstream network is untrusted such as when connecting to the internet. It is only acceptable/safe when the upstream network is fully trusted

That should do it, but it is possible you'll also need to install the avahi daemon (it's been a while since I tried this, I can't remember if that is necessary or not).

Thank you, I tried opening port 5353, but still cannot access it by hostname over the WAN. Do you have any other ideas?

Try installing avahi daemon

okay, that sounds complicated

not really...

opkg update
opkg install avahi-dbus-daemon

Side note: you should upgrade to 25.12.

okay, is there any other special configuration needed after that?

I think you need to set the wan as an interface for the avahi daemon... it's been a while, though, so I don't recall exactly.

Before we go much further, what is the function of the OpenWrt device on your network?

It connects local lora mesh radios with internet servers and/or i2p connections.

ok.... I was asking to make sure there wasn't a different configuration/approach that should be used... it sounds like you've got a good reason to have it setup as it is now.

So, I installed avahi and it actually blocks the Openwrt from connecting as Wi-Fi client totally. Actually, the login page briefly came up at hostname.local, but then the connection dropped. I will try to post my Avahi config file.

Here's my avahi config file, do you know what is wrong?
/etc/avahi/avahi-daemon.conf

[server]
#host-name=foo
#domain-name=local
use-ipv4=yes
use-ipv6=yes
check-response-ttl=no
use-iff-running=no
allow-interfaces=br-lan,br-dcf9f6f88bb7,docker0,phy0-sta0

[publish]
publish-addresses=no
publish-hinfo=no
publish-workstation=yes
publish-domain=yes
#publish-dns-servers=192.168.1.1
#publish-resolv-conf-dns-servers=yes

[reflector]
enable-reflector=yes
reflect-ipv4=yes
reflect-ipv6=yes
#reflect-ipv=no

[rlimits]
#rlimit-as=
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=30
rlimit-stack=4194304
rlimit-nproc=3