Debian http_proxy setting

Need to set a HTTP proxy within a Debian system ?

Assuming your proxy server is on and listening on port 3128, then the below may help …

( If you need authentication you can use username:password@ like you would in an old style web browser – e.g. http://username:password@ )


Add /etc/profile.d/ containing

export http_proxy=


Add /etc/apt/apt.conf.d/99HttpProxy containing

Acquire::http::Proxy "";


Edit /etc/wgetrc and add

http_proxy =

(some system commands rely on wget, and may not otherwise use an environment variable, e.g. debootstrap; the http_proxy setting should be present by default but commented out).

(This is all, in a round about way, relayed to the http proxy security vulnerability announced in July 2016 – see for more info)

8 thoughts on “Debian http_proxy setting”

  1. Hello David,

    thanks for this.

    Also something small, a typo at
    Acquire::http::Proxy “”;

    shouldn’t be? (semicolon missing?)
    Acquire::http::Proxy “”;

  2. hello, I’m started my first debian system, and, when I installed, he said that ” I you want to go outside… u need to setup you debian proxy? Is that right?
    I need to use my username:password@ipv4(conection with internet)

    Am I right?

  3. Dear Debian Experts,
    Recently I have added proxy setting as you mentioned in earlier mailto some one. I am facing problem on app installation particularly fsl (or any other apps) which is given below. Same problem happens even after as root.

    brain@neurodebian:~$ sudo apt-get install fsl-5.0-complete
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package fsl-5.0-complete
    E: Couldn’t find any package by regex ‘fsl-5.0-complete’

    Please help me to solve this problem.
    Thanks in advance

Leave a Reply

Your email address will not be published. Required fields are marked *