Skip to content

Simple Ways to Quickly Set Up a Proxy on Linux

Linux is a powerful and widely used open-source operating system known for its stability, flexibility, and security. It is the foundation for many servers, desktops, and embedded systems around the world. Linux was created in 1991 by Linus Torvalds, a student at the University of Helsinki in Finland. Initially, it was a hobby project to create a free operating system kernel that resembled the Unix operating system. Torvalds released Linux under the GNU General Public License (GPL), which allows anyone to freely use, modify, and distribute the software.

Linux supports multiple users working on the same system without interfering with each other, making it ideal for shared environments. Linux is known for its stability and reliability, often running for years without needing a reboot. This makes it a popular choice for servers and mission-critical applications. Linux’s security is bolstered by its open-source nature, allowing vulnerabilities to be quickly identified and patched. Its permission and access control systems further enhance security, making it resistant to viruses and malware

Set Up a Proxy on Linux OS

How to Set Up a Proxy in Linux Operating System

Setting up a proxy on Linux can enhance your privacy, improve security, and allow access to geo-restricted content. Whether you’re using Linux for personal or professional reasons, understanding how to configure a proxy is a valuable skill. This article will guide you through setting up a proxy on Linux, covering both system-wide settings and browser-specific configurations. By the end of this guide, you can choose the method that best suits your needs and implement it efficiently.

You must have a proxy server before you start setting up. If you don’t have one, use Proxy5.net. It offers proxies with HTTP, HTTPS and SOCKS5 support, which will greatly simplify the setup on Linux and ensure a stable connection.

Configuring a proxy in the Linux operating system can be done through the system settings. This method applies the proxy settings across all applications that adhere to the system configuration. Here’s a detailed, step-by-step guide to setting up a proxy on Linux. Step-by-Step Guide to System-Wide Proxy Configuration:

Step 1: Open System Settings

  1. Click on the “Activities” or “Applications” menu.
  2. Search for “Settings” and open it.

Step 2: Navigate to Network Settings

In the Settings menu, find and click on the “Network” option.

Step 3: Configure the Proxy

  1. In the Network settings, you will see an option for “Network Proxy” or “Proxy Settings“.
  2. Click on it to open the proxy configuration menu.

Step 4: Set the Proxy Details

  1. You will see several fields such as “HTTP Proxy“, “HTTPS Proxy“, “FTP Proxy“, and “Socks Host“.
  2. Enter the proxy server address and port number for each respective field. If your proxy requires authentication, you will also need to provide a username and password.
  3. For example, if your proxy server address is 192.168.1.100 and the port number is 8080, you would enter these details in the respective fields.

Step 5: Apply and Save

After entering the proxy details, click “Apply” or “Save” to apply the changes.

Step 6: Test the Proxy Settings

To ensure the proxy is working correctly, open a web browser and try accessing a website. If the site loads through the proxy, the configuration is successful.

Step 7: Command Line Configuration (Optional)

For users who prefer the command line, you can set up a proxy using environment variables. Open a terminal and enter the following commands:

export http_proxy=http://192.168.1.100:8080

export https_proxy=https://192.168.1.100:8080

export ftp_proxy=ftp://192.168.1.100:8080

export socks_proxy=socks://192.168.1.100:8080

To make these changes permanent, add the above lines to your ~/.bashrc or ~/.bash_profile file.

nano ~/.bashrc 

Add the export lines at the end of the file, save and exit:

export http_proxy=http://192.168.1.100:8080

export https_proxy=https://192.168.1.100:8080

export ftp_proxy=ftp://192.168.1.100:8080

export socks_proxy=socks://192.168.1.100:8080

Then, apply the changes:

source ~/.bashrc

How to Set Up a Proxy on Linux Through Browser

If you prefer configuring a proxy only for your web browsing activities, you can do so through your web browser. This section will guide you on setting up a proxy in Mozilla Firefox on Linux. Step-by-Step Guide to Proxy Configuration in Mozilla Firefox:

Step 1: Open Mozilla Firefox

Launch Mozilla Firefox from the “Activities” or “Applications” menu.

Step 2: Access Firefox Preferences

  1. Click on the menu icon (three horizontal lines) in the top-right corner.
  2. Select “Preferences” or “Options” from the drop-down menu.

Step 3: Navigate to Network Settings

  1. Scroll down to the “Network Settings” section.
  2. Click on the “Settings…” button.

Step 4: Configure the Proxy

  1. In the Connection Settings window, you will see several options such as “No proxy“, “Auto-detect proxy settings for this network“, “Use system proxy settings“, and “Manual proxy configuration“.
  2. Select “Manual proxy configuration“.

Step 5: Enter Proxy Details

  1. Enter your proxy server address and port number in the “HTTP Proxy” field.
  2. If you have a separate proxy for HTTPS, FTP, or SOCKS, enter the details in the respective fields.
  3. Example: For HTTP Proxy enter 192.168.1.100 and Port enter 8080.

Step 6: Enable Proxy for All Protocols

If the same proxy is used for all protocols, check the box “Use this proxy server for all protocols“.

Step 7: Authentication

If your proxy requires authentication, check the “Proxy requires password” box and enter your username and password.

Step 8: Save and Exit

  1. Click “OK” to save the settings.
  2. Close the Preferences tab.

Step 9: Test the Proxy Settings

Visit a website to check if the proxy configuration is working correctly. If the website loads through the proxy, the setup is successful.

Which Method is Simpler?

Both methods of configuring a proxy on Linux have their advantages and disadvantages. Setting up a proxy through the system settings ensures that all applications use the same proxy, providing a comprehensive solution. However, this method can be more complex and might require command-line skills for advanced configurations.

On the other hand, configuring a proxy through Mozilla Firefox is straightforward and can be done entirely through the browser’s graphical interface. This method is ideal for users who primarily need the proxy for web browsing and prefer a simpler setup process.

In conclusion, if you need a proxy for all network activities, setting it up system-wide is more effective. For a more user-friendly and quick setup, configuring the proxy in Mozilla Firefox is the preferred choice.

Did it help? Would you like to express?