I have a website which runs on a server within our office network.
In the office I can browse that website using http://192.168.0.1
, and outside the office I have to use http://external-ip
. The ADSL-modem/router routes all port-traffic to the right machine 192.168.0.1.
From within the network the external ip-address is unreachable.
Recently I have registered a domain-name for that external ip-address.
Currenly I have a solution with two hosts files and at startup I switch to the right hosts file depending on my location.
The question is: how can I configure my network so that I can use the domain name internally without changing my hosts file all the time?