Wednesday, 18 June 2008

apt-get behind ISA proxy server

Computer is behind company proxy server running Microsoft ISA. The http proxy address is 192.168.16.6 the port number is 8080. ubuntu 8.04 is installed, though firefox is working by setting up proxy and use domain/username password to get through, the apt-get cannot work properly whatever you try any methods. The solution is ntlm project.

  1. download 0.9.9.0.1 version.
  2. tar -zxvf ntlmaps-0.9.9.0.1
  3. modify the following parameters:
    PARENT_PROXY:192.168.16.6
    PARENT_PROXY_PORT:8080
    NT_DOMAIN:YourDomain
    USER:yourname
    PASSWORD:yourpassword
  4. $ ./ntlmaps-0.9.9.0.1/main.py &
    $ export http_proxy="http://127.0.0.1:5865"
    $ sudo apt-get update
  5. Now you can have built-in package installed
    apt-get install ntlmaps

  6. add proxy into apt configuration file: create
    /etc/apt/apt.conf.d/proxy
    with content:
    Acquire::http::Proxy "http://127.0.0.1:5865/";
  7. modify your general proxy setting and your synaptic proxy setting as well
note: my firefox seems faster to directly use proxy address 192.168.16.6 rather than using NTLM listening address "127.0.0.1:5865"

To reconfigure you ntlmaps using new proxy address:

sudo dpkg-reconfigure ntlmaps


References:

http://michaelcarden.net/blog/?p=58
http://www.lupaworld.com/912/viewspace_2210.html