how to use yum through ISA proxy using Active Directory account

If your system is behind a ISA proxy you need to do the following to get yum to work properly.

Step one: Download the cntlm rpm package

For 64 Bit CentOS 6.x

ftp://rpmfind.net/linux/epel/6/x86_64/cntlm-0.35.1-4.el6.x86_64.rpm

For 32 Bit CentOS 6.x

ftp://rpmfind.net/linux/epel/6/i386/cntlm-0.35.1-4.el6.i686.rpm

Step two: Install the rpm package

For 64 Bit

rpm -ivh cntlm-0.35.1-4.el6.x86_64.rpm

For 32 Bit

rpm -ivh cntlm-0.35.1-4.el6.i686.rpm

Step three: Edit /etc/cntlm.conf

vi /etc/cntlm.conf
Username userxxx   #Domain Account
Domain example.com #Domain Name
Password uiuzdf7/d #Password

Proxy 192.168.1.1:8080 #ISA Proxy

Save and quit

:wq

Step four: Make sure that cntlm now were the confi file is by typing:

cntlm -c /etc/cntlm.conf

Info about the switch -c:

cntlm -c 
    Configuration file. Command-line options, if used, override its single options or are added at the top of the list for multi options (tunnels, parent proxies, etc) with the exception of ACLs, which are completely overriden. Use /dev/null to disable any config file.

Step five: Edit yum.conf

vi /etc/yum.conf
proxy=http://127.0.0.1:3128/

Save and quit

:wq

Step six: Edit bash profile

vi .bash_profile

 Add the following lines :

export http_proxy=http://localhost:3128/
export https_proxy=${http_proxy}
export ftp_proxy=${http_proxy}

Save and quit

:wq

Step seven: log off and login again

logout or exit

Step eight: Run the command yum clean all to clear yum

yum clean all

Step nine: install the package you like

yum install <package name>

You can check out more information about yum:

I am a Senior System Administrator that work daily with Virtualization,Xenserver, Linux, IT automation, Ansible,Windows, Active Directory, Exchange and a lot more. Here you will find tips and trix from early junior, middle junior and senior to unique information of the topics I mentioned earlier. If you need help with something do not hesitate to contact me I will gladly help.

Tagged with: , , , , , , , ,