Friday 27 October 2017

Proxy settings for HTTP/FTP/APT/RSYNC/GIT/CURL/YUM/DNF

#HTTP Proxy/FTP Proxy

# export http_proxy=http://<proxy-server-ip-or-dns-name>:<Port-Number>

# export ftp_proxy=http://<proxy-server-ip-or-dns-name>:<Port-Number>

# vi /etc/bash.bashrc
export http_proxy=http://<proxy-server-ip-or-dns-name>:<Port-Number>/
export ftp_proxy=http://<proxy-server-ip-or-dns-name>:<Port-Number>/


# Proxy Settings in APT on Ubuntu Linux

# vi /etc/apt/apt.conf
Acquire::http::Proxy "http://<proxy-server-ip-or-dns-name>:<Port-Number>";

#RSYNC

# export RSYNC_PROXY="http://<proxy-server-ip-or-dns-name>:<Port-Number>”


# For Git Clone 

#vi ~/.gitconfig
[http]
    proxy = http://username:password@<proxy-server-ip-or-dns-name>:<Port-Number>



#Yum Proxy setting

vi /etc/yum.conf

proxy=http://<proxy-server-ip-or-dns-name>:<Port-Number>
proxy_username=username
proxy_password=password


#DNF proxy setting

vi /etc/dnf/dnf.conf

proxy=http://<proxy-server-ip-or-dns-name>:<Port-Number>
proxy_username=username
proxy_password=password



#Curl

vi ~/.curlrc

proxy = http://username:password@<proxy-server-ip-or-dns-name>:<Port-Number>