School Survival


Has school destroyed your creativity and self-confidence? I'm working on a book called Recovering From School, to help you heal the damage caused. Join the Patreon or Newsletter to be notified about updates. Paid Patreon members will get early draft previews, as well as a free digital copy when it's done.


How To Unblock YouTube At School On Linux Without VPN

Part of the Mega Guide: How To Unblock Anything At School

A VPN, or Virtual Private Network, keeps your online activities private by encrypting your data so that others can see what you're doing on the internet. This is useful for protecting your privacy and bypassing restrictions.

But sometimes, the network you're on might prevent VPN installations or connections, like in certain offices or schools. Or, your device might have security settings or restrictions that stop new apps from being installed.

Luckily there are other ways to unblock YouTube on Linux!

Using Invidious

Invidious is an alternative front-end to YouTube that emphasizes providing a more privacy-conscious and lightweight way to view and watch YouTube videos. It serves as a proxy between users and YouTube, which implies it can help reduce tracking and ads while allowing you to watch content. The main aims of Invidious are to improve user privacy, limit data collection, and deliver a cleaner user experience without the usual YouTube interface and advertisements.

The various Invidious instances should work in the browser of any device.

Users can take advantage of Invidious to search for videos, watch them, and even get features like comments and playlists, all while maintaining a degree of anonymity and reducing the amount of data shared with Google. Since it's an open-source project, it's community-driven and can be customized or hosted independently by different people or organizations.

Unblocking YouTube On Linux using Free DNS Servers

What Are DNS Servers?

Imagine you want to find a friend's home, but you just know their name, not their location. You’d probably ask someone who knows where they live, right?

In the internet world, DNS servers (Domain Name System servers) are similar to those knowledgeable people. When you enter a website's name (like www.example.com) into your web browser, DNS servers translate that name into an IP address (a numeric address) that your computer can recognize and employ to find YouTube on Linux.

How Changing DNS Servers Can Help Bypass Censorship

Sometimes, some websites might be restricted by your ISP or your school. They do this by forcing your DNS queries (requests to access a website) pass through servers that either block or redirect them.

Here's how changing your DNS servers can assist:

  1. Different DNS Servers: By changing to a different DNS server (like Google's public DNS or Cloudflare's DNS), you might avoid these blocks. These alternative servers might not have the same exact restrictions or might not block the website you wish to access.

  2. Accessing Restricted Sites: If a particular DNS server is known for allowing access to certain websites, using that server can help you get around the restrictions put in place by your school.

There exist many complimentary DNS providers. This guide demonstrate how to configure OpenDNS, though you can replace the IP addresses for other providers if you choose.

There is a big list of DNS servers here: https://public-dns.info/

Here are some of the popular ones:
Google: 8.8.8.8 and/or 8.8.4.4
Cloudflare: 1.1.1.1

How to Change DNS Servers on Linux

Changing DNS servers on Linux can be done via the command line by editing configuration files or using network management tools. Here’s a step-by-step guide for several methods:

Method 1: Using resolv.conf File

  1. Open Terminal: Open your terminal.

  2. Edit the resolv.conf File:

    • Use a text editor to open the /etc/resolv.conf file. For example:
      sudo nano /etc/resolv.conf
      
    • Add or change the nameserver lines to your desired DNS servers. For instance:
      nameserver 8.8.8.8
      nameserver 8.8.4.4
      
      These addresses are Google's public DNS servers. You can replace them with the IP addresses of your preferred DNS servers.
  3. Save and Exit:

    • If you’re using nano, press Ctrl+X, then Y to confirm changes, and Enter to save.
  4. Check the Changes:

    • You can verify the changes by using:
      cat /etc/resolv.conf
      

Method 2: Using NetworkManager

If you’re using a system with NetworkManager (common in many desktop distributions), you can change DNS settings via the nmcli command:

  1. List Connections:

    nmcli connection show
    
  2. Modify the Connection:

    • Replace <connection-name> with the name of your connection. For example, if your connection is called Wired connection 1, the command might look like:
      sudo nmcli connection modify "Wired connection 1" ipv4.dns "8.8.8.8,8.8.4.4"
      
    • You can also specify DNS servers for IPv6 if needed:
      sudo nmcli connection modify "Wired connection 1" ipv6.dns "2001:4860:4860::8888,2001:4860:4860::8844"
      
  3. Restart NetworkManager:

    sudo systemctl restart NetworkManager
    

Method 3: Using systemd-resolved (if applicable)

Some distributions use systemd-resolved for DNS resolution.

  1. Check the Status:

    systemctl status systemd-resolved
    
  2. Edit the Resolved Configuration:

    • Open the /etc/systemd/resolved.conf file:
      sudo nano /etc/systemd/resolved.conf
      
    • Under the [Resolve] section, add or modify the DNS line. For example:
      [Resolve]
      DNS=8.8.8.8 8.8.4.4
      
    • Optionally, you can also set FallbackDNS for fallback servers.
  3. Restart systemd-resolved:

    sudo systemctl restart systemd-resolved
    
  4. Ensure /etc/resolv.conf Points to systemd-resolved:

    sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
    

Notes

Choose the method that matches your system’s configuration and network management tools.

Unblocking YouTube On Linux using Free Proxy Servers

What Are Proxy Servers?

Let's imagine the internet as a big, open library where you can read and access all sorts of materials and information. Now, imagine there's a special gatekeeper who controls what books you can see based on certain restrictions. If the librarian doesn't want you to see certain books, they can restrict your access to those materials.

A proxy server is like a helpful ally who can assist you get around this librarian. Here's how it works:

  1. Your Request: When you want to access a website, instead of going directly to the librarian (which is like your internet connection), you request your friend (the proxy server) to assist you.

  2. The Friend (Proxy Server): Your friend goes to the librarian, requests the website for you, and then brings it back to you. In this way, the librarian never knows it’s actually you making the request.

  3. Changing Proxies: If the librarian becomes aware of your friend and restricts their access, you can just find a different friend (a different proxy server) to help you. By changing friends, you can continue to access the books that were previously blocked.

In basic terms, a proxy server acts as a middleman that helps you access information without the restrictions you would face directly. By switching proxies, you can get around internet censorship, which is like circumventing the librarian's restrictions.

How to Change Proxy Servers on macOS

Changing proxy servers on a Linux system using the command line involves configuring environment variables or editing configuration files, depending on whether you're setting a temporary proxy or a more permanent system-wide one. Here’s a step-by-step guide:

Temporary Proxy Configuration

For a temporary proxy setup, you can export proxy environment variables directly in your terminal session. This will affect only the current terminal session.

  1. Open your terminal.

  2. Set the proxy environment variables. You need to specify the proxy server's address and port. Here's how to do it for HTTP, HTTPS, and FTP proxies:

    export http_proxy="http://proxyserver:port"
    export https_proxy="https://proxyserver:port"
    export ftp_proxy="ftp://proxyserver:port"
    

    Replace proxyserver with the proxy server's address and port with the port number. If your proxy requires authentication, include your username and password:

    export http_proxy="http://username:password@proxyserver:port"
    export https_proxy="https://username:password@proxyserver:port"
    export ftp_proxy="ftp://username:password@proxyserver:port"
    
  3. To make sure your proxy settings are applied, you can check the environment variables:

    echo $http_proxy
    echo $https_proxy
    echo $ftp_proxy
    

Permanent Proxy Configuration

For a permanent setup, you’ll need to modify system configuration files or profiles so that the proxy settings persist across sessions and reboots.

For Individual User:

  1. Edit the .bashrc or .bash_profile file (or equivalent for your shell). Open the file in a text editor:

    nano ~/.bashrc
    
  2. Add the export commands at the end of the file:

    export http_proxy="http://proxyserver:port"
    export https_proxy="https://proxyserver:port"
    export ftp_proxy="ftp://proxyserver:port"
    
  3. Save and exit the text editor. For nano, press CTRL+X, then Y, and Enter.

  4. Reload the configuration:

    source ~/.bashrc
    

For System-Wide Configuration:

  1. Edit the /etc/environment file to set global proxy variables:

    sudo nano /etc/environment
    
  2. Add the proxy settings:

    http_proxy="http://proxyserver:port"
    https_proxy="https://proxyserver:port"
    ftp_proxy="ftp://proxyserver:port"
    
  3. Save and exit the text editor.

  4. Reload the environment settings:

    source /etc/environment
    

Proxy Settings for Specific Applications

Some applications or tools have their own proxy settings, such as wget, curl, or package managers like apt:

By following these steps, you can configure and manage proxy settings on your Linux system via the command line.

Where to find free proxies? We have a list here.


If you like what we're doing here, you can become a Patron and sign up for our newsletter!