apt-get behind NTLM proxyPosted: August 13, 2010
apt-get seems to not want to work when sat behind a proxy server that uses NTLM authentication.
For configuration of yum see here
To get apt-get to work you must pass it through another proxy that passes the credentials properly
This is done via cntlm
Download the relevant package and install in the normal way.
For debian dpkg -i package_name
Details of the software can be found here but the basic setup is as such
We configure cntlm to listen on a port on the local server, this then passes the credential to the proxy server with the correct credentials.
We then configure apt-get to use the local server proxy. All will be come clear when you look at the install instructions.
configure the following file with an editor. remember to sudo if you are not root.
Change the following entries
Add the proxy server address of your network
Proxy x.x.x.x:port number
Note that if you proxy listens on port 80 you must put port 80 in the port number
Change the port number
Listen I set mine to port 8000 but you can set it to anything
To test if everything is ok
cntlm -T cntlm.txt -v -f -s
Read the file to determine if the proxy is OK to start on the port selected
It will have an error if the listener can not be started
You will have to remove the file if you wish to rerun the command again
If you need to stop and start the proxy then
Now we have to configure apt-get to use this proxy
and the following line (this is based on that you choose port 8000 for the listening port)
There have been some issues with header files waiting add the following file
Add the following line
Try to run apt-get update, this should now work.
If it fails remeber to start cntlm as per the instructions above.
To get wget working, you must point the proxy at the cntlm configuration
Therefore to get this working the command would be
This can be added to the /~ .bashrc file so that this command does not have to be issued