CNTLM: Configure Local Proxy for Yum in CentOS 6 - CentLinux


Thursday, 11 February 2016

CNTLM: Configure Local Proxy for Yum in CentOS 6

CNTLM Configure Local Proxy for Yum in CentOS 6This article is for the system administrators, who install Linux servers with minimal option and then install the required packages from yum repository. But if your network uses a Proxy Server to access the Internet, things get change. yum unable to see thru the proxy, and can not be used. CNTLM (Fast NTLM Authentication Proxy in C) is a local proxy server, that can be used with many linux utilities like yum, wget, etc.

In this article, we use CNTLM, to enable the yum to see thru Network Proxy Server.


System Specification:

We are considering that the reader may already know how to configure a yum repository. Please read our previous post Local Yum Repository in CentOS 6.5 to get an understanding of yum repository configuration.

CPU 3.4 Ghz (2 Core)
Memory 2 GB
Operating System CentOS 6.3 Server


Configure CNTLM on CentOS 6:

From your linux box, when you try to run it will give you a connectivity error.

[root@webserver-01 ~]# yum repolist

Download package cntlm-0.92.3-1.x86_64.rpm from

Copy the downloaded rpm to the linux server and install it.

Once the CNTLM is installed, configure it according to your need.

[root@webserver-01 ~]# vi /etc/cntlm.conf

Update username, domain, password and proxy address.

[root@webserver-01 ~]# mkdir /var/run/cntlm [root@webserver-01 ~]# chown cntlm:cntlm /var/run/cntlm/ [root@webserver-01 ~]# service cntlmd start [root@webserver-01 ~]# service cntlmd status

Configure yum to use CNTLM.

[root@webserver-01 ~]# vi /etc/yum.conf

and add following directive.


Now, try perform some action with yum command to check whether it can access the repository via CNTLM.

[root@webserver-01 ~]# yum repolist

Now our yum server using a route to public yum repositories, through CNTLM local proxy server.

1 comment: