Close
    Search Search

    Tutorial - Block free access to YouTube on a computer

    Tutorial - Block free access to YouTube on a computer

    Restricting access to YouTube on the home computer can quickly become an imperative to avoid family conflicts at the fateful time of homework. There is a free solution that is quite easy to implement through OpenDNS.


    © Valeriy_G / iStock



    As we know, children are more and more tempted by the screens which are multiplying in homes. If for some like the neuroscientist Michel Desmurget "* The multiplication of screens generates decerebration on a large scale *", we are not going to eliminate screens here, but limit their appeal. YouTube and other video sharing services are truly addicting and it is often difficult for children to resist. So when you have to use a computer for some homework, it is always reassuring to know that they cannot be tempted by a video that would have "inadvertently" started.

    The idea of ​​this tutorial is therefore to make it difficult to access YouTube - and other streaming services - on a computer, whether it is running Windows, macOS or Linux. There are several solutions to achieve its ends. In our case, we are going to use the free OpenDNS service which makes it possible to filter web content arriving on a computer while leaving the possibility of quickly changing configuration.

    Filter Internet Addresses

    OpenDNS is a DNS (Domain Name System) redirection service which is in a way the "comprehensible" directory of Internet sites. Indeed, the various machines connected to the Internet network all have an IP address (Internet Protocol) which identifies them on the network under the numerical address 95.131.141.51. In this form, it is not obvious what this IP address points to. On the other hand, if you are told that this sequence of numbers corresponds to www.TechnologiesTips.com, it immediately becomes more intelligible. By customizing our "directory" of websites, we will be able to block access to certain sites such as YouTube.



    1. Open an OpenDNS account

    First, you need to open an account with OpenDNS, a free DNS redirection service. It is an American company owned by Cisco Systems, a network infrastructure giant. If it is possible to use the pre-filtered DNS servers without registering to limit inappropriate access to children via the 208.67.222.123 and 208.67.220.123 (FamilyShield) servers, it is essential to create an account in order to personalize the service and restrict access to YouTube specifically. The site is unfortunately in English, but the access remains quite simple.

    Go to https://signup.opendns.com/homefree/ to enter your username and data and click on Get a free account.

    A confirmation email is automatically sent to you to validate your registration.

    2. Select your IP address

    Once connected to OpenDNS, you access your dashboard allowing you to customize the redirect service.


    OpenDNS service dashboard.

    You must first add a network. To do this, click on Add a network. By default OpenDNS offers you to create a network from the IP address that the service has detected for your computer.

    Click again Add the network.


    You will then need to give your network a name, something like "Home without YouTube". Once named, you need to choose the network from the drop-down menu in order to specify its parameters.



    OpenDNS automatically detects your network.

    3. Customize the filtering

    By default, content filtering is on none, that is, nothing is blocked. You can choose between the different filtering levels, but for our tutorial we will choose Custom to manually set filters.


    In mode Custom, you can modify the filter rule of your DNS server.

    You can then choose the categories of content you want to block, such as Nudity, Pornography, Religion (Religious) and in our case of course, Video Sharing.

    4. Block YouTube

    To completely lock out YouTube, we will also add the YouTube domain name to the block.


    In the game Manage Individual domains, enter "youtube.com".

    Once the domain is added, it appears in the list Always block just below. You can take the opportunity to add other domains like "vimeo.com" or "dailymotion.com". You must click on Apply to validate your choices.



    You can also block certain sites individually.

    Configure your connection to use OpenDNS

    You must now tell your computer that it should use the OpenDNS settings instead of the classic DNS server usually assigned by your Internet service provider. The easiest way would be to change the address of the DNS servers at the box level of your Internet operator so that all devices connected to the box benefit from filtering. Unfortunately, most Boxes do not allow such modifications. In addition, the filtering would impact all connected devices, which would "penalize" everyone by default.

    In our practical case, you must indicate to each device (computer, tablet, etc.) that uses your Internet connection that it must use the OpenDNS servers. Smartphones that use a 3 / 4G connection will therefore not be affected by the filtering.

    5. Configure DNS for macOS

    Go to Apple menu> System Preferences ... and click Network. We are going to define a new Configuration for OpenDNS filtering to allow you to quickly switch from a mode with to a mode without YouTube. However, note that your child will have plenty of time to do the same if he discovers the subterfuge! Click on Modify configurations ... then click + and create a new version.


    Network configuration of the computer under macOS.

    We call it OpenDNS here. Select the connection you want to protect from the list on the left; in our case, the one delivered by the USB adapter (wired connection). Then click on Advanced... and go to the DNS tab. Enter the two addresses of the OpenDNS servers

    • 208.67.222.222
    • 208.67.220.220

    Note that you can also use the addresses of the FamilyShiel service which pre-filters content intended for children.

    • 208.67.222.123
    • 208.67.220.123

    Click on OK then Apply.

    From now on, you no longer have access to YouTube and other sites that you decided to block during setup.


    YouTube videos no longer display in viewed pages.

    To reestablish the connection to the video sharing service, all you have to do is choose automatic configuration.

    5a. Configure DNS for Windows

    With Windows 10, you have to open the Control Panel by pressing the "Windows" and "i" keys simultaneously. Then click on Network and Internet then select your connection (Ethernet, Wi-Fi) from the list on the left.

    Then click Change adapter options. A new window will then open. Select your connection again and right click to select Properties. Select Internet Protocol Version 4 (TCP / IPv4) in the list. Click on the button Properties.

    Select option Use the following DNS server address and enter the OpenDNS DNS addresses.

    • 208.67.222.222
    • 208.67.220.220

    Click on OK. Click on Close to apply the new DNS settings.

    Limits and another possibility

    As we have seen, due to its flexibility, this technique also has its limits. Thus, it will be possible for the child to bypass the limitation by choosing another connection that has not been previously configured. It is therefore advisable to create a user profile for the child who will therefore not have access to the DNS settings, unlike an administrator profile.
    Also, this technique does not work with the use of a VPN that uses its own DNS servers.

    A more radical solution that is less easy to circumvent (you have to be an administrator of your machine) is to change the "hosts" file on your computer. The hosts file is a relic of the early years of the Internet and used to make the link between a domain name and its IP address, as a DNS server does now. Today, the host file is still present in your operating system and is queried first during an internet request. It is therefore possible to modify the host file on your computer to prevent access to certain sites. But these changes must be done with care.

    MacOS

    Open the Terminal (Command + space bar + terminal), enter a command sudo nano / etc / hosts then confirm with Starter.
    You must then enter your password. You can edit the hosts file and add the following lines:
    127.0.0.1 (tab key) youtube.com (Enter)
    127.0.0.1 (tab key) m.youtube.com (Enter)
    Un Control + X allows you to exit the application by saving (Y).

    Windows

    Copy and paste the path of the hosts file (C: WindowsSystem32driversetchosts) into a window of your file explorer. Windows will ask you if you want to edit the file with Notepad. Add the following two lines:

    127.0.0.1 (tab key) youtube.com (Enter)
    127.0.0.1 (tab key) m.youtube.com (Enter)
    Then save the file.

    A restart of the computer is sometimes required for the change to the hosts file to take effect.

    add a comment of Tutorial - Block free access to YouTube on a computer
    Comment sent successfully! We will review it in the next few hours.