PPPoE interface (listed as WAN) with a dynamic public IPv4 address A.B.C.D
bridge (listed as LAN), network 192.168.88.0/24
dstnat rules for my site and some other services: 6 ;;; https | site chain=dstnat action=dst-nat to-addresses=192.168.88.201 to-ports=8880 protocol=tcp in-interface-list=WAN dst-port=8880 log=no log-prefix=""
LAN clients have internet access, everything works fine
The problem:
When I try to access my website home.mydomain.com:8880 from a different ISP or through a VPN, everything works fine.
When I try to do this from the local network, it doesn't work.
Of course, NAT dstnat rules technically don't apply to connections coming from the local network. The router processes these connections in the input chain.
What's the best way to solve this problem?
I previously had an ASUS router with the basic version of ASUSWRT, with PPPoE and port forwarding configured, and it worked perfectly in all cases.
and on this forum for more information. In short, what you need are:
A SRCNAT masquerade rule (see the documentation above).
Modify your DSTNAT rule to no longer use in-interface-list=WAN, but one of the following alternatives when your public WAN IP address is dynamic:
Either add an address list entry (for example WAN_IP) for home.mydomain.com (entry has domain name instead of IP address), the router will resolve the domain and creates a dynamic address list entry WAN_IP with the right IP address. Use the address list as condition dst-address-list=WAN_IP in the DSTNAT rule.
Or use dst-address-type=local in the DSTNAT rule. But be aware that this DSTNAT rule will apply when the destination is any of the router's IP address (including 192.168.88.1 in your configuration).
If you have control of DNS for all your LAN devices, an alternative is to have home.mydomain.com resolves to 192.168.88.201 for all devices in LAN (with a static DNS A record). This actually achieves the best performance in your case (when both server and clients are in the 192.168.88.0/24 subnet) because the devices talk directly to each other and the router doesn't need to act as intermediate gateway. Especially if 192.168.88.201 is a NAS device, for example.
Do you mean the dynamic address list entry created from the entry with the specified domain? Normally the TTL of the domain is used, the dynamic items are updated when the TTL expires. The doc doesn't mention that, but you can see in the recent changelog of 7.21beta:
That the TTL is used as timeout value for the entries.
7.21 only updates the behavior when you have for example both entries sub1.example.com and sub2.example.com in the list MY_LIST and both entries resolve to the same address. The entry with that address will now have the timeout of the longer TTL of the two subdomains.