Linux proxy

From Ever changing code
Revision as of 13:58, 19 February 2016 by Pio2pio (talk | contribs) (Created page with "When you behind a firewall of a company proxy you may need to configure your Linux distro to use it in coure to have access to internet In the examples below depends on your...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

When you behind a firewall of a company proxy you may need to configure your Linux distro to use it in coure to have access to internet

In the examples below depends on your proxy server it can be used without or with authentication. Many times this could be your Active Directory login/password combination. It does not need to be user name that you logged on.

Temporary set up per command
sudo env sudo env http_proxy=http://proxyserver.local:8080 apt-get update
sudo env sudo env http_proxy=http://username:password@10.0.0.1:8080 apt-get update
Temporary set up per session, remember to use -E with sudo to preserve local environment variables
export http_proxy=http://proxyserver.local:8080/
export ftp_proxy=http://username:password@proxyserver.local:8080/
sudo -E apt-get update 
Permanent per user

Append enviroment variables to ~/.profile

http_proxy=http://proxyserver.local:8080/

Resources