#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    3
    Rep Power
    0

    Windows hostfile


    Hi

    I have a problem. A server on the internal network is looking up in an external register for finding the correct endpoint. Sometimes the endpoint is at the same network as the sending server - but it is not able to get in contact with it because it is trying to connect with the public IP it gets from the external register.

    Is it possible in the host file to tell a server that when it tries to connect to IP xxx.xxx.xxx.xxx it should use the internal IP yyy.yyy.yyy.yyy
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2011
    Location
    United States
    Posts
    24
    Rep Power
    0
    If you modify the HOSTS file, the computer will always use the information in the HOSTS file prior to contacting a DNS server. If you only need to do this for one computer, that should be OK. However, if you have many systems on your internal network, then it would be easier to manage this if you created a zone in your internal DNS server(s), assuming that you have your internal clients pointing to an internal DNS infrastructure for name resolution.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    3
    Rep Power
    0
    And it would not be a problem using IP addresses instead of one IP address and one host name?

    Example

    186.xx.xx.xx 10.xx.xx.xx

    instead of

    10.xx.xx.xx myhostname
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7170
    You cannot map one IP address to another using the hosts file. The host file is a part of the DNS lookup procedure; that procedure doesn't happen at all if your computer already has the IP address of the remote host.

    Comments on this post

    • psnabe agrees
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    3
    Rep Power
    0
    Thanks for the answer :-)

IMN logo majestic logo threadwatch logo seochat tools logo