Linux command
cntlm 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start with config file
cntlm -c [/etc/cntlm.conf]
Run in foreground debug mode
cntlm -v -f
Detect NTLM settings
cntlm -M http://test.com
Generate password hash
cntlm -H -d [DOMAIN] -u [username]
Start SOCKS5 proxy
cntlm -O [1080]
Specify proxy and credentials
cntlm -u [user] -d [DOMAIN] -p [pass] [proxy:port]
说明
cntlm is an NTLM/NTLMv2 authenticating HTTP proxy that sits between applications and a corporate proxy server. It handles the NTLM authentication handshake transparently, so applications only need to use a simple unauthenticated proxy connection. The proxy caches authenticated connections for reuse, providing significant speed improvements over alternatives that re-authenticate on every request. It supports NTLM, NTLMv2, NTLM2SR, and basic authentication methods, with automatic detection of the strongest supported method via the -M flag. In addition to HTTP proxying, cntlm provides SOCKS5 proxy support and TCP/IP tunneling through the corporate proxy, enabling protocols beyond HTTP to traverse the proxy infrastructure. Password hashes can be stored instead of plaintext passwords for improved security.
参数
- -u _user_
- Proxy username
- -d _domain_
- Proxy domain
- -p _password_
- Proxy password
- -a _auth_
- Auth type: NTLMv2, NTLM2SR, NT, NTLM, LM
- -M _url_
- Magic NTLM detection mode
- -H
- Generate password hashes
- -c _file_
- Configuration file
- -l _addr:port_
- Listen on port
- -O _addr:port_
- Enable SOCKS5 proxy
- -N _pattern_
- No-proxy pattern list
- -f
- Run in foreground
- -v
- Verbose/debug mode
- -g
- Allow gateway mode (non-local connections)
- -P _pidfile_
- Create PID file
FAQ
What is the cntlm command used for?
cntlm is an NTLM/NTLMv2 authenticating HTTP proxy that sits between applications and a corporate proxy server. It handles the NTLM authentication handshake transparently, so applications only need to use a simple unauthenticated proxy connection. The proxy caches authenticated connections for reuse, providing significant speed improvements over alternatives that re-authenticate on every request. It supports NTLM, NTLMv2, NTLM2SR, and basic authentication methods, with automatic detection of the strongest supported method via the -M flag. In addition to HTTP proxying, cntlm provides SOCKS5 proxy support and TCP/IP tunneling through the corporate proxy, enabling protocols beyond HTTP to traverse the proxy infrastructure. Password hashes can be stored instead of plaintext passwords for improved security.
How do I run a basic cntlm example?
Run `cntlm -c [/etc/cntlm.conf]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -u _user_ do in cntlm?
Proxy username