2796 views
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. ![](https://minio.mcl.math.ncu.edu.tw:443/hackmd/uploads/upload_2d805f8afbeedbf7e2e220891c8cd5af.png) # 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 ![](https://minio.mcl.math.ncu.edu.tw:443/hackmd/uploads/upload_c64abedf81d3c41b262b83f1a8c1d3e5.png) * Generate encrypted password by “cntlm –H” ![](https://minio.mcl.math.ncu.edu.tw:443/hackmd/uploads/upload_eee1217a77625c489f249bb7a3a4c987.png) * Copy the password to configuration file ![](https://minio.mcl.math.ncu.edu.tw:443/hackmd/uploads/upload_53c72066afa00f5655d815c8af505326.png) * Configure “proxy.alphanetworks.com”8080” as proxy server ![](https://minio.mcl.math.ncu.edu.tw:443/hackmd/uploads/upload_d6e0674acef287cf4893fe7b045df754.png) * Default listen port 3128 ![](https://minio.mcl.math.ncu.edu.tw:443/hackmd/uploads/upload_8e6e472f4a512dfa7f32d7b79136a0d8.png) * Modify “etc/rc.local” to run cntlm proxy at startup ![](https://minio.mcl.math.ncu.edu.tw:443/hackmd/uploads/upload_a0eb4d22bc9d77aff8a69174d870fbf3.png) * Reboot # Wget through cntlm proxy * Download directly the test file, http://cachefly.cachefly.net/100mb.test ![](https://minio.mcl.math.ncu.edu.tw:443/hackmd/uploads/upload_7fe06c2f6331eea62ece61a1146b5dcb.png) * Wget through cntlm proxy, set proxy to “127.0.0.1:3128” ![](https://minio.mcl.math.ncu.edu.tw:443/hackmd/uploads/upload_16ae613864a228ab7e324523b95bbcb8.png) * Edit /etc/yum.conf and add "proxy = http://127.0.0.1:3128“ ![](https://minio.mcl.math.ncu.edu.tw:443/hackmd/uploads/upload_1e0ce68594326a11728b6196145dd7d2.png) * Yum install software * #yum install vsftpd ![](https://minio.mcl.math.ncu.edu.tw:443/hackmd/uploads/upload_c69ec65f801b5a98a9bf5f8146d2b31e.png) # 以上就完成可以上網 新增環境變數 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