Posts

Showing posts with the label cntlm

Cntlm: No connection could be made because the target machine actively refused it 127.0.0.1:3128

Cntlm  is a great tool to create an internet proxy. I wrote about how to configure it here .  However, I recently encountered the following error message when trying to access a local REST service: No connection could be made because the target machine actively refused it 127.0.0.1:3128 The port number rang a mental bell as it was configured as the listening port for Cntlm. I deactivated Cntlm: 1. Stopped the windows service 2. Reverted the proxy settings in my browser No luck. I tried rebooting the server, but that did not resolve the problem. More investigation revealed that Application Pool account for my custom web site was caching the Cntlm connection. I connected to the machine as the Application Pool account and noticed that the proxy settings for cntlm where still there. I was able to reset the settings to resolve the problem. Alternatively, I could change the Application Pool account.

How do I create a internet proxy for an account that does not have internet access?

Image
The development domain for my current client does not given its account internet access. Thi can be overcome in Powershell scripts as follows: $user = " MyDomain\MyAccount " $password = ConvertTo-SecureString –String " password " –AsPlainText -Force $cred = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $user, $password [System.Net.WebRequest]::DefaultWebProxy.Credentials = $cred but it becomes a problem is the current user credential is used do download files or if the proxy server blocks certain actions. A fantastic tool to resolve this problem is  cntlm , which allows you create a local internet proxy. The configuration (simplified) is as follows: 1. Download and install the software. 2. Set the username and domain in the .ini file. Remove the password setting 3. Type the Url of internet proxy.pac file in a browser and get proxy urls. Add these urls to the config file and remove the 'sample' entries. 4. Ex...