woensdag 22 april 2015

Linux - Proxy Settings

  • Use terminal to open /etc/environment using a text edit app assuperuser - e.g. in terminal type sudo gedit /etc/environment     (enter password when asked)
  • Add the following lines to the text document that appears, replacing myproxy.server.com with your proxy address
http_proxy=http://myproxy.server.com:8080/
https_proxy=http://myproxy.server.com:8080/
ftp_proxy=http://myproxy.server.com:8080/
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
HTTP_PROXY=http://myproxy.server.com:8080/
HTTPS_PROXY=http://myproxy.server.com:8080/
FTP_PROXY=http://myproxy.server.com:8080/
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"
  • Save the file, then  navigate to /etc/apt/apt.conf.d/ and create a new file there named 95proxies and include the following code (remembering to add your own proxy address in place of myproxy.server.com)
Acquire::http::proxy "http://myproxy.server.com:8080/";
Acquire::ftp::proxy "ftp://myproxy.server.com:8080/";
Acquire::https::proxy "https://myproxy.server.com:8080/";
Reboot and once you have logged in you will find that your proxy settings are in place for Network Settings, apt-get and Update manager. It's a pain but it does give you an idea about using the command line in a Linux terminal.

Additional setting
If you need to authenticate on your proxy, you need to stick a <username:password> in front of the proxy server address
For instance
http://myusername:mypassword@myproxy.mydomain.com:8080/