On Sat, 5 Aug 2006 11:54:50 +0200, Tieske put finger to keyboard and
typed:
>I've got the following issue;
>My homenetwork is behind a router which is connected to the providers modem,
>my home-lan is in the range 192.168.50.xxx. I registered a domain name
>linked it to my external IP-address (fixed) and configured my router to
>forward the ports to my server, so I have it working succesfully with my
>server; ftp.mydomain.com works perfectly when connecting from the internet.
>
>But... when I get home and fire up my laptop (within my home network, so
>from the same subnet), the only way to connect to the server is via its IP
>address 192.168.50.2 connecting through the domainname no longer works. When
>trying to reach the webserver by domainname for example, I end up on the
>configuration page of the ADSL modem.
>
>I tried using hosts files to fix this, so switching hosts files depending on
>where I am, but for my room mates (anti-techy people) this is not an option.
>
>How to fix it? any help would be greatly appreciated!
Editing the HOSTS file is the simple (and technically correct) way to
achieve what you want, but it has to be done on all the machines
inside the network for it to work. Other than that, there isn't an
easy way to fix this unless you can also run an internal DNS server
which will return the internal IP address of the web server to any
machine accessing it from inside the network. But that also requires
all the machines inside the network to be configured to use your
internal DNS server rather than any external ones, so this isn't a
non-techy option either.
Another option is to have two names for the server, one with the
external IP address and one internal, like this:
www.mydomain.com IN A 85.85.85.85
inside.mydomain.com IN A 192.168.50.2
and then use
http://inside.mydomain.com from inside the network and
http://www.mydomain.com from outside. That's not significantly
different from using an IP address internally, of course, but it does
have the advantage that the internal name is a bit easier to remember.
A third option, and the only one that will work without requiring any
configuration changes to machines inside the LAN or using different
addresses inside and out, is to get a second IP address and assign it
solely to the server.
Mark
--
Blog:
http://mark.goodge.co.uk Photos:
http://www.goodge.co.uk