cntlm:未成功打开任何代理服务端口

cntlm:未成功打开任何代理服务端口

我正在尝试在 Ubuntu VM 上设置 CNTLM,但不断遇到上述错误消息。

以下是我采取的步骤:

安装 CNTLM

$ ls
cntlm_0.92.3-0ubuntu0.1_i386.deb cntlm.conf
$ sudo dpkg -i cntlm_0.92.3-0ubuntu0.1_i386.deb
Selecting previously unselected package cntlm.
(Reading database ... 29361 files and directories currently installed.)
Unpacking cntlm (from cntlm_0.92.3-0ubuntu0.1_i386.deb) ...
Setting up cntlm (0.92.3-0ubuntu0.1) ...
Adding system user `cntlm' (UID 106) ...
Adding new user `cntlm' (UID 106) with group `nogroup' ...
Creating home directory `/var/run/cntlm' ...
Starting CNTLM Authentication Proxy: cntlm.
Processing triggers for ureadahead ...
Processing triggers for man-db ...

复制我的cntlm.conf到正确位置

$ cat cntlm.conf
Username        [redacted]
Domain          AUS
Workstation     WS0585249
PassLM          [redacted]
PassNT          [redacted]
PassNTLMv2      [redacted]
Proxy           [redacted]:8080
NoProxy         localhost, 127.0.0.*, 10.*, 192.168.*
Listen          3125
$ sudo cp cntlm.conf /etc/cntlm.conf

重新启动 CNTLM

$ sudo invoke-rc.d cntlm restart
Stopping CNTLM Authentication Proxy: cntlm.
Starting CNTLM Authentication Proxy: failed!

重新启动服务失败,尝试手动启动吗?

$ sudo cntlm -vc /etc/cntlm.conf
section: global, Username = '[redacted]'
section: global, Domain = 'AUS'
section: global, Workstation = 'WS0585249'
section: global, PassLM = '[redacted]'
section: global, PassNT = '[redacted]'
section: global, PassNTLMv2 = '[redacted]'
section: global, Proxy = '[redacted]:8080'
section: global, NoProxy = 'localhost, 127.0.0.*, 10.*, 192.168.*'
Adding no-proxy for: 'localhost'
Adding no-proxy for: '127.0.0.*'
Adding no-proxy for: '10.*'
Adding no-proxy for: '192.168.*'
cntlm: No proxy service ports were successfully opened.
Exitting with error. Check daemon logs or run with -v.

VM 是 precise32 的新副本,通过 Windows 7 主机上的 Vagrant 和 VirtualBox 运行。

我也尝试过更改 CNTLM 监听的端口和 CNTLM 的旧版本 (0.91~rc6)。我没能找到有关特定错误消息的大量信息,而且我在这方面的技能几乎用尽了。

这里的主要目的只是针对 NTLM 公司代理进行身份验证,以便可以使用apt-get和之类的功能wget。我愿意接受其他可以实现此目标的解决方案。

答案1

这似乎是 CNTLM 中的一个错误。最终通过在配置文件末尾添加一个空行解决了该错误。

Cntlm 似乎会忽略配置文件的最后一行,无论其内容如何,​​因此只需在末尾添加一个空白行即可解决此错误。

我在这里提交了一个错误报告:https://sourceforge.net/p/cntlm/bugs/59/

相关内容