yeah, but if i browse to the domain within the LAN, the hosts file redirects me to the server IP. If i browse to the domain outside the LAN, the hosts file redirects me to the server which is hidden behind NAT. I could always map to the router's IP and wait for the port to be forwarded, but i'd have similar problems with name resolution...
Announcement
Collapse
No announcement yet.
Simple routing quesiton
Collapse
X
-
Originally posted by Paddyright.. so if i need to access my site from outside the LAN, then i will need to change the hosts file, as NAT will prevent me from accessing the IP directly...Gigabyte P35-DS3L with a Q6600, 2GB Kingston HyperX (after *3* bad pairs of Crucial Ballistix 1066), Galaxy 8800GT 512MB, SB X-Fi, some drives, and a Dell 2005fpw. Running WinXP.
Comment
-
erm, perhaps there's some complexity to Paddy's config that I'm not understanding.
If internet DNS resolution is working on the WAN side of the router (ie, the Internet), the Hosts file entry isn't required. So PCs outside of Paddy's LAN don't need the Hosts file entry.
The Hosts file entry is only required for PCs on the LAN side of the router, where you want to override the true DNS resolution (which points to your router) with the internal IP address (the IP of the server on the LAN).P.S. You've been Spanked!
Comment
-
The only time you'd have a problem with the hosts file would be if you had a laptop that was sometimes behind the router, and sometimes outside on the internet coming in. In that case, you'd have to swap the hosts file in and out depending on where you're connecting from. If your computers stay put, you'll have no trouble.Lady, people aren't chocolates. Do you know what they are mostly? Bastards. Bastard coated bastards with bastard filling. But I don't find them half as annoying as I find naive, bubble-headed optimists who walk around vomiting sunshine. -- Dr. Perry Cox
Comment
-
Just to clarify - the hosts file only affects DNS lookups for the computer the hosts file is on. So, if you take a machine from your LAN, and connect it outside your LAN (say, you bring a laptop to work), and try to browse to the web server, it won't work.
- Steve
Comment
-
Yes. The hosts file is like a cheat sheet that takes precedence over DNS lookups, ONLY for the computer it's on.Gigabyte P35-DS3L with a Q6600, 2GB Kingston HyperX (after *3* bad pairs of Crucial Ballistix 1066), Galaxy 8800GT 512MB, SB X-Fi, some drives, and a Dell 2005fpw. Running WinXP.
Comment
-
s'ok guys you've hit it.
I will be using a laptop both inside and outside the LAN.
The server has a valid IP address, but is hidden behind NAT.
So I would need to update the DNS entries according to where the laptop was physically located.The Welsh support two teams when it comes to rugby. Wales of course, and anyone else playing England
Comment
Comment