How to DNS spoof on windows

DNS spoofing is when you force your operating system into thinking a domain is pointing to an IP address different then what the rest of the internet see's. This can be useful when you move a site from one server to another but want to test the site before pointing it to the new server.

Instructions

These instructions assume that your windows installation is located on at c:\Windows.

Notepad should now be open. At the bottom of the file you will need to add a new line. On this new line first enter the IP address followed by a space and then the domain as shown below.

10.0.0.1 domain.com

If your testing a website you will probably want to add the www prefix as well

10.0.0.1 domain.com www.domain.com

Do not forget to remove, or comment out the changes you made to the hosts file when your done! If you forget your workstation will continue to force that domain to the IP address you specified.