Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cntlm Proxy Authentication Issue with Correct Credentials

I have followed the following steps:

  1. Updated my cntlm.ini file with correct proxy information.
  2. Updated my cntlm.ini file with correct username, password and domain information.
  3. Updated my Environmental Variables with the following:

    setx -m HTTP_PROXY "http://127.0.0.1:3128"

    setx -m HTTPS_PROXY "http://127.0.0.1:3128"

    setx -m PATH "%PATH%;C:\Python34\Scripts"

  4. Generated the correct hashes for my username, domain and password and updated the cntlm.ini file with them.

  5. Started the Cntlm service.

After doing all of this, I run the following code and get a HTTP OK Code: 302.

cntlm -c cntlm.ini -I -M http://www.google.co.za

Then, when I attempt to download a Python module using pip, I get the following error:

  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )',))': /simple/sphinx/

I've checked and re-checked my details entered into cntlm.ini, any ideas what this could be?

like image 404
Cornel Verster Avatar asked Oct 19 '25 14:10

Cornel Verster


1 Answers

I have found that when adding hashes to your cntlm.ini file, you need to comment out the Password line. When I commented out the password line i.e:

# Password [my password]

Cntlm could again connect normally to the proxy.

like image 185
Cornel Verster Avatar answered Oct 22 '25 04:10

Cornel Verster



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!