We have an intranet webserver https://intranet.example.com that should be accessible from outside (only for our own people) under the same domain name. This is necessary, so all the links and urls work everywhere the same (links that are posted to the intranet, links in bookmarks, etc). One resource should have only one link and not 2.
Let's say the internal IP of the Apache https server is 10.1.1.100 and this is also opened with a NAT rule to the external WAN interface 126.96.36.199
To have the same domain name in the LAN and also outside, the name intranet.example.com has a "real" DNS entry at the hoster of 188.8.131.52, but on the Intranet DNS we declared it 10.1.1.100
This seems to work on some test machines now both from the LAN and the WAN. If someone from outside with a laptop comes into the office and switches from mobile access to LAN he gets the internal DNS entry from DHCP and will have resolved intranet.example.com to 10.1.1.100
I have chosen a low TTL for the DNS entry of 10 minutes and I hope this will work.
Do you have a better solution? What is best practice?
Would it be possible to make the outside IP 184.108.40.206 also accessible from the inside? This doea not work normally, but can we convince our gateway machine somehow?