How to Configure Proxy Settings on CentOS / RHEL / Fedora

Windows Articles

How to backup and restore BCD in Windows 10

Hi! Boot Configuration Data (BCD) is a set of data where the system boot information is stored. In addition, from there the operating systems...

How To Install and Configure Master BIND DNS Server On Ubuntu 20.04

Today we are going to learn that how to install and configure Master BIND DNS server on Ubuntu 20.04. As you all know that...

Diskpart is a very useful tool for managing storage in Windows 10.

Hello! Diskpart is an internal tool included in Windows systems that allows you to manage storage units. Indeed, it is possible to manage internal...

How To Install MySQL 8.0 On Ubuntu 20.04

Today we are going to learn that how to Install MySQL 8.0 on Ubuntu 20.04. MySQL is one of the most popular and commonly...

How to Update to MIUI 12 via Fastboot

Greetings friends. The new version of the Android-based operating system MIUI 12 released this year, is still being deployed with some devices missing. On...

Introduction:

In this tutorial, we are going to learn that how can we configure our Proxy Settings on CentOS 8 / 7 | RHEL 8 / 7 & Fedora 31/30/29 Linux machines. You’ll learn that how can you configure access to Internet via proxy server on any Linux system. You will be required to include the use of wget, lynx, or curl utilities from a command line as well as package management tools.

Configure System-Wide Proxy Settings on Desktop UI

To make changes on the system control panel, users of Fedora / CentOS & RHEL Linux who are running Desktop environment , can follow the below steps to configure proxy on their systems.

Go to Settings

Navigate to Network >Network Proxy

Choose Manual from the menu and provide your proxy settings as you want.

Populate proxy values for http, https, & ftp. If you are using SOCKS proxy, you will also need to set it accordingly. As you will finish making changes, your system will update them automatically within no time.

Proxy on Firefox Browser

By Default you are provided with the Firefox browser on CentOS Linux so you can configure its proxy settings manually.

You can update your proxy settings by

Navigating to Preferences

Go To Network Settings> Manual Proxy Configuration

Here you can set your proxy settings. After finishing settings click on the “OK” button to save them.

Configure System-Wide Proxy Settings on CLI

To configure system-wide proxy setting with the help of CLI, we’ll create a shell script file under /etc/profile.d/proxy.sh. It will apply the settings to all logged-in users permanently.

sudo vi /etc/profile

Now add your proxy settings.

set proxy config via profie.d - should apply for all users

PROXY_URL="http://10.10.1.10:8080/"
export http_proxy="$PROXY_URL"
export https_proxy="$PROXY_URL"
export ftp_proxy="$PROXY_URL"
export no_proxy="127.0.0.1,localhost"
For curl
export HTTP_PROXY="$PROXY_URL"
export HTTPS_PROXY="$PROXY_URL"
export FTP_PROXY="$PROXY_URL"
export NO_PROXY="127.0.0.1,localhost"

Note: 10.10.1.10 is the IP of proxy server, it can be replaced easily with the host name.
8080 is the proxy server port.

If you are prompted to provide authentication details, follow the below syntax:

http://username/

Now, source the file to make use of the changes and settings you’ve applied in the proxy settings.

source /etc/profile

Make sure you’ve done correctly

env | grep -i proxy

Setting Proxy for YUM | DNF package manager

The settings we’ve done above are for the Application & command-line tools. We have to set proxy settings for YUM and DNF packages separately.

Set Proxy Settings for DNF-Fedora / CentOS / RHEL 8

$ sudo vim /etc/dnf/dnf.conf
Add
proxy=http://proxyserver:port

Proxy Setting for CentOS 6/7

 $ sudo vim /etc/yum.conf
proxy=http://proxyserver:port

RHEL users also need to set proxy for accessing RHSM content.

$ sudo vi /etc/rhsm/rhsm.conf
Configure
proxy_hostname = proxy.example.com
proxy_port = 8080

In case, your server require authentication you will have to set it .

user name for authenticating to an http proxy, if needed
proxy_user =
password for basic http proxy auth, if needed
proxy_password =

These are the basic proxy settings. To use Internet on CentOS / RHEL 7/8 & on Fedora Linux systems you will be required to use Proxy Server.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to backup and restore BCD in Windows 10

Hi! Boot Configuration Data (BCD) is a set of data where the system boot information is stored. In addition, from there the operating systems...

How To Install and Configure Master BIND DNS Server On Ubuntu 20.04

Today we are going to learn that how to install and configure Master BIND DNS server on Ubuntu 20.04. As you all know that...

Diskpart is a very useful tool for managing storage in Windows 10.

Hello! Diskpart is an internal tool included in Windows systems that allows you to manage storage units. Indeed, it is possible to manage internal...

How To Install MySQL 8.0 On Ubuntu 20.04

Today we are going to learn that how to Install MySQL 8.0 on Ubuntu 20.04. MySQL is one of the most popular and commonly...

How to Update to MIUI 12 via Fastboot

Greetings friends. The new version of the Android-based operating system MIUI 12 released this year, is still being deployed with some devices missing. On...
x