Proxy Settings

Accessing the internet from purely internal networks

Proxy Environment Variables

Global proxy environment variables are defined in /etc/profile.d/proxy.sh in CentOS. These variables can also be set at the user level in ~/.bashrc.

export http_proxy=http://wwwproxy.uni-muenster.de:3128
export https_proxy=http://wwwproxy.uni-muenster.de:3128
export no_proxy="localhost,127.0.0.1,0.0.0.0,.wwu.de,.uni-muenster.de,.wwu.io,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,169.254.0.0/16"

Note: sudo must be called with the parameter -E to preserve the environment variables of the current user. However, this includes variables like $HOME, which may have unwanted side effects.

Packagemanager Yum and DNF

The following line must be included in /etc/yum.conf or /etc/dnf/dnf.conf depending on which you use:

proxy = http://wwwproxy.uni-muenster.de:3128

Docker

The proxy settings for docker must be configured in /etc/systemd/system/docker.service.d/10-proxy.conf:

[Service]
Environment="http_proxy=http://wwwproxy.uni-muenster.de:3128" "https_proxy=http://wwwproxy.uni-muenster.de:3128" "no_proxy=localhost,127.0.0.1,0.0.0.0,.wwu.de,.uni-muenster.de,.wwu.io,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,169.254.0.0/16"

The docker service must be restarted via systemctl daemon-reload && systemctl restart docker for the new settings to take effect.