Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Please bear with me, I've searched as best I can with no apparent solutions.

I'm behind my companies firewall, we have a couple of proxy servers that we can use to get out onto the big wide internet. My company's IT group has kindly mirrored the main Debian repos inside the WAN.

I would like to use a couple of repos outside the WAN (i.e. the Internet). Is it possible to tell apt-get to use a proxy for these, and not for the others?

With both enabled and a proxy defined in apt.conf, it barfs on the stuff inside the firewall, and without a proxy defined it barfs on the sources outside the firewall.

There is some mention in the man page for apt.conf, but putting a proxy statement in the source.list file doesn't work (unless I've got the syntax wrong).

Thanks

Jerry

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Create file /etc/apt/apt.conf.d/01proxy with content like this:

Acquire::http::Proxy::external.repo.host "http://your.proxy.host/";

With the following settings all http requests to repositories on external.repo.host would be proxied via http proxy at your.proxy.host.

share|improve this answer
    
Thanks mate - that worked a treat :) –  ticktockhouse Feb 26 '13 at 9:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.