Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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).



share|improve this question
up vote 10 down vote accepted

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

With the following settings all http requests to repositories on would be proxied via http proxy at

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

Your Answer


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.