4

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)?

2 Answers 2

5

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.

5

In addition to @SSchneids answer you may use journalctl and filtering by unit via -u:

[14:15:16][root@host]:~# journalctl -u cntlm.service
-- Logs begin at Fri 2018-06-22 13:42:39 CEST, end at Fri 2018-06-29 13:20:30 CEST. --
Jun 28 14:07:08 host.example.com systemd[1]: Starting CNTLM HTTP Accelerator For NTLM Secured Proxies Authenticator...
Jun 28 14:07:08 host.example.com systemd[1]: Started CNTLM HTTP Accelerator For NTLM Secured Proxies Authenticator.
Jun 28 14:07:08 host.example.com cntlm[45762]: Daemon ready
Jun 28 14:07:08 host.example.com cntlm[45762]: Changing uid:gid to 1000:1000 - Success
Jun 28 14:08:32 host.example.com cntlm[45762]: Using proxy proxy.example.com:8080
Jun 28 14:09:37 host.example.com cntlm[45762]: 127.0.0.1 GET http://www.example.com/
Jun 28 14:09:37 host.example.com cntlm[45762]: 127.0.0.1 CONNECT www.example.com:80
Jun 28 14:10:10 host.example.com systemd[1]: Stopping CNTLM HTTP Accelerator For NTLM Secured Proxies Authenticator...
Jun 28 14:10:10 host.example.com systemd[1]: Stopped CNTLM HTTP Accelerator For NTLM Secured Proxies Authenticator.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.