Как запретить доступ к сайту на компьютере windows 10

Наверно большая часть нашей жизни можно сегодня назвать цифровой. Мы посещаем десятки сайтов каждый день, чтобы получать и обмениваться информацией. Но сайты, которые мы посещаем, возможно, не совсем подходят для наших детей.

Если вы делите свой Windows 10 PC с детьми, это хорошая идея, блокировать доступ к определенным веб-сайтам на вашем компьютере.

Конечно, существуют десятки бесплатных и коммерческих программных продуктов, позволяющих блокировать веб-сайты на компьютере, но вы можете использовать встроенную в файл host блокировку URL-адреса на компьютере Windows. Это просто, все что нужно сделать — добавить URL-адрес веб-сайта в файл host. Ни один из браузеров, установленных на вашем компьютере не сможет открыть заблокированные вами сайты.

Как блокировать веб-сайты на вашем Windows 10 ПК путем редактирования файла host.

Как уже говорилось, вы можете блокировать веб-сайты на вашем Windows 10 ПК без установки какого-либо дополнительного программного обеспечения. Все, что вам нужно сделать, это отредактировать файл host. Вот как это сделать.

Шаг 1: Откройте программу Блокнот от имени администратора. Для этого введите — Блокнот в меню Пуск или на панели задач в поле поиска, кликните правой кнопкой мыши на значок блокнота, а затем выберите Запуск от имени администратора.

Нажмите кнопку Да, когда появится окно управления учетными записями пользователей.

Шаг 2: В окне программы Блокнот, нажмите кнопку меню Файл, нажмите кнопку Открыть.

Перейдите в

C:\Windows\System32\Drivers\Etc

(где «C»  буква диска где установлена Windows 10) и выберите файл host.

Примечание: вам потребуется изменить тип файла текстовые документы на все файлы (см рисунок ниже)

Windows 10 host

заблокировать сайт в Windows 10 host

Нажмите кнопку Открыть, чтобы открыть файл с помощью блокнота.

Шаг 3: После того, как файл host открыт с помощью блокнота, добавьте URL адреса веб — сайтов, к которым вы хотите, заблокировать, запретить доступ на вашем ПК следующим образом:

127.0.0.1 www.bing.com
127.0.0.1 www.google.com

заблокировать сайт в Windows 10

Шаг 4: После добавления адресов сайтов, откройте меню Файл, а затем нажмите кнопку Сохранить или нажмите сочетания клавиш Ctrl + S , чтобы сохранить изменения. Все!

Теперь попробуйте открыть один из введенных для блокировки сайтов в любом из веб-браузеров на вашем компьютере. С этого момента ни один из заблокированных сайтов не будет загружаться на вашем компьютере.

Для того, чтобы снова разблокировать сайты, снова откройте файл host, и удалите адрес сайта из файла host. Сохраните файл.

Please I need to block all website in Windows 10 family safety i can’t do that right now why?

The reason why you should take adequate steps to block a website in Windows 10. Here are the prominent reasons for block websites: 1. To eliminate the chances of cybercrime or bullying. 2. To protect your identity online. 3. Prevent children from powsing inappropriate content like porn.

  • Part 1. Top 3 Ways to Block Website in Windows 10
  • Part 2. Good Tips for Using Website in Windows 10
  • Part 3. Something About Windows 10/11 Password

Part 1. Top 3 Ways to Block Website in Windows 10

Well! After knowing the factors that push you to block websites on your Windows 10 computer, how about going bit deeper and learning how to block them in the first place. Here are the top 3 ways.

1. Using the web interface of router

You can quickly make use of selective website blocking on your Windows 10 system.

Step 1. Launch any web /powser on your computer and key in within the address bar the IP address of the router. In case you don»t know the IP, you can try entering http://192.168.1.1 or http://192.168.0.1 or http://192.168.2.1 for that matter.

Step 2. Now, feed the login credentials here. Go to the section that allows blocking access to websites, computers during specific times of the day. It depends on your router»s interface, but most probably it should be named «Access Restrictions».

Step 3. You need to specify the users and the contents that you want to restrict before saving the changes. The step by step process will be provided by the router»s user guide go through it.

2. Using your PC to block sites

Here is the step by step tutorial on how to block websites using your PC.

Step 1. Launch Windows explorer and /powse for «C:\Windows\System32\drivers\etc» or whatever the appropriate drive Windows is installed on.

Step 2. Double-tap on «hosts» and choose «Notepad» when prompted to select a program by Windows. In case the «hosts» file is open with any other program, go to «Start» > type «Notepad» > tap «Enter» key> «File» > «Open» and select «hosts».

Step 3. You need to look for the last line and put the cursor at the end of it followed by «Enter» for creating a new line. The concluding statement would contain something like «127.0.0.1 localhost» or «::1 localhost».

Step 4. Now, key in 127.0.0.1 and hit the «Spacebar» once followed by keying in the website address you want to block on your Windows 10 PC. E.g. 127.0.0.1 www.abc.com. Repeat the process for each website you block.

Step 5. Hot «File» and then «Save» for applying the changes. Ignore if you get any antimalware software, as it is raised due to modifying the hosts file.

Step 6. Finally, close all /powsers and test the blocked sites with a fresh /powser session to ensure the sites aren»t opening.

3. Using Windows Family Safety

You can easily block websites on Windows 10 system using this method, if you are a user who doesn’t have administrative privileges.

Step 1. Go to «Control Panel» > «User Accounts and Family Security».

Step 2. Select a user and configure the «Family Safety» features and then choose the desired users to block the websites for.

Step 3. Tap on the «On, enforce current setting» > «Web filtering» > «Users can only use the websites I allow» > «Allows or block specific websites».

Step 4. Now, enter the URL you need to block followed by checking the «Block» option. Repeat it for each website.

Part 2. Good Tips for Using Website in Windows 10

Learning how to block websites in Windows 10 was interesting. But, how about knowing the safety measures and precautions and the best tips for using websites?

  • It is recommended to create complex passwords that no one can guess or hack into.
  • Use a password protected router to enhance network security.
  • Be sure before clicking any unknown link or button over a site.
  • Use a firewall to block malicious programs reaching your computer.
  • Don’t share your passwords with others.
  • Set passwords on your mobile and protect it.
  • Update system and mobile software and take measures to safely surf and shop online.

Part 3. Something About Windows 10/11 Password

Understanding how to block websites on Windows 10/11 and tips to stay safe is paramount. But, apart from these traditional processes, you can always rely on third-party tools that ensure utmost security. Windows password maintains more security and having a password recovery tool for the various passwords to login, manage (Admin) and Microsoft password can be done with a tool such as PassFab 4WinKey. In case you forget a password on your Windows 10 or other Windows system, it ensures to recover, change, create or remove the password within no time.

Here is the guide:

Step 1. Download and install PassFab 4WinKey on your computer.

Step 2. Connect an empty USB flash drive with your PC and choose «USB Flash Drive» under the software window. Click the «Burn» button and then tap «OK» once the process gets over. Remove the USB drive afterwards.

Step 3. Insert the USB drive on the password locked PC and reboot it by tapping «F12» (Boot Menu) and picking the USB drive here. Choose the «Enter» key thereafter.

Step 4. Reset the Windows password by selecting «Windows 10» as the OS and hitting the «Next» button.

Step 5. You need to specify, whether an Admin/Guest/Microsoft account you need to rest password for and tap the account name adjacent to it followed by clicking the «Next» button.

Step 6. Tap «Reboot» and «Restart Now» to reset the password.

Bottom Line

From the above article, I belive you already knew how to block website. Moreover, you found that PassFab 4WinKey is the ultimate answer to resetting Windows 10/11 password. If you are interested in this tool, just give it a try.

Рассмотрим несколько способов, которые помогут вам запретить доступ к отдельным сайтам, URL и IP адресам в Windows без использования сторонних программ. Обычно блокировку сайтов наиболее эффективно настраивать на уровне сетевого шлюза (роутер, маршрутизатор, Wi-Fi точка доступа, через которую вы выходите в Интернет), или с помощью стороннего ПО (фильтры контента, DNS фильтры и т.д.). В нашем случае мы попробуем заблокировать определенный сайт с помощью встроенных средств Windows 10 и автоматизации PowerShell.

Содержание:

  • Блокировка сайтов в Windows с помощью файла hosts
  • Блокировка сайтов через DNS
  • Блокируем IP адрес сайта в брандмауэре Windows
  • PowerShell: правила блокировки сайтов по имени и IP адресу в брандмауэре Windows

Блокировка сайтов в Windows с помощью файла hosts

Самый известный способ заблокировать определенный сайт в Windows – отредактировать файл hosts. Обычно файл находится в каталоге %windir%\system32\drivers\etc\. Обратите внимание, что у файла hosts нет расширения.

Путь к каталогу с файлом hosts задается в параметре DataBasePath в ветке реестра HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters. По-умолчанию это %SystemRoot%\System32\drivers\etc.

DataBasePath путь к файлу hosts в реестре HKLM\CurrentControlSet\Services\Tcpip\Parameters

Файл hosts используется для ручного назначения соответствий между IP адресами и DNS именами. При выполнении разрешении имен файл hosts имеет приоритет над DNS серверами, указанными в настройках сетевых подключений,

Чтобы заблокировать определенный сайт (например, ok.ru), откройте на редактирование файл hosts (с правами администратора) и добавьте в него строки вида:

127.0.0.1 ok.ru
127.0.0.1 www.ok.ru

блокировка сайта через файл hosts

Сохраните файл и перезагрузите компьютер (или очистите DNS кэш командой:
ipconfig /flushdns
).

После этого при попытке открыть сайт ok.ru в любом браузере будет появляется сообщение “Страница не найдена” / “Страница не доступна”.

Вы можете добавлять новые строки с URL сайтов в файл hosts с помощью такого bat файла:

@echo off
set hostspath=%windir%\System32\drivers\etc\hosts

echo 127.0.0.1 www.facebook.com >> %hostspath%
echo 127.0.0.1 facebook.com >> %hostspath%
exit

Либо можно воспользоваться следующими PowerShell функциями для автоматизации блокировки (разблокировки) определенных сайтов в списке запрещенных доменов в файле hosts.

Function BlockSiteHosts ( [Parameter(Mandatory=$true)]$Url) {
$hosts = 'C:\Windows\System32\drivers\etc\hosts'
$is_blocked = Get-Content -Path $hosts |
Select-String -Pattern ([regex]::Escape($Url))
If(-not $is_blocked) {
$hoststr="127.0.0.1 ” + $Url
Add-Content -Path $hosts -Value $hoststr
}
}

Function UnBlockSiteHosts ( [Parameter(Mandatory=$true)]$Url) {
$hosts = 'C:\Windows\System32\drivers\etc\hosts'
$is_blocked = Get-Content -Path $hosts |
Select-String -Pattern ([regex]::Escape($Url))
If($is_blocked) {
$newhosts = Get-Content -Path $hosts |

Where-Object {
$_ -notmatch ([regex]::Escape($Url))
}
Set-Content -Path $hosts -Value $newhosts
}
}

powershell - функция блокировки сайтов в файле hosts

Теперь чтобы добавить определенный сайт в заблокированные достаточно выполнить функцию:

BlockSiteHosts ("vk.com")

Чтобы разблокировать сайт запустите:

UnBlockSiteHosts ("vk.com")

Блокировка сайтов через DNS

Если ваши клиенты пользуются одним DNS сервером, вы можете аналогичным образом заблокировать определенный сайты с помощью создания DNS записи в этом DNS, указывающей на 127.0.0.1 (или что-то в таком роде). По такому принципу, кстати, работают большинство коммерческих контент фильтров DNS (OpenDNS, SkyDNS, Яндекс.DNS и т.д.).

Блокируем IP адрес сайта в брандмауэре Windows

Также вы можете заблокировать определенные сайты с помощью встроенного Windows Firewall. Главный недостаток такого метода – вы не сможете использовать имя домена или сайта в правиле блокировке. Брандмауэр Windows в качестве источника/назначения позволяет указать только IP адрес или подсеть.

Сначала нужно определить IP адрес сайта, который вы хотите заблокировать. Проше всего это сделать командой nslookup.

nslookup ok.ru

Как вы видите в результатах команды присутствует несколько IP адресов, которые назначены сайту. Вам нужно заблокировать их все.

Теперь нужно запустить панель настройки Windows Firewall (Панель управления \Все элементы панели управления\Брандмауэр Защитника Windows\Дополнительные параметры или firewall.cpl).

В секции “Правила для исходящих подключений” создайте новое правило со следующими параметрами:

Windows Firewall создать исходящее правило

  • Тип правила: Настраиваемые;
  • Программа: Все программы;
  • Тип протокола: Любой;
  • Область: в секции “Укажите удаленные IP адреса, к которым применяется данное правило” выберите пункт “Указанные IP адреса” -> Добавить. В открывшемся окне укажите IP адреса, IP подсети или диапазон IP адресов сайтов, которые нужно заблокировать.

указать ip адреса для блокировки

Нажмите OK-> Далее -> Действие: “Блокировать подключение”.

windows firewall блокировать подключение

В окне со списком профилей брандмауэра, к которым применяется это правило оставьте все опции. Осталось указать имя правила и сохранить его.

После этого Брандмауэр Защитника Windows будет блокировать все соединения с данным сайтом. В браузере при подключении к заблокированному сайту будет появляться ошибка:

Unable to connect

или

Доступ в Интернет закрыт
Возможно, подключение заблокирована брандмауэром или антивирусным ПО.
ERR_NETWORK_ACCESS_DENIED

В домене AD вы можете распространить на компьютеры пользователей политику блокирующую сайт с помощью GPO. Но еще раз скажем, это нецелесообразно. Фильтровать сайты правильнее на шлюзе доступа в Интернет.

PowerShell: правила блокировки сайтов по имени и IP адресу в брандмауэре Windows

Вы также можете с помощью PowerShell создать правило брандмауэра, блокирующее исходящие подключения к определенному сайту:

New-NetFirewallRule -DisplayName "Block Site" -Direction Outbound –LocalPort Any -Protocol Any -Action Block -RemoteAddress 217.20.147.1, 217.20.141.0/26

New-NetFirewallRule - создать правило блокировки сайта PowerShell

Строка “ The rule was parsed successfully from the store” говорит о том, что правило новое правило брандмауэра успешно применено. Вы можете найти его в графическом интерфейсе Windows Firewall.

правило блокировки IP адресов в брандмауэере windows

Чтобы не резолвить имя сайта в IP адреса вручную можно использовать PowerShell командлет Resolve-DnsName для получения IP адресов сайтов.

Resolve-DnsName "ok.ru"| Select-Object -ExpandProperty IPAddress

Resolve-DnsName

Таким образом мы можем преобразовать имя домена в IP адреса и сразу добавить запрещающее правило для блокирования доступа к сайту:

$IPAddress = Resolve-DnsName "ok.ru"| Select-Object -ExpandProperty IPAddress
New-NetFirewallRule -DisplayName "Block Site" -Direction Outbound –LocalPort Any -Protocol Any -Action Block -RemoteAddress $IPAddress

Получается, что теперь вы можете добавить запрещающее правило в Windows Firewall сразу для нескольких сайтов:

$SitesToBlock = “lenta.ru”,”mail.ru”,”facebook.com”
$IPAddress = $SitesToBlock | Resolve-DnsName -NoHostsFile | Select-Object -ExpandProperty IPAddress
New-NetFirewallRule -DisplayName "Block Web Sites" -Direction Outbound –LocalPort Any -Protocol Any -Action Block -RemoteAddress $IPAddress

У командлета Resolve-DnsName я добавил параметр –NoHostsFile, чтобы не использовать при проверке файл hosts.

Проверим, что блокирующее правило для исходящего появилось в консоли.

block web sites правило в консоли windows defender firewall

Эта статья прежде всего разминка для ума. В корпоративной сети для ограничения доступа к сайтам нужно использовать фильтрацию на уровне шлюза доступа в интернет или прокси-сервере. Блокировка доступа на уровне хостов не столь эффективна.

,

There are several reasons as to why you would want to block websites on Windows 10. There are times when several websites are just too distracting and do not let you work with full concentration. Other times, you simply want to maintain your privacy by blocking websites, especially when your PC is used by other individuals too, or from your kids.

  • Related article: How to Block Adult Sites on all Web browsers & Network Devices.

In this guide, we will walk you through some easy yet effective steps of blocking websites on Windows 10.

How to Block Access to Sites in Windows 10.

  • Method 1: Block Websites in Windows through Hosts File.
  • Method 2: Block Websites in Google Chrome.
  • Method 3: Block Websites in Mozilla Firefox.
  • Method 4: Block Websites in Microsoft Edge and Windows 10.
  • Method 5: Block Websites using Windows 10 Family Options.

Method 1: How to Block Sites in Windows through Hosts File.

The most common method of blocking a site in all versions of Windows is to use the hosts file. The advantage of this method is that it will help you prevent access to the websites you want in all browsers. *

* Note: If you looking for an easiest method, to block a site through the hosts file proceed to method 4.

1. Type Notepad in the search field of the taskbar and click on Run as administrator.

Open Notepad as Administrator

2. Click Yes in the User Account Control prompt.

3. Click the File menu and then click on Open from the list of options available.

notepad-file-open

4. Now navigate to the location mentioned below.

  • C:\Windows\System32\Drivers\etc\hosts

5. Change the file type to All Files (*.*) from Text Documents (*.txt).

6. Next, locate the hosts file and double-click on it. This will open a text document in Notepad.

Block Sites through Hosts File

7. Scroll down in the Notepad window and at the end…

a. type the IP «127.0.0.1«
b. press Tab, and then type the website address you want to block. For example: let’s suppose that you want to block Facebook.  In that case, add the follow two (2) lines:

  • 127.0.0.1    facebook.com
  • 127.0.0.1    www.facebook.com

Hosts file - Block Websites

8. Finally, save the document and check if doing so blocked the unwanted site. This should block the unwanted website on your Windows 10, and you can repeat the process if you want to block other websites too.

Method 2: How to Block Sites in Google Chrome.

If you are looking to block certain websites from Google Chrome* directly, follow the steps mentioned below.

* Note: Skip to method-3 for instructions in Firefox, or to method-4 if you are a Microsoft Edge user.

1. Navigate to Block Site webpage in chrome web store.

2. Click Add to Chrome.

block sites chrome

3. In the confirmation prompt, hit the Add extension button.

image

4. Now, wait for Chrome to complete the installation of the extension.

5. Once the installation is complete, your browser will direct you to a new window where you need to accept the Privacy Policy to proceed.

bloksite chrome

6. Finally, add the websites that you want to block in the next window. *

* Note: If you don’t see the below window, go to Chrome Extensions, find the BlockSite, choose Details and then open the Extension options.

blok websites chrome

Method 3: How to Block Websites in Mozilla Firefox.

To prevent the access on websites in Firefox:

1. From the Firefox’s Options menu, click Add-ons.

block sites firefox

2. Type BlockSite in the search bar on the top of the window.

block webistes firefox

3. Click the first option (BlockSite), appearing on your screen.

image

4. In the newly launched window, click on Add to Firefox and in the confirmation prompt, click on Add again.

blocksite firefox

5. Click on BlockSite icon and click Edit block list to add the websites that you want block, or alternately navigate to the site and click Block this site.

block website in firefox

Method 4: How to Block Websites in Microsoft Edge and Windows 10.

The process of blocking websites in Microsoft Edge is different from that of Chrome or Firefox. In fact, the process below will block sites in all web browsers.*

* Note: We will use the third party «FocalFilter» site-blocker application in this method.

1. Launch Microsoft Edge and navigate to the FocalFilter page.

2. Scroll down the page and click the download it for free here hyperlink.

3. Once the download is complete, click on the downloaded file and proceed with the on-screen instructions to install FocalFilter.

FocalFilter install

4. After the installation is complete, open FocalFilter.

5. In the next prompt, click on Edit My Site List.

Block Site with FocalFilter

6. In the Edit Your Block List window, add the URL of the website you want to block. For instance, if you want to block Facebook, add «www.facebook.com» as shown below. When done, click Save.

7. Finally, hit Block My Site List to block the website(s) you added in your list.

Block My Site - FocalFilter

8. From now on, blocked sites will not be accessible with on EDGE or any other browser.

block website in EDGE

9. If you want to stop the site blocking, press CTRL + SHIFT + ESC, select the FocalFilter application and click End task.

image

Method 5: How to Block Websites using Microsoft’s Family Safety Options.

If you share your computer with other users or your kid and you wish to restrict the access to certain websites for them, then you can use the Windows 10 Family Options. To complete this task you must add the Microsoft account of the user you want to restrict, or to create a new MS account for the «restricted» user.

1. From Start menu, open Settings and click Accounts.

block site with family options

2. From the left panel, select Family & other users.
3. Now click on the Add a family member option in the right pane.

add family member windows 10

4. If the person you want to add already has a Microsoft account, enter their email address as shown below. If not, click on the Create one for a child hyperlink.

add someone to pc

5. Once you have added the account, click on it and then select Manage family settings online hyperlink.

manage family settings

6. Doing so will launch a new window with advanced settings. In this window, click the More options button and click Content filters.

Family Options - Content Filters

7. Turn on the Block inappropriate websites toggle.

filter inapproriate sites Windows 10

8. Scroll down the window and click on the dropdown menu under Blocked sites. Here, enter the URL of the website you wish to block. For instance, if you want to block Facebook, type www.facebook.com.

block inapproriate sites Windows 10

That’s it! Which method worked for you?
Let me know if this guide has helped you by leaving your comment about your experience. Please like and share this guide to help others.

If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us in our effort to continue to help others while keeping this site free:

  • Author
  • Recent Posts

Konstantinos is the founder and administrator of Wintips.org. Since 1995 he works and provides IT support as a computer and network expert to individuals and large companies. He is specialized in solving problems related to Windows or other Microsoft products (Windows Server, Office, Microsoft 365, etc.).

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Для чего нужен hyper v в windows 10
  • Txtsetup sif windows 2000
  • Windows 8 beta x64
  • Windows socket error обычно разрешается только одно использование адреса сокета
  • Lbp 2009 canon драйвер windows 10