Cntlm Proxy Install and Configuration
===
如果遇到公司的proxy各種鎖 各種擋 可以試試
# 配備
* PC with 64Bit CPU (or Virtual Machine running 64Bit)
* CentOS 5.5 (64Bit) installed. (CentOS-5.5-x86_64-bin-DVD-1of2.iso)
# introduce
* Cntlm is an NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy intended to help you break free from the chains of Microsoft proprietary world.
* Cntlm has been tested against various ISA servers, WinGate, NetCache, Squid and Tinyproxy with and without NTLM auth.

# install
* Go to website http://sourceforge.net/projects/cntlm/files/ to download the file “cntlm-0.92.3.tar.gz”
* Untar the cntlm-0.92.3.tar.gz file
* #tar xvf cntlm-0.92.3.tar.gz
* Change directory to cntlm-0.92.3
* #cd cntlm-0.92.3
* Configure and generate makefile
* #./configure
* Make and make install
* #make
* #make install
* Location of configuration file “/etc/cntlm.conf”
* Modify username and domain
* Username => 10007272
* Domain => alphanetworks.com
* Comment Password

* Generate encrypted password by “cntlm –H”

* Copy the password to configuration file

* Configure “proxy.alphanetworks.com”8080” as proxy server

* Default listen port 3128

* Modify “etc/rc.local” to run cntlm proxy at startup

* Reboot
# Wget through cntlm proxy
* Download directly the test file, http://cachefly.cachefly.net/100mb.test

* Wget through cntlm proxy, set proxy to “127.0.0.1:3128”

* Edit /etc/yum.conf and add "proxy = http://127.0.0.1:3128“

* Yum install software
* #yum install vsftpd

# 以上就完成可以上網
新增環境變數
vi /etc/environment
http_proxy="http://172.19.176.119:5865"
https_proxy="https://172.19.176.119:5865"
ftp_proxy="ftp://172.19.176.119:5865"
vi /etc/bash.bashrc
export http_proxy=http://127.0.0.1:3128
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
source /etc/bash.bashrc
vi /etc/apt/apt.conf
Acquire::http::proxy "http://127.0.0.1:3128/";
Acquire::https::proxy "http://127.0.0.1:3128/";
Acquire::ftp::proxy "http://127.0.0.1:3128/";
Acquire::socks::proxy "http://127.0.0.1:3128/";
vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.100.37.100
netmask 255.0.0.0
gateway 10.1.1.254
broadcast 10.255.255.255
dns-search alphanetworks.com
dns-nameservers 172.19.10.100 172.19.10.99