Setting up Proxy Settings on Debian
Solution 1
The following is for general proxy, apt and wget and you can remove the user:password@
for a proxy that doesn't require it:
For General proxy:
touch /etc/profile.d/proxy.sh
add the following:
export ftp_proxy=ftp://user:password@host:port
export http_proxy=http://user:password@host:port
export https_proxy=https://user:password@host:port
export socks_proxy=https://user:password@host:port
For APT proxy:
touch /etc/apt/apt.conf.d/99HttpProxy
add the following:
Acquire::http::Proxy "http://user:password@host:port";
For wget:
nano /etc/wgetrc
find and uncomment proxy lines or add them if not present
http_proxy = http://user:password@host:port
https_proxy = ...
...
Solution 2
The http proxy information, entered during the set up, should (normally) end up in the file /etc/apt/apt.conf
Acquire::http::Proxy "http://user:password@host:port/";
Related videos on Youtube
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Admin
Updated on September 18, 2022Comments
-
Admin almost 2 years
During installation of Debian I was asked for a Standard Proxy String in the form of
http://user:password@host:port/
, which I entered. apt-get ran and retrieved files during update, and now Debian is installed. However, when I tried runningsudo apt-get install ...
, I get an error message containing the messageCould not resolve proxy_host
whereproxy_host
is the host I entered during installation.Are there other places where I have to set up the proxy information?
-
Admin almost 12 years'Could not resolve' sounds more like a DNS or general networking problem. Can you resolve (and access, ping) the proxy host?
-
Admin almost 12 yearsHow do I test that? Everything worked fine during installation. -- Just read the ping part...
-
Admin almost 12 years@sr_ I'm not able to ping the proxy host.
-
Admin almost 12 yearsYour network settings might be incorrect, then. Have a look at the Debian Handbook's section on network configuration. (You could also be missing some firmware for your NIC.)
-
Admin almost 12 yearsHow does your machine get internet access? Post the output of
ifconfig
andcat /etc/network/interfaces
. Replace private information by placeholders if you like, but consistently (always the same placeholder for the same piece of information).
-
-
lorond over 7 yearsIt should be two colons
::
betweenhttp
andProxy