1. Open terminal and type 'su' to enter as a superuser.
2. Type mcedit /etc/hosts (you can use any other text editor to replace mcedit).
3. Add this line : 127.0.0.1 www.blockthissite.com (replace blockthissite with the unwanted site)
4. Repeat step 3 as many sites as you want.
5. Test the site in your browser.
Part 2 : Block porn site or adult site using OpenDNS.