cntlm in linux

After installing cntlm in linux and configure it properly, you need to specify http_proxy environment variables in order to use it in command line. To make these environment variables accessible to all users, create a file cntlm_proxy.sh in /etc/profile.d. Any .sh files in this folder will be sourced by /etc/profile. The content of the file is as follows:

export http_proxy=127.0.0.1:3128

export ftp_proxy=$http_proxy

export https_proxy=$http_proxy

(if you need to set these environment variable for all users, you can put them in /etc/bashrc)

To start cntlm, run: /usr/sbin/cntlm -c /etc/cntlm.conf

If you use yum in CentOS, you need to update /etc/yum.conf to add the proxy server information:

ex. proxy=http://localhost:3128

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s