您的位置:首页 > 运维架构 > Linux

linux cntlm代理的配置

2016-06-13 17:12 211 查看
在linux下需要配置代理上网,如yum, wget等。如果直接配置windows下的代理,如下:

export http_proxy=http://<proxyIP>:<port>

使用wget时会出错,407 Proxy need authentication, 网上搜了一下用一个叫ntlmaps的东西,结果不好使。于是又换了cntlm一切ok。

linux下使用windows代理的代理. 网址: https://sourceforge.net/projects/cntlm/
Step 1: install
rpm -ivh cntlm-0.92.3-1.x86_64.rpm

Step 2: configuration
refer to cntlm.conf(/etc) as example.
to restart cntlm:

ps -ef|grep cntlm

kill -9 <pid>

cntlm

Step 3: env
change .bashrc, or export http_proxy
export http_proxy=http://127.0.0.1:3128

Step 4: verify

[root@localhost ~]# netstat -nl |grep 3128
tcp 0 0 127.0.0.1:3128 0.0.0.0:* LISTEN
wget -d -v www.baidu.com

NOTE: 如果不work, 在linux上打开firefox, 手动设置代理, 然后提示输入用户名密码后,再进行上面的配置.

ok!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: