Configure Proxy in Linux CLI Session

If your Proxy Servers requires you to import any Certificate, then copy it to /etc/pki/ca-trust/source/anchors/ & run update-ca-trust extract

Now create a file with following content-

http_proxy='http://username:password@proxyip:port'
https_proxy='https://username:password@proxyip:port'
ftp_proxy='ftp://username:password@proxyip:port'


save it as "setproxyenv" or any suitable name.

To invoke proxy settings on demand - run - source /path/to/setproxyenv

To permanently use proxy in CLI save the proxy details in /etc/environment

Create another file named "unsetproxyenv" with following content -

export http_proxy=""
export https_proxy=""
export ftp_proxy=""

To disable proxy settings on demand - run source /path/to/unsetproxyenv




Comments

Popular posts from this blog

Access Oracle OCI Object Storage through GUI Client

Instance OS Baseline Configuration Runbook

Accessing OCI Compute Instances Using VNC Console (Instance Console Connection)