Configuring Linux to use Windows proxy
I need a Debian box (without X) to use a Windows proxy server with authentication. Normally I can do this with the env variable:
http_proxy=http://USERNAME:PASSWORD@PROXYIP:PROXYPORT
Unfortunately, the Windows domain is complicating things. In a nutshell, how do I configure Debian to use a proxy where authentication requires a Windows domain and username like domain\myname ?
2 Answers 2
I think that your «Windows Proxy» is a proxy that requires NTLM authentication (username, password, Windows domain). The typical example is Microsoft ISA server, the standard proxy server for large corporate environments running a Windows environment.
If you must go through an NTLM proxy, use CNTLM (sourceforge) between you and the company’s proxy. It stores your NTLM credentials and uses them to talk to the company’s proxy, presenting you with a local proxy (i.e. localhost:3128 ) you can connect to with no authentication required.
Your configuration would then look like:
- CNTLM set up to point to your company’s proxy, proxy.big-company.com:8080 , with your credentials user = jsmith , pass = god123 , domain = BIGCOMPANY , and local proxy port localhost:3128
- your HTTP_PROXY environment variable set to localhost:3128
RFC1738 defines the syntax of a URL, and it allows for characters to be encoded using hexadecimal representation. So if a double-backslash doesn’t work you should try
http_proxy=http://DOMAIN%5CUSERNAME:PASSWORD@PROXYIP:PROXYPORT
http_proxy=http://USERNAME%40DOMAIN:PASSWORD@PROXYIP:PROXYPORT
(noting that %5C is the encoding for a backslash and %40 is the encoding for the at sign.)