Good trick. I supose it will work well if you have a your own server with a static IP address, but probably will be dificult if your domain is hosted in a shared machine. Any idea for this?
Leo
June 7, 2005 8:36 AM
Definetly works for static IPs. Don't understand how a machine being shared or not (in any of several definiteions of 'sharing') makes a difference though.
workaholic
October 6, 2005 11:14 AM
also useful for looking up the current ip of your domain is this online lookup tool: http://www.dnswatch.info
Karl
October 19, 2005 10:03 PM
Quote:
Remember, the hosts file overrides DNS, so if the real IP address for example.com changes again sometime in the future, this machine will continue to believe it's at whatever IP address is listed in hosts.
EndQuote
This is not true, all over the microsoft website it is said that the DNS is read FIRST and the HOSTS file read SECOND. This is a problem for me because I am trying to give a different IP for a hostname and I am unable to because the hostname is first resolved via DNS so Windows does not bother checking HOSTS.
Marci Weinberger
May 30, 2006 10:34 AM
Excellent article. I'm glad that I found it. Two thumbs up!
Chris
September 29, 2006 9:18 AM
Is there a way to forward the index page to the test site using an html tag?
Abegail
January 18, 2008 3:23 PM
hi i will to know how i can block a website..its meebo.com.
Dave
April 23, 2008 11:37 PM
I can't seem to redirect an IP to an IP in the hosts file. I have a desktop application which references an IP that is no longer valid and I don't have the source code. I want to fake the PC into thinking that the old IP is referring to the new IP.
Say my old IP is 1.2.3.4 and my new IP is 1.2.3.5, I want the host file to say something like this:
1.2.3.5 1.2.3.4
This doesn't work though, any ideas?
Leo
April 27, 2008 12:18 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
What you're trying to do isn't possible. An IP address can't
be mapped to another IP address in that way. The hosts file
is all about mapping *names* to addresses.
I don't know of a solution for your application, short of
trying to patch the binary.
Comments
Read the article that everyone's commenting on.
June 6, 2005 11:59 PM
Good trick. I supose it will work well if you have a your own server with a static IP address, but probably will be dificult if your domain is hosted in a shared machine. Any idea for this?
June 7, 2005 8:36 AM
Definetly works for static IPs. Don't understand how a machine being shared or not (in any of several definiteions of 'sharing') makes a difference though.
October 6, 2005 11:14 AM
also useful for looking up the current ip of your domain is this online lookup tool: http://www.dnswatch.info
October 19, 2005 10:03 PM
Quote:
Remember, the hosts file overrides DNS, so if the real IP address for example.com changes again sometime in the future, this machine will continue to believe it's at whatever IP address is listed in hosts.
EndQuote
This is not true, all over the microsoft website it is said that the DNS is read FIRST and the HOSTS file read SECOND. This is a problem for me because I am trying to give a different IP for a hostname and I am unable to because the hostname is first resolved via DNS so Windows does not bother checking HOSTS.
May 30, 2006 10:34 AM
Excellent article. I'm glad that I found it. Two thumbs up!
September 29, 2006 9:18 AM
Is there a way to forward the index page to the test site using an html tag?
January 18, 2008 3:23 PM
hi i will to know how i can block a website..its meebo.com.
April 23, 2008 11:37 PM
I can't seem to redirect an IP to an IP in the hosts file. I have a desktop application which references an IP that is no longer valid and I don't have the source code. I want to fake the PC into thinking that the old IP is referring to the new IP.
Say my old IP is 1.2.3.4 and my new IP is 1.2.3.5, I want the host file to say something like this:
1.2.3.5 1.2.3.4
This doesn't work though, any ideas?
April 27, 2008 12:18 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
What you're trying to do isn't possible. An IP address can't
be mapped to another IP address in that way. The hosts file
is all about mapping *names* to addresses.
I don't know of a solution for your application, short of
trying to patch the binary.
Leo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
iD8DBQFIFNF1CMEe9B/8oqERAgUdAJ9AMJFBqHZ/Xx/aSnOQDHrY4ZmFrQCfQG0t
PHt65hGLxzrMIOZ08/tgZig=
=0JVy
-----END PGP SIGNATURE-----
June 5, 2008 9:36 PM
Hi, I would like to know how to do the remotely from hometo office with dynamic IP address. Using RealVNC free edition.
To post a comment on "Can I fake the DNS ip lookup to test my website?", please return to that article's main page.