If changing DNS server to 8.8.8.8 or 8.8.4.4 in System Preferences doesn't work, the problem could be your firewall settings. When turned on, your firewall actively screens against almost every app using access to the web. To fix this, go into your System Preferences > Security & Privacy > select the Firewall tab. Click on the lock icon on the lower left hand corner of the window and type in the admin password. From there, select Firewall Options. From here, you can tell your Firewall to block all incoming connections. For the case of Facetime and iMessage, you will want to click on the box that allows signed software to receieve incoming connections from the web. From there, click on "+" and add Facetime, iMessage, and any other necessary apps to this list.
Hope this helps!