How to set up a proxy on Linux: Kali, Mint, Ubuntu, Arch, Rocky

Linux is a versatile and free open-source operating system, built on its own kernel. It efficiently manages hardware, enabling users to install software and perform tasks on various devices. Widely used in servers, personal computers, laptops, smartphones, and embedded systems, Linux is renowned for its stability, security, and customizable features. Its open-source code is publicly accessible, empowering both developers and everyday users to tailor the OS to their specific needs. Similar to Windows, Linux also supports the use of proxies.

Today, where web access is crucial for both casual users and professionals, enhancing security, privacy, and circumventing certain restrictions has become vital. Proxies are a key tool in managing and optimizing internet connections. Configuring proxies in Linux is a common task for system administrators and users who appreciate the platform's flexibility and scalability. To simplify this process, it's advisable to follow specific instructions for setting up a virtual intermediary on different Linux versions.

Setting up a proxy on Kali Linux

Kali Linux is a specialized Linux distribution designed for security testing and cybersecurity tasks. It comes equipped with a suite of tools for hacking, vulnerability detection, and other cybersecurity operations. Kali Linux includes a variety of tools for security audits, penetration testing, password recovery, exploitation, vulnerability mitigation, and more. Notable tools in its arsenal are Nmap, Wireshark, Metasploit Framework, John the Ripper, Aircrack-ng, Maltego, and OWASP ZAP.

A key feature of Kali Linux is the Metasploit Framework, which is widely used for developing and executing exploits for security diagnostics. This enables administrators to identify vulnerabilities and explore alternative system access methods.

Kali Linux is also praised for its adaptability and scalability. It can be installed on various platforms, including USB drives, virtual machines, or as a primary OS on a physical computer. The OS benefits from an active user community that contributes to its development, helping it stay abreast of the evolving landscape of computer security and tool updates.

Configuring a proxy on Kali Linux is essential for various reasons, such as maintaining privacy, accessing blocked websites, or optimizing internet connections. Proxy setup in Kali Linux can be achieved through two methods: using the command line or the graphical interface.

Changing settings using the console

To configure a proxy on Kali Linux, follow these steps:

  1. Open a terminal with Ctrl + Alt + T. Then, execute a command to set the proxy parameters. Replace 'proxy_address' and 'port' with your specific proxy details:
  2. To set the proxy using the environment, add the following lines to your ~/.bashrc file (or ~/.zshrc if using Zsh):
  3. To apply the changes, enter the following command in the terminal:
  4. If proxy authentication is required, include your credentials in the URL format:
  5. Verify that the proxy is correctly configured by running a test, such as using curl to access a webpage:

If the setup is correct, you'll notice changes in the URL response.

Configuration via GUI

  1. Right-click on the network icon located at the top right corner of your desktop and select "Network Settings".
  2. In the opened menu, choose "Wired Settings".
  3. Navigate to the "Network proxy" section.
  4. Select the “Manual” method to enable manual proxy configuration.
  5. Enter the address and port of your proxy server in the respective fields. If required, provide a username and password for authentication. Confirm your settings to apply the changes.
  6. To verify the functionality of the proxy, test it by opening a web page in your browser. If the page loads successfully, your proxy setup is correct.

You have now successfully set up a proxy on Kali Linux. Remember, only high-quality proxies can ensure proper anonymity and protect your personal data from unauthorized access.

Step-by-step proxy setup in Linux Mint

Linux Mint, based on Ubuntu, is known for its simplicity and user-friendly interface, resembling a Windows-style desktop. It offers various desktop environments like Cinnamon, MATE, XFCE, and KDE. Renowned for its stability, reliability, and easy installation, Linux Mint includes many built-in applications such as web browsers, office suites, and media players. The distribution actively supports its user community and provides tools for easy software installation and system configuration.

Particularly popular among Linux newcomers and those who prioritize ease of use, Linux Mint also requires proxy setup for reasons like IP concealment or secure internet connections. To set up a proxy, you should first determine the proxy type (HTTP, HTTPS, SOCKS, etc.) and gather the necessary details such as IP address, port, and authentication credentials if needed.

To install a proxy on Linux Mint, follow these steps:

  1. Open the terminal with the shortcut Ctrl+Alt+T.
  2. Enter the required commands, replacing placeholder values with your proxy details:
  3. If your proxy requires authentication, include credentials in the format:
  4. To apply the changes, either reboot your system or execute “source ~/.bashrc” in the terminal.
  5. Verify the proxy setup by testing your internet connection. Use the command curl If configured correctly, you should observe a changed IP address or gain access to region-restricted websites.

Proxy configuration in Linux Ubuntu

Ubuntu, one of the most popular Linux distributions, is built on the Debian distribution and designed for simplicity and accessibility for everyday users. It offers a comprehensive operating system with a graphical interface, pre-installed applications, and the versatility to add various software. Regular maintenance and updates ensure its reliability, stability, and security.

The OS features a range of desktop environments, including GNOME, KDE, and XFCE, allowing users to personalize their experience to suit individual tastes and preferences. Ubuntu is also notable for its extensive hardware and software support, with many manufacturers developing specific drivers and applications, simplifying installation and configuration.

Suitable for both novices and advanced users, Ubuntu is a dependable, stable, and user-friendly operating system. Additionally, it supports proxy installation and configuration, which can be done either through the system settings or the command line.

Configuration via system parameters

To configure a proxy in Ubuntu, follow these steps:

  1. Click on the gear icon in the side menu to open "System Settings".
  2. Navigate to the "Network" tab.
  3. Access the "Network Proxy" subsection.
  4. In the displayed window, choose “Manual” and input the proxy address and port into the respective fields and then save your changes.

Setup via command line

To set up a proxy server in Ubuntu using the command line, follow these steps:

  1. Open a command prompt.
  2. In the "/etc/apt/" directory, create a new file named "proxy.conf" (or another name you prefer) using the command.
  3. Open the file in a text editor and add the following lines, substituting "proxy_server" and "proxy_port" with your proxy server's real address and port:
  4. Add a series of lines to the "/.bashrc" or "/.bash_profile" file for these adjustments.
  5. Save your changes with Ctrl+O, exit the editor with Ctrl+X, and then update the environment variables using the command: source /etc/environment.
  6. If your proxy server requires authentication, include your credentials in the proxy address using the format:

Please note, storing passwords directly in command lines or files is not secure. It's advisable to use environment variables and avoid keeping passwords in command history.

Upon completing these steps successfully, the command will show information about the connection through the proxy. You can also confirm the setup by accessing a website in your browser to verify the proxy is working correctly.

How to set a proxy on Arch Linux

Arch Linux is a Linux operating system distribution tailored for advanced users and developers. It is grounded in principles of simplicity, minimalism, and flexibility. The installation process utilizes a straightforward tool known as "Arch Linux Installer" or "Arch Install", which allows users to select and configure only the necessary components of the OS. This lack of pre-installed programs enables users to craft and personalize their unique work environments.

A distinctive feature of Arch Linux is its "Rolling Release" update model. Unlike traditional systems that release updates in separate versions, Arch continuously updates, providing the latest software versions. This approach ensures users always have access to the newest software and libraries without the need for a full system reinstall.

Arch Linux stands out for offering complete control over system settings, allowing the installation of only essential software. It is renowned for its straightforward, minimalistic structure, a vibrant user community, support for the latest software versions, and the capability to operate through a virtual proxy server. This feature ensures IP anonymity, making internet browsing confidential and secure.

Setting up via Shadowsocks

To install and configure a proxy using Shadowsocks-libev on Arch Linux, follow these steps:

  1. Open a terminal and execute the command to install Shadowsocks-libev.
  2. Modify the Shadowsocks configuration file as per your requirements, for instance:
  3. Insert the example configuration provided, ensuring to replace the variable values with your specific data.
  4. Start the Shadowsocks client with the configuration you have set:
  5. Enable the client to automatically start when the system boots:

Once these steps are completed, the virtual proxy should be properly installed and operational. You can verify its functionality by accessing a webpage in your browser that was previously not accessible.

System level configuration

To configure a proxy using the "proxychains" package on Arch Linux, follow these instructions:

  1. Open the "/etc/environment" file for editing with the command “sudo nano /etc/environment”.
  2. Add the line for the "proxychains" package.
  3. Replace "your_proxy_address" and "your_proxy_port" with the specific values of your proxy server.
  4. Restart your computer or laptop to save and apply the changes.

Once your system reboots, the proxy should be active and ready for use. To verify its functionality, open your browser and navigate to a website of your choice.

If you need to set up a proxy for specific applications, such as Firefox, follow these steps:

  1. Open Firefox's main settings and navigate to the “Network Settings” section. Click on the “Configure” button.
  2. Select "Manual proxy configuration", enter the IP address and port, and then save the changes.

Step-by-step proxy configuration in Rocky Linux

Rocky Linux is a distribution of the Linux operating system, launched in 2021 as a response to the cessation of support for CentOS. Developed by Jens Dodgen, a former contributor to the CentOS project, Rocky Linux was conceived as a new OS based on RHEL (Red Hat Enterprise Linux) to provide CentOS users with a viable alternative.

The primary objective of Rocky Linux is to achieve near-complete compatibility with RHEL. This design philosophy enables users to seamlessly transition to Rocky Linux without the need to modify their existing software or infrastructure setups.

Among its key strengths, Rocky Linux boasts stability, security, automatic security updates, long-term support, and high compatibility with RHEL. The Rocky Linux community is also dedicated to developing comprehensive documentation, tools, and user support, making the OS approachable and user-friendly, even for those new to Linux. Additionally, similar to other Linux distributions, Rocky Linux supports Internet browsing via a proxy, which can be configured through the appropriate settings.

Entering parameters via terminal

To set up a proxy in Rocky Linux, here are the steps you should follow:

  1. Open a terminal and log in as the root user.
  2. Edit the "/etc/environment" file to include your proxy settings. Replace “proxy_server” and “proxy_port” with the actual values of your proxy server:
  3. If your proxy requires authentication, you can also add variables for the username and password in this file.
  4. To save your changes in the editor, press Ctrl + O, confirm the action, press Enter, and then exit the editor by pressing Ctrl + X.

Setting up APT

To configure proxy settings for individual programs or services in Rocky Linux, such as the APT (Advanced Package Tool) package manager, follow these steps:

  1. Create or edit the "/etc/apt/apt.conf" file. Replace "http://proxy_server:port" with your actual proxy server address and port:
  2. If you need to configure a proxy for HTTPS as well, include an additional entry in the file:
  3. In case your proxy requires authentication, insert your username and password in the file, replacing the placeholders with your actual authorization details:
  4. With these configurations, you can now use APT to manage packages through your proxy. For instance, to update your package list, you would use APT's update command:

By completing these settings, your proxy should be correctly configured on Rocky Linux. Ensure that you've accurately entered the proper IP address or domain name and the port for the virtual proxy in your settings.

Configuring a proxy in Linux varies slightly across versions, yet the fundamental steps are consistent:

  • Identify the proxy server type and its parameters, such as port, protocol, IP address, and, if necessary, login credentials.
  • In most Linux distributions, configure a proxy globally using system configuration files like “/etc/environment” or “/etc/profile”, or for individual users via “/.bashrc” or “/.profile”.
  • For command line configuration, use “export” or “setenv” commands to set environment variables with the proxy parameters.
  • Graphical desktop environments like GNOME or KDE provide a GUI for settings, accessible through Network Settings or Network Monitor menus.
  • After setting up, verify the proxy's functionality by attempting to open a web page or connecting to a remote server. This ensures correct setup and system operation.

Overall, while setting up a proxy in Linux requires some technical know-how, understanding the basic principles and following detailed instructions makes the process manageable.

Leave comment

No comments