Just follow these few easy steps...
- Open Finder and goto
Applications -> Utilities -> Terminal.
sudo nano -w /etc/hostsand when prompted enter your Administrator password.
- This is where you add/edit your hostname/ip address pairs you want to add. Remember to save the changes you make!
- You might want to test your changes by pinging the hostnames you added in step 4 (i.e. Type