Author Topic: How to block some websites?  (Read 2809 times)

Offline tesoke

  • Newbie
  • *
  • Posts: 1
How to block some websites?
« on: November 02, 2016, 01:44:11 PM »
Hi, I am a newcomer on this forum. I have a problem and hope to find the answer here.
I want to block some websites in my computer. So I cannot. There are some softwares for this, but they are not free and I also have not any card to buy them. I have been searching the Internet to find a solution for this, but all of them did not work! Do you have any idea to do so? Thanks a lot.

Offline freeland

  • Jr. Member
  • **
  • Posts: 12
Re: How to block some websites?
« Reply #1 on: November 04, 2016, 05:32:00 PM »
The easiest way is to add the websites into /etc/hosts.

Code: [Select]
# Blocked sites
127.0.0.1   example.com
127.0.0.1   www.example.com
127.0.0.1   mail.example.com
127.0.0.1   ftp.example.com
#
127.0.0.1   example.net
127.0.0.1   www.example.net
#
127.0.0.1   example.org
127.0.0.1   www.example.org
# etc.

Тhe most efficient way by me is to use own local DNS server, e.g. see this link. Of course, you can do it with a proxy or firewall, but it will be very difficult to block encrypted web connections thus.