Many to One mappings in Windows HOSTS file

M

Mustapha Huneyd

Is there a way to map two IP addresses to one Hostname in the HOSTS file.

For e.g.

192.168.1.4 202.54.1.1 www.xyz.com

The problem is that an internal server has been translated to a Public IP & registered to a name as given above (www.xyz.com). If I try to access the server using the registered domain "internally", the firewall doesnot permit it as its regarded as a spoof attempt. If I put the internal IP address to map the hostname in the "HOSTS" file, the access to the site is not possible has the HOSTS file resolves the domain to an internal IP address. What's the workaround for such a problem.

regards
Mustapha
 
G

GoumbaYa

No, you can't do that. How could it resolve properly if it has two IP
addresses and one name? ...what would decide which address to use when you
access the server by name (other than the order of the host file)?

What you need to do is give the server a new internal name linked to the IP
address. It may not work properly if the server is a domain controller.

Don't cross-post in the future and use plain text format. Fancy fonts do
nothing for the newsgroups.

Is there a way to map two IP addresses to one Hostname in the HOSTS file.

For e.g.

192.168.1.4 202.54.1.1 www.xyz.com

The problem is that an internal server has been translated to a Public IP &
registered to a name as given above (www.xyz.com). If I try to access the
server using the registered domain "internally", the firewall doesnot permit
it as its regarded as a spoof attempt. If I put the internal IP address to
map the hostname in the "HOSTS" file, the access to the site is not possible
has the HOSTS file resolves the domain to an internal IP address. What's the
workaround for such a problem.

regards
Mustapha
 
R

Roger Abell [MVP]

You need to resolve the misnaming in the DNS system.
The hosts file is not consulted if a name resolves with DNS.
Where it not for this
192.168.1.4 www.xyz.com
202.54.1.1 www.xyz.com
is valid in a hosts file but the second would never
get used.

Is there a way to map two IP addresses to one Hostname in the HOSTS file.

For e.g.

192.168.1.4 202.54.1.1 www.xyz.com

The problem is that an internal server has been translated to a Public IP & registered to a name as given above (www.xyz.com). If I try to access the server using the registered domain "internally", the firewall doesnot permit it as its regarded as a spoof attempt. If I put the internal IP address to map the hostname in the "HOSTS" file, the access to the site is not possible has the HOSTS file resolves the domain to an internal IP address. What's the workaround for such a problem.

regards
Mustapha
 
S

S. Pidgorny

Roger,

Actually, hosts file lookup takes place before DNS lookup
(http://support.microsoft.com/?id=172218) - all hosts files entries for
www.xyz.com should be removed from hosts.

I think the original problem requires firewall reconfiguration rather than
name resolution tweaking.

--
Svyatoslav Pidgorny, MVP, MCSE
-= F1 is the key =-

You need to resolve the misnaming in the DNS system.
The hosts file is not consulted if a name resolves with DNS.
Where it not for this
192.168.1.4 www.xyz.com
202.54.1.1 www.xyz.com
is valid in a hosts file but the second would never
get used.

Is there a way to map two IP addresses to one Hostname in the HOSTS file.

For e.g.

192.168.1.4 202.54.1.1 www.xyz.com

The problem is that an internal server has been translated to a Public IP
& registered to a name as given above (www.xyz.com). If I try to access the
server using the registered domain "internally", the firewall doesnot permit
it as its regarded as a spoof attempt. If I put the internal IP address to
map the hostname in the "HOSTS" file, the access to the site is not possible
has the HOSTS file resolves the domain to an internal IP address. What's the
workaround for such a problem.

regards
Mustapha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top