Sometimes we need to mapped ip address thru host file to resolved names when accessing our own intranet or the internet.What are the instances where we need this mapping thru host file?
Your support is highly appreciated.
Thanks in advance.
You might need this when you don't have your own DNS server or you can't configure it for some reason (such as company policies or permissions). So you would put your name to IP mappings in the hosts file.
We've had to do this a few times at work for some users.
Some of our servers have external IP addresses, but the actual servers are only accessible from certain IP addresses. The issue that we've encountered is that when some users are VPNed in and they try to access those servers, the laptops use external DNS servers to resolve the names of those servers to the public IP address. Of course they aren't able to connect because their IP addresses aren't allowed to access the servers externally, so what we do is add entries to their HOSTS file for those servers pointing them to the private IP addresses of the servers in the network. So when the users try to access the servers again, their computers direct the users to the servers' private IP addresses, which they are able to access successfully because they're VPNed in.
Lastly, how about some scenario samples like this:
A) wherein the likes of DNS forwarding,Root hints,zones and other local DNS related configuration is the culprit?
B)sample,our client is using our local network and is accessing a certain web names but he can successfully access if using ip address .
I just ask this due I might encounter problems soon when I start configuring our DNS stuffs.
Just remembered another scenario here (thanks to KiLLaBeE). It's when you have a server with public IP say 18.104.22.168 and your DNS server is configured to map the name say
to that IP. The internet hosts are able to access the server using the
. But in some cases the inside hosts are NOT able to access it using the name because the name resolves to a public IP that has to go back to the local network and be forwarded to the private IP. This glitch is common and it depends weather the edge router (that is doing NAT and forwarding) supports this feature or not. If it doesn't, you can setup the HOSTS file for those inside hosts to map
directly to the private IP ignoring the DNS server.