2142 views

How to set up a proxy on Linux

Why you should use a proxy for Linux

Every operating system has its vulnerabilities, and Linux is no exception. To ensure security and anonymity on the network, we recommend setting up a proxy. With proxy servers for Linux you will be able to:

  • Hide your IP address to remain anonymous on the Internet.
  • Protect your data on the device from leaks and hacks.
  • Bypass regional and local restrictions, and avoid blocking online activity.
  • Filter traffic from unnecessary ads and spam.

If you already have a reliable personal proxy, let's move on to setting it up. We'll show you how to set a proxy through the command line using environment variables.

Step-by-step proxy settings in Linux

  1. Open a command prompt on your device. To do this, enter “Terminal” in the system search.
  2. 1:1.png

  3. In the command line, enter the proxy server data in the following format:
    • export http_proxy="http:// username:password@IP-address:port";
    • export https_proxy="https:// username:password@IP-address:port";
    • export socks_proxy="socks:// username:password@IP-address:port";
    • export ftp_proxy="ftp://usermane:password@IP-address:port".

    You can enter several proxies of different types at once (HTTP, HTTPS, SOCKS, or FTP) or select one type.

  4. If you use free proxy servers without a username and password, then enter the data in this format:
    • export http_proxy="http://IP-address:port";
    • export https_proxy="https://IP-address:port";
    • export socks_proxy="socks://IP-address:port";
    • export ftp_proxy="ftp:// IP-address:port".
  5. After that, close Terminal and reboot your device. After rebooting, your operating system will start working through proxy servers.

How to disable proxy in Linux

  1. To disable the proxy, you need to open the “Terminal” again and enter the following values:
    • unset http_proxy;
    • unset https_proxy;
    • unset ftp_proxy.
  2. Close the window and restart your device.

The proxy configuration is completed! This setup is suitable for any Linux-based operating system. This will help protect your data and device, and you will always remain anonymous online.