Cntlm

From Iitmlug

Jump to: navigation, search

Contents

Introduction

section is copied from the freshmeat project page for cntlm.

Cntlm is an NTLM, NTLM2SR, NTLMv2 authenticating HTTP proxy. It takes the address of your parent proxy (or proxies) and opens a listening socket, forwarding each request to it (moving on in a circular list if the active parent proxy stops working). Along the way, a connection to the parent is created anew and authenticated or, if available, a previously cached connection is reused to achieve higher efficiency and faster responses. When set up, cntlm should be used as the primary proxy in your applications.

Debian install

The deb package for cntlm can be downloaded from freshmeat project page

The cntlm deb package can also be generated from the source. To build the package, you need some developer packages. So,

apt-get install dpkg-dev devscripts century 21 broker properti jual beli sewa rumah Indonesia

Then, ensure that Ntlmaps is working, and set the FTP proxy, setting the right port etc.:

export ftp_proxy="http://localhost:5865"

Next, browse to the cntlm Debian repository, and copy the link location of the latest .dsc file. For example, now, the link seems to be ftp://awk.cz/cntlm/debian/cntlm_0.34.1-1.dsc. Then, do this:

dget -x ftp://awk.cz/cntlm/debian/cntlm_0.34.1-1.dsc
cd cntlm-0.34.1
dpkg-buildpackage -rfakeroot

And that generates a neat deb in the upper directory. Just do

sudo dpkg -i cntlm-0.34.1-1_i386.deb

and edit /etc/ctnlm.conf, like in the Section 4 and you're done!

Ubuntu Install

A deb package install will not work. Do a Source Install (as follows).

Century 21 Broker Properti Jual Beli Sewa Rumah Indonesia

Source Install

This is the basic procedure to install cntlm on your GNU/Linux machine.

  1. Download the source tarball from http://cntlm.sourceforge.net
  2. Unzip with tar -xf <path-to-tarball>.
  3. cd into the resulting directory.
  4. Run ./configure.This will install cntlm in /usr/local.
  5. Edit the Makefile. Replace SYSCONFDIR=/usr/local/etc by SYSCONFDIR=/etc
  6. Type make
  7. Type sudo make install
  8. Edit the /etc/cntlm.conf file as mentioned in Section 5.
  9. Since the /etc/cntlm.conf was created by root, chances forfait mobile are that, cntlm will not be able to access the file. So, do: $chmod 644 /etc/cntlm.conf as root.
  10. Then, start cntlm by typing : $cntlm

It starts as a daemon.


Autostart during Logon

This init script is for all distributions. So it is very minimal. Use Gentoo init scripts on Gentoo Linux.

File: /etc/init.d/cntlm

#!/bin/bash

function startcntlm() {

   start-stop-daemon --start --quiet --exec /usr/bin/cntlm -- -P /var/run/cntlm.pid
   echo "cntlm has been started successfully."
 }

stopcntlm() {
   echo "Stopping cntlm..."
   start-stop-daemon --stop --pidfile /var/run/cntlm.pid
   echo "cntlm successfully stopped!"
 }

restartcntlm() {
   stopcntlm
   echo "Attempting to restart..."
   sleep 1
   startcntlm
 }


 case "$1" in
   'start')
       startcntlm
  ;;
   'stop')
       stopcntlm
  ;;
   'restart')
       restartcntlm
  ;;
   *)
 esac

Change the paths according to your installation. Finally use

update-rc.d cntlm multiuser 98

to automatically start forfait sans engagement cntlm at login.

Gentoo init scripts

File: /etc/conf.d/cntm

# /etc/conf.d/cntm: config file for /etc/init.d/cntlm

# Where is your cntlm.conf file stored?

CNTLM_CONFDIR="/etc"

# Where is cntlm binary file located?
CNTLM_BINARY="/usr/bin/cntlm"

# Any random options you want to pass to cntlm.
# See the cntlm(1) manpage for more info.

CNTLM_OPTS=""
# Set the pid file
CNTLM_PIDFILE="/var/run/cntlm.pid"

File: /etc/init.d/cntm

#!/sbin/runscript
# Distributed under the terms of the GNU General Public License v2
# $Header: Simple init script for cntlm by chittoor $


depend() {
	need net
}

checkconfig() {

	if [ ! -e "${CNTLM_BINARY}" ] ; then
		eerror "You need an ${CNTLM_BINARY} file to run cntlm"
		eerror "Please check the location where you have installed"
		eerror "cntlm and modify /etc/conf.d/cntlm appropriately"
		return 1
	fi

	if [ ! -e "${CNTLM_CONFDIR}/cntlm.conf" ] ; then
		eerror "You need an ${CNTLM_CONFDIR}/cntlm.conf file to run cntlm"
		eerror "Please check your config in /etc/conf.d/cntlm"
		return 1
	fi
}

start() {
	local cntlmopts=""
	checkconfig || return 1
	ebegin "Starting ${SVCNAME}"
	cntlmopts="${cntlmopts} ${CNLM_OPTS} -c ${CNTLM_CONFDIR}/cntlm.conf -P ${CNTLM_PIDFILE}"

	start-stop-daemon --start --exec "${CNTLM_BINARY}" \
	    -- ${cntlmopts}
	eend $?
}

stop() {
	ebegin "Stopping ${SVCNAME}"
	start-stop-daemon --stop --exec "${CNTLM_BINARY}" \
	    --quiet
	eend $?
}

Modify the file /etc/conf.d/cntlm according to your installation. Run

# rc-update add cntlm default

to have cntlm start automatically at boot

Remove NTLMAPS

Finally remove ntlmaps if you feel like by typing on a Debian or Ubuntu Machine. aptitude purge ntlmaps

Editing /etc/cntlm.conf

Once the install is successful, edit /etc/cntlm.conf. Replace it with this:

###start cntlm.conf
#
# 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	<your username>
Domain		iitm.ac.in
#Password	<your password>		# Use hashes instead (-H)
#Workstation	netbios_hostname	# Should be auto-guessed

Proxy		hproxy.iitm.ac.in:3128
#Proxy		10.217.112.42:8080

#
# This is the port number where Cntlm will listen
#
Listen		<your choice of port here>

#
# 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
#
#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/

#
# Headers which should be replaced if present in the request
#
#Header		User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)

#
# Tunnels mapping local port to a machine behind the proxy
# 
#Tunnel		1122:awk.cz:443
##end cntlm.conf

Add your username and password, of course! Then, run cntlm -M http://10.93.0.35:3128 The last two lines of output are like:

------------[Profile 0]------------
 Auth            NTLMv2
 PassNTLMv2      <some-string>
-----------------------------------

Copy this to /etc/cntlm.conf, replacing Auth LM by Auth NTLMv2.


Cntlm is an NTLM, NTLM2SR, NTLMv2 authenticating HTTP proxy. It takes the address of your parent proxy (or proxies) and opens a listening socket, forwarding each request to it (moving on in a circular list if the active parent proxy stops working). Along the way, a connection to the parent is created anew and authenticated or, if available, a previously cached connection is reused to achieve higher efficiency and faster responses. When set up, cntlm should be used as the primary proxy adipex in your applications weight loss pills African Mango Reviews.




Personal tools

sl
דומיין בעברית  דומיין  דומין  תוכנה לניהול  קשרי לקוחות  CRM, ניהול קשרי לקוחות  דומין בעברית  פורומים  ספרדית  גיבוי