The hosts file is located in directory /private/etc/hosts.We can edit it with our favorite text editor.For me, in terminal type sudo subl /private/etc/hosts, you will be ask to enter the root password.It looks like the code below
74.208.10.249 gs.apple.com
127.0.0.1 gs.apple.com
Edit them and enjoy!