View Full Version : how to adjust apt-get to use different internet connection than default

August 30th, 2008, 12:30 PM
i connected my pc to a new DSL connection, browsing worked fine after changing the settings in firefox, but apt-get (through command line)
rendered disconnected..how do i adjust the apt-get to be able to connect through the new connection?
i searched in the related configuration files but found nothing that might help..moreover, the file /etc/apt/aptconf is not present in my system, which seems to be a problem
any suggestions??

September 9th, 2008, 10:24 PM
are you behind a proxy ?

September 9th, 2008, 10:54 PM
actually i am :)
earlier, in order to get connected through the proxy, i defined two variables in my /etc/profile

export http_proxy=""
export ftp_proxy=""

so i commented these two lines..and everything went just fine on the DSL

now the problem is going in the reverse order..
when am back behind the proxy again, browsing is fine, but the apt-get is unable to reach the repositories..:confused:

suggestions ?? i really appreciate your help..

September 11th, 2008, 06:46 PM
System -> Adminstration -> Synaptic Package Manager, Then

Settings -> Network tab

September 11th, 2008, 09:18 PM
thanks..that should work
but assuming that am working in a text-mode login, how can i configure the apt-get manually ?? is it a problem not finding the
file in my system ??

September 11th, 2008, 09:30 PM
You can try to define the proxy in a proxy file. Create a file named proxy in /etc/apt/apt.conf.d and enter this in the file :

Acquire::http::Proxy "http://proxy_hostname:proxy_port";
Best wishes,

September 12th, 2008, 01:04 AM
so what does this acquire command does exactly ??
can i ommit the export lines using this method ?
i guess i need to replace the proxy_hostname with the proxy number..right?

September 12th, 2008, 11:42 AM
Yes you can ommit the export lines using this method and yes you need to replace proxy_hostname and proxy_port with your proxy information.

Best wishes,