Those who work with Linux Debian are no strangers to the aptitude system (or its derivative, the apt-get utility). Among other things, this system reaches out to the internet to sync its package lists and download installation files.
Now let's imagine a situation where it has to do this through a proxy server, and when the OS was installed we didn't know about that and didn't set the corresponding option.
Here I'll show you how to make aptitude (apt-get) go online through a proxy.
Go to /etc/apt/apt.conf.d and create a file called proxy with the following contents:
Acquire::http::Proxy "http://user:pass@192.168.1.1:8080/";
Acquire::ftp::Proxy "ftp://user:pass@192.168.1.1:8080/";
Acquire::http::Timeout "120";
Here, instead of 192.168.1.1:8080, specify the IP address and port of the proxy server through which the aptitude system should access the internet. Instead of user and pass, specify the login and password for the proxy server.
If no login and password are required, the proxy file will look like this:
Acquire::http::Proxy "http://192.168.1.1:8080/";
Acquire::ftp::Proxy "ftp://192.168.1.1:8080/";
Acquire::http::Timeout "120";
Comments