Skip to content

proxy

Ubuntu – How to fix update errors for a server behind of a proxy

If you’re behind of a proxy server and the IP address has changed (or proxy it’s a new node in your network topology) then probably when you’re trying to update your binaries then you’ll get a list of errors.
[bash]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/multiverse/i18n/Translation-en_US Unable to connect to 192.168.120.240:3128:
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/multiverse/i18n/Translation-en Unable to connect to 192.168.120.240:3128:
[/bash]
This happens because you’re unable to connect to Ubuntu mirrors. In order to fix this issue you have to edit apt.conf file settings.
[bash]
root@my-server:~# vi /etc/apt/apt.conf
Acquire::http::Proxy “http://192.168.230.99:3128”;
[/bash]