Configure Proxy Settings in Debian

Configure Internet Proxy Settings in Debian 9.8

Internet Proxy settings is use for the client computers (Linux, Windows, MAC and etc) to connect with internet. Most of the enterprise sectors and well repute industries deploy proxy servers or proxy base firewall devices in infrastructure. The main reason to deploy the proxy servers monitor the client activities by their username specially in Domain Controller environment means Active Directory.

You can configure the internet proxy settings in Debian 9.8 through command line or graphical user interface, This is the configuration of internet proxy settings through command line.

Login with root user and password.

how configure internet proxy settings in debian

To view the IP address of Debian Linux 9.8 enter the below command. Here two IP addresses is showing. The first IP address is loop back address, loop back address use to test Network Interface Card (NIC). The 2nd IP address is Debian Linux 9.8 main IP address, its interface name is ens33

ip address

how configure internet proxy settings in debian

To configure the internet proxy settings in Debian Linux 9.8 type the below command. Change the IP address of proxy setting as per your own proxy server IP address.

export https_proxy=https://172.20.3.78:8080
export http_proxy=http://172.20.3.78:8080

how configure internet proxy settings in debian

Edit the File "Profile" that available in directory "etc". In Debian Linux operating system use nano editor, this is most suitable editor in Debian Linux.

nano /etc/profile

Add the below lines at the end of file. These lines set the proxy settings to the environment variables.

MY_PROXY_URL="http://172.20.3.78:8080/"
HTTP_PROXY=$MY_PROXY_URL
HTTPS_PROXY=$MY_PROXY_URL
FTP_PROXY=$MY_PROXY_URL
http_proxy=$MY_PROXY_URL
https_proxy=$MY_PROXY_URL
ftp_proxy=$MY_PROXY_URL
export HTTP_PROXY HTTPS_PROXY FTP_PROXY http_proxy https_proxy ftp_proxy

how configure internet proxy settings in debian


To save the file press Control with o. Its write out the file.

Control+o

To exit from file press Control with x. Its Exit from the file.

Control+x

After edit file "profile" type the below mention command to check the error in the file.

source /etc/profile

how configure internet proxy settings in debian

Internet Proxy Settings for apt command. APT stands for Advance Package Tool, It is use to install and remove the software's from internet for Debian and Ubuntu Linux operating system.

To Configure the apt.conf file use below path with nano editor. if apt.conf file is not available in below mention path, create a file with nano editor.

nano /etc/apt/apt.conf


Add the below lines of internet proxy settings for apt command.

# Add Proxy Settings
Acquire::http::proxy "http://172.20.3.78:8080/";
Acquire::https::proxy "https://172.20.3.78:8080/";
Acquire::ftp::proxy "ftp://172.20.3.78:8080/";

how configure internet proxy settings for debian

Press Control with o to write out the file.

Control+o

Press Control with x to exit from the file.

Control+x

Configure internet proxy setting for wget tool, wget is an open source tool. Install wget use below command.

apt install wget

wget is an open source tool to download files from the web, it uses the protocol like http, https and ftp. Configure the wget tool use the below path of file "wgetrc".

nano /etc/wgetrc


Add the below lines at the end of file.

# Proxy Settings
http_proxy = http://172.20.3.78:8080/
https_proxy = http://172.20.3.78:8080/
ftp_proxy = http://172.20.3.78:8080/

how configure internet proxy settings in debian

Press Control with o to write out the file.

Control+o

Press control with x to exit from file.

Control+x

Use below command to check internet proxy setting is working in Debian Linux 9.8.

apt-get update

Comments

  1. You are giving such interesting information. It is great and beneficial info for us, I really enjoyed reading it. Thankful to you for sharing an article like this. residential proxy

    ReplyDelete

Post a Comment