Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

I've set up a squid forward proxy to cache all internet requests. I have a public ip and opened port 3128. Now I just need to set my ubuntu server to force all internet connections to pass through this proxy, using the ip address and port number.

I know this command which will make ubuntu access the internet via a proxy, but I was told it wasn't permanent.

export http_proxy=""

Which command do I need to use to force ubuntu to go through this proxy regardless of reboots or sessions?


share|improve this question

fter some googling. i was able to fix this:

original: /etc/apt/apt.conf

    Acquire::http::Proxy "xx.xx.xx.xx:8080";

modified apt.conf


    Acquire::http::Proxy "http://xx.xx.xx.xx:8080";
share|improve this answer

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.