1

As the title says i have got some issues with Cntlm. I'm working with the 0.92.3 version and launched from the source code. What i am trying to do is starting Cntlm as a standalone proxy with localhost configuration, to browse internet and launch applications (e.g. Skype).

I am working on Mint and the command uname -a gives:

Linux Jarvis 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Those are the steps i did before asking:

./configure
make
sudo make install

everything goes fine. I also export http, https and ftp proxy with:

export http_proxy = http://127.0.0.1:3128 
export https_proxy = https://127.0.0.1:3128 
export ftp_proxy = https://127.0.0.1:3128

and also everything goes fine. What remains is to launch cntlm, doing with:

sudo cntlm -v -f

it keeps information passed by cntlm.conf correctly, and display it's staying in the foreground.

I go in my browser (firefox) and configure it for the proxy, setting 127.0.0.1 as http proxy and 3128 as the port.

when i launch a browser tab a do a test research under the proxy, the terminal starts to elaborate data, but after a few seconds it keeps saying that:

cntlm[11605]: Serious error during accept: Too many open files

until i press ctrl+C.

this is the cntlm.conf i have:

#
# Cntlm Authentication Proxy Configuration
#
# NOTE: all values are parsed literally, do NOT escape spaces,
# do not quote. Use 0600 perms if you use plaintext password.
#

Username    myUsername
Domain      localhost
Password    password
# NOTE: Use plaintext password only at your own risk
# Use hashes instead. You can use a "cntlm -M" and "cntlm -H"
# command sequence to get the right config for your environment.
# See cntlm man page
# Example secure config shown below.
# PassLM          1AD35398BE6565DDB5C4EF70C0593492
# PassNT          77B9081511704EE852F94227CF48A793
### Only for user 'testuser', domain 'corp-uk'
# PassNTLMv2      D5826E9C665C37C80B53397D5C07BBCB

# Specify the netbios hostname cntlm will send to the parent
# proxies. Normally the value is auto-guessed.
#
# Workstation   netbios_hostname

# List of parent proxies to use. More proxies can be defined
# one per line in format <proxy_ip>:<proxy_port>
#

Listen      127.0.0.1:3128
#Listen     192.168.0.1:3128

#Proxy      10.0.0.41:8080
#Proxy      10.0.0.42:8080
Proxy       127.0.0.1:3128

# List addresses you do not want to pass to parent proxies
# * and ? wildcards can be used
#
NoProxy     localhost, 127.0.0.*, 10.*, 192.168.*

# Specify the port cntlm will listen on
# You can bind cntlm to specific interface by specifying
# the appropriate IP address also in format <local_ip>:<local_port>
# Cntlm listens on 127.0.0.1:3128 by default
#

# If you wish to use the SOCKS5 proxy feature as well, uncomment
# the following option. It can be used several times
# to have SOCKS5 on more than one port or on different network
# interfaces (specify explicit source address for that).
#
# WARNING: The service accepts all requests, unless you use
# SOCKS5User and make authentication mandatory. SOCKS5User
# can be used repeatedly for a whole bunch of individual accounts.
#
SOCKS5Proxy 5000
#SOCKS5User username:password

# Use -M first to detect the best NTLM settings for your proxy.
# Default is to use the only secure hash, NTLMv2, but it is not
# as available as the older stuff.
#
# This example is the most universal setup known to man, but it
# uses the weakest hash ever. I won't have it's usage on my
# conscience. :) Really, try -M first.
#
#Auth       LM
#Flags      0x06820000

# Enable to allow access from other computers
#
#Gateway    yes

# Useful in Gateway mode to allow/restrict certain IPs
# Specifiy individual IPs or subnets one rule per line.
#

Allow       127.0.0.1
Deny        0/0

# GFI WebMonitor-handling plugin parameters, disabled by default
#
#ISAScannerSize     1024
#ISAScannerAgent    Wget/
#ISAScannerAgent    APT-HTTP/
#ISAScannerAgent    Yum/

# Tunnels mapping local port to a machine behind the proxy.
# The format is <local_port>:<remote_host>:<remote_port>
# 
#Tunnel     11443:remote.com:443

i tried many times to change configuration but it really doesn't change. If i put 127.0.0.1:3128 as default Proxy (what i am trying to do) it starts well but ends in a loop.

what should i do to make it works and where is the problem? Thanks in advance.

Basionkler
  • 13
  • 7

1 Answers1

1

please refer this

It is obvious you will get loop with this configuration! you kept your Listen and proxy port the very same!So whatever it listens it proxies to self and it is cumulative!

Enter windows proxy server name and port in Proxy! not your local host!

Username    Enter-your-username-here
Domain      Enter-your-domain-here
Password    Enter-your-password-here

Proxy       proxyhost:proxyport
Proxy       proxyhost:proxyport

NoProxy     localhost,127.0.0.1

Listen      3128

i.e. if you want maven to use cntlm, put localhost:3128 in maven settings.xml so that it would get proxy to your proxyhost:proxyport with defined domain username and passowrd.

positivecrux
  • 1,307
  • 2
  • 16
  • 35
  • 1
    Second link is dead https://stackoverflow.com/a/34987501/1802348 May someone with edit rights remove it ? – kalou.net Oct 11 '19 at 15:54