Difference between revisions of "Linux proxy"

From Ever changing code
Jump to navigation Jump to search
(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...")
 
Line 4: Line 4:


;Temporary set up per command
;Temporary set up per command
  sudo env sudo env http_proxy=http://proxyserver.local:8080 apt-get update
  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
  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
;Temporary set up per session, remember to use -E with sudo to preserve local environment variables

Revision as of 14:58, 19 February 2016

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 http_proxy=http://proxyserver.local:8080 apt-get update
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