I have an OpenWRT router configured as a WAN router (with fictional public IP 1.2.3.4) for a small business network with a Linux server (192.168.1.42) and 2 zones (lan and guest).
I use a DNAT ("portforward") to redirect HTTPS traffic from 1.2.3.4:443 to 192.168.1.42:443:
config redirect
option target 'DNAT'
option name 'proxy https'
option src 'wan'
option src_dport '443'
option dest 'lan'
option dest_port '443'
option dest_ip '192.168.1.42'
list reflection_zone 'lan'
list reflection_zone 'guest'
The reflection setting was required, so that lan/guest clients can access https://mydomain.tld being redirect to the server instead of seeing LuCI.
This reflection setting does unfortunately not apply to the OpenWRT router itself:
root@openwrt:~# curl -k https://mydomain.tld
(...)
<a href="cgi-bin/luci/">LuCI - Lua Configuration Interface</a>
(...)
What would be required for OpenWRT to follow its own DNAT rule?
P.S.: I really do not want to work around this by using split-DNS (overriding mydomain.tld to 192.168.1.42 in DNS).