HideMyAss VPN

Showing posts with label How to edit HOSTS-file in Mac. Show all posts
Showing posts with label How to edit HOSTS-file in Mac. Show all posts

Monday, April 29, 2013

How to edit HOSTS-file in Mac

The hosts file is a text file that maps hostnames to IP addresses.
Upon typing a url address on the browser, the system is checking if there is a relevant entry on the hosts file and gets the corresponding IP address, else it resolves the IP via the active connection’s DNS servers.

1 - Open the Terminal.app (Either by start typing Terminal on the Spotlight, or by going into Applications -> Utilities -> Terminal.)
2 - Open the hosts by typing on the Terminal that you have just opened:
    $ sudo nano /private/etc/hosts
3 - Type your user password when prompted.
4 - Add the line "76.13.13.48 plus.smtp.mail.yahoo.com" (of course replace IP and smtp hostname with your personal settings) without quotes to end of the file and save.
5 - Restart your Mac.
This should manually route the traffic from the DNS host to the IP.