How do I add IPv6 address into System32\drivers\etc\hosts?

Solution 1:

Finally, I've found the way. I speicied zone ID (11 in my case) in hosts:

fe80::215:afff:fec6:ea64%11 realhost

Which I've got using

netsh interface ipv6 show addresses

With help of http://technet.microsoft.com/en-us/library/bb726995.aspx

Solution 2:

Try like this is host file of window. Hope it can help

C:\Windows\System32\drivers\etc:

[2001:db8::10:2aa:ff:fe21:5a88] tsrvv6.wcoast.example.com

Solution 3:

According to a Microsoft TechNet article from 2005/2006:

You should not place entries for link-local addresses in the Hosts file because you cannot specify the zone ID for those addresses. This concept is similar to using the Ping tool to ping a link-local destination without specifying the zone ID. Therefore, entries in the Hosts file are useful only for global or site-local IPv6 addresses.

http://technet.microsoft.com/en-us/library/bb727005.aspx

Solution 4:

I don't have Win7 nearby so can't test it, but I got caught by the hosts.sam file once. Windows Explorer will hide extensions by default, so I spent a day editing the "hosts" file but it was actually the hosts.sam file. Make sure you are editing the real hosts file.

And antispyware programs will block changes to the hosts file. Malware will add hosts entries to redirect bank websites to fake sites.

Adding ipv6 addresses to the hosts file does work on W2K8, I did it last week.