Showing posts with label Technology. Show all posts
Showing posts with label Technology. Show all posts

CNTLM in Office

If you are facing a proxy problem , CNTLM is a general option everybody considers. But the working of CNTLM is not always guaranteed. I myself get confused every time I need to use it.

What problem are we actually talking about?

While working in offices and restricted environments where firewalls and other invisible barriers stop your requests from going out, you sometimes need a way to temporarily jump over that barrier to get your job done . Example: You might face them while trying to install using pip in command line, trying to clone a personal git repository. 

What is CNTLM exactly?

I think this is best answered by the creator himself. Refer this. You can download it from here. For configuration, you an refer this. There are many uses of CNTLM but I am trying to solve my own problem here. So I will stick to breaking office barriers for now ;) .

Why do I need to use it :

1) Python package installations using PIP
2) Git operations : Cloning and pushing to server.

Here are a set of steps I came up with, which mostly works . You must follow them exactly in the same sequence mentioned here:

  • Launch Internet Explorer . 
  • Go to Tools > Internet Options > Connections > LAN Settings
  • Under Proxy Server, make sure 'Address' should be 'localhost' and proxy should be the one defined in cntlm config file (cntlm.ini)
         Check for the line in , "Listen 3128" to cross check .  (I'm using 3128). 
  • Save and close.
  • Launch a command prompt. 
  • Execute these 2 commands one by one 

git config --global http.proxy http://localhost:3128
git config --global https.proxy https://localhost:3128

  •  Type "net start cntlm". Wait for it to start. 

Operation Specific Instructions

  • If you want to use the PIP command, type
          pip install --proxy=localhost:3128 package-name

          Note: This is important>  --proxy=localhost:3128  

  • For git operations , you don't need above step. 

In order to stop cntlm (if you ever need to), this is the command:

"net stop cntlm"

Total Pageviews