Author Photo

Being a Linux Enthusiast and a Fan of Open Source Software, I created Ahmer’s SysAdmin Recipes blog to share my experiences with other System Administrators. The curiosity doesn’t let me stop; therefore, I am constantly trying to learn new software tools and techniques. Whereas I also have the passion and the patience to teach the others.

I am always ready to accept new challenges and wish to explore the areas, that I haven’t worked on. Please give me your feedback and help me improve this blog.

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

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

proxy=http://127.0.0.1:3128/

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.

CNTLM: Configure Local Proxy for Yum in CentOS 6


YOU MIGHT ALSO LIKE:

1 comment: