Access NC via local IP with overwrite.cli.url

The solution is what called split-bran DNS or split-horizon DNS - in short words you point exactly the same hostname to different IP addresses - in the internet it points to you public IP and within LAN to your internal IP (ideally both point to your external reverse proxy). This makes all the clients access the system in a same way (only the very low level details differ)

See similar discussions (most of the topic has multiple references as well):