Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Docker Behind Proxy Network with Cntlm on Centos/RHEL
Install and Configure Cntlm:
1. Configure EPEL Repo and install cntlm
yum install cntlm
3. Generate hashes for password-less configuration and add one of the values to /etc/cntlm.conf
cntlm -u <user>@<domain> -H
3. vi /etc/cntlm.conf
Username <Username>
Domain <Domain>
PassNTLMv2 BCB555F5BA8709B8186C2A813C47A4BD # Only for user '<user>', domain '<domain>'
Proxy <ProxyServer>:<Port>
Port <Localport> #Default 3128
4. service cntlmd start
5. chkconfig cntlmd on
Install Proxy CA Certs:
1. yum install ca-certificates
2. update-ca-trust force-enable
3. Copy the Your Proxy CA Cert to /etc/pki/ca-trust/source/anchors/
4. update-ca-trust extract
Docker Proxy Settings
i. systemd(RHEL7):
a. cp /usr/lib/systemd/system/docker.service /etc/systemd/system/
b. Add a line that sets the environment variable in the unit above the ExecStart command:
c. systemctl daemon-reload
d. systemctl restart docker
ii. init(RHEL6):
a. Add below lines in /etc/sysconfig/docker
export http_proxy=""
export https_proxy=""
b. /etc/init.d/docker restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.