CentLinux | Learn How to Install CentOS/Rocky Linux Servers

Thursday, February 11, 2016

CNTLM: Configure Local Proxy for Yum in CentOS 6

CNTLM Configure Local Proxy for Yum in CentOS 6

This 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.

# yum repolist

Download package cntlm-0.92.3-1.x86_64.rpm from https://sourceforge.net/projects/cntlm/files/cntlm/

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

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

# vi /etc/cntlm.conf

Update username, domain, password and proxy address.

# mkdir /var/run/cntlm
# chown cntlm:cntlm /var/run/cntlm/
# service cntlmd start
# service cntlmd status

Configure yum to use CNTLM.

# 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.

# yum repolist

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

If you find this article useful? Consider supporting us by Buy Me A Coffee

1 comment:

© 2023 CentLinux. All Rights Reserved.