大网数据广告活动
服务器运维问答

How to get CNTLM gateway logs?

· 52CE 我爱测

I have CNTLM with gateway enabled running in a Linux machine. Many other machines on the same network are configured to use this as proxy. I searched for cntlm.log in Ubuntu and couldn't find such a file. How could, I see the log…

问题原文

原帖链接 · Rohith K D · CC BY-SA 4.0

I have CNTLM with gateway enabled running in a Linux machine. Many other machines on the same network are configured to use this as proxy.

I searched for cntlm.log in Ubuntu and couldn't find such a file.

How could, I see the logs of all the request coming through CNTLM (intercept the request)?

社区高分解答

原帖链接 · sebisnow · CC BY-SA 3.0

If you started cntlm as a system service on startup you can call sudo service cntlm status to see the current status and view the last ten connection messages, that should look something like this:

sschneid@sschneidschnee ~ $ sudo service cntlm status 
● cntlm.service - LSB: Authenticating HTTP accelerator for NTLM secured proxies
   Loaded: loaded (/etc/init.d/cntlm; bad; vendor preset: enabled)
   Active: active (running) since Mi 2018-04-04 08:29:25 CEST; 2h 7min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1483 ExecStart=/etc/init.d/cntlm start (code=exited, status=0/SUCCESS)
    Tasks: 11
   Memory: 3.1M
      CPU: 1.670s
   CGroup: /system.slice/cntlm.service
           └─1620 /usr/sbin/cntlm -U cntlm -P /var/run/cntlm/cntlm.pid

Apr 04 10:35:06 M0024 cntlm[1620]: 127.0.0.1 CONNECT media-cdn.ubuntu-de.org:443
Apr 04 10:35:06 M0024 cntlm[1620]: 127.0.0.1 CONNECT media-cdn.ubuntu-de.org:443
Apr 04 10:35:06 M0024 cntlm[1620]: 127.0.0.1 CONNECT media-cdn.ubuntu-de.org:443
Apr 04 10:36:18 M0024 cntlm[1620]: 127.0.0.1 CONNECT krebsonsecurity.com:443
Apr 04 10:36:19 M0024 cntlm[1620]: 127.0.0.1 CONNECT www.youtube.com:443
Apr 04 10:36:20 M0024 cntlm[1620]: 127.0.0.1 CONNECT www.google.com:443
Apr 04 10:36:21 M0024 cntlm[1620]: 127.0.0.1 CONNECT i.ytimg.com:443
Apr 04 10:36:21 M0024 cntlm[1620]: 127.0.0.1 POST http://ocsp.pki.goog/GTSGIAG3
Apr 04 10:36:33 M0024 cntlm[1620]: 127.0.0.1 CONNECT tiles.services.mozilla.com:443
Apr 04 10:36:34 M0024 cntlm[1620]: 127.0.0.1 CONNECT img-getpocket.cdn.mozilla.net:443

Generally, CNTLM logs to SYSLOG, so that would be another spot to search for your logged information.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-10-05)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0 / CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。