1 | initial version |
I don't think you understand what the hosts file does, it's for resolution of hostnames to IP addresses, it does not map IP addresses to other IP addresses.
When applications attempt to connect to a remote host, e.g. www.wireshark.org, that hostname must be resolved to an IP address. Depending on the application, it may make a lookup of the hostname in the hosts file and if found the IP address for that hostname is returned.
Also note your format is incorrect for a Windows host file, if you wanted to redirect www.wireshark.org to 127.0.0.1 you would use
127.0.0.1 www.wireshark.org
that is <resolved IP> < host name>