Наверх
Как заблокировать сайт.

Иногда, требуется ограничить доступ к определённому сайту или сайтам на компьютере. На самом деле, сделать это не сложно.

Для ограничения доступа к какому-либо сайту необходимо внести изменения в файл hosts.

Данный файл расположен в папке C:/Windows/System32/drivers/etc



Данный файл необходимо открыть от имени администратора, для этого нажимаем кнопку ПускСтандартные.

Ищем блокнот, кликаем по нему правой кнопкой мыши и выбираем пункт Запустить от имени администратора.



Теперь в блокноте выбираем вкладку ФайлОткрыть.



В появившемся окне идём в папку, указанную выше, и открываем файл hosts.



Стандартный файл должен выглядеть так:

# Copyright © 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost


Для запрета определённого сайта достаточно в самом низу прописать строчку

127.0.0.1 ваш_сайт.com

где ваш_сайт.com – это сайт который необходимо заблокировать, адрес без http:// и www.

На примере ниже мы заблокировали сайт google.ru,

# Copyright © 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 google.ru


После этого осталось только сохранить файл, закрыть блокнот и перезапустить браузер.

Просмотров: 1541 | Автор материала admin


Автор также рекомендует:
Всего комментариев: 0
avatar