Announcement

Collapse
No announcement yet.

Simple routing quesiton

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    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...
    The Welsh support two teams when it comes to rugby. Wales of course, and anyone else playing England

    Comment


    • #17
      Originally posted by Paddy
      right.. 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...
      No, you should be fine. DNS points, basically, to your router right now. If your router statically forwards the appropriate ports to your "server" in your LAN, then that's all that's needed. Static port forwarding will avoid the potential for NAT confusion.
      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


      • #18
        Yeah, I think you may be over thinking this, Paddy.
        P.S. You've been Spanked!

        Comment


        • #19
          but doesn't the hosts file overwrite dns?
          The Welsh support two teams when it comes to rugby. Wales of course, and anyone else playing England

          Comment


          • #20
            I think what Paddy is trying to ask is, how is he going to access the server from the WAN (Internet) using the domain name if the hosts file is pointing to the server's internal IP (probably a non-routeable IP like 192.168.1.10)?

            Comment


            • #21
              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


              • #22
                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


                • #23
                  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


                  • #24
                    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


                    • #25
                      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

                      Working...
                      X