Yum e Proxy ISA

[quote=ranzo]
scusa ma quando dici che firefox ti fa autenticare intendi che ti compare la popup che richiede user e passwd ?[/quote]

si esatto

Strano non dovrebbe altrimenti che ci sta a fare ntlm aps ??
Significa che il proxy locale non si autentica in automatico al proxy isa.

innanzitutto metti l’ip al posto del nome nel server.cfg
e riprova con firefox, non dovrebbe apparire la popup

altrimenti prova a rimettere user e passwd in /etc/yum.conf

e facci sapere.

[quote=ranzo]
Strano non dovrebbe altrimenti che ci sta a fare ntlm aps ??
Significa che il proxy locale non si autentica in automatico al proxy isa.

innanzitutto metti l’ip al posto del nome nel server.cfg
e riprova con firefox, non dovrebbe apparire la popup

altrimenti prova a rimettere user e passwd in /etc/yum.conf

e facci sapere.[/quote]

allora configurazioni attuali

root@lx01 ~ # cat /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
proxy=http://localhost:5865

This is the default, if you make this bigger yum won’t see if the metadata

is newer on the remote and so you’ll “gain” the bandwidth of not having to

download the new metadata and “pay” for it by yum not having correct

information.

It is esp. important, to have correct metadata, for distributions like

Fedora which don’t keep old packages around. If you don’t like this checking

interupting your command line usage, it’s much better to have something

manually check the metadata once an hour (yum-updatesd will do this).

metadata_expire=90m

PUT YOUR REPOS HERE OR IN separate files named file.repo

in /etc/yum.repos.d

root@lx01 ~ #

root@lx01 ~ # cat /mnt/shared_point/ntlmaps-0.9.9/server.cfg
#========================================================================
[GENERAL]

LISTEN_PORT:5865

If you want APS to authenticate you at WWW servers using NTLM then just leave this

value blank like PARENT_PROXY: and APS will connect to web servers directly.

You can specify more than one proxy by leaving a space between each one, and

APS will detect when one fails and automatically fail-over to the next. EG:

#PARENT_PROXY:first_proxy second_proxy third_proxy

And NOTE that NTLM cannot pass through another proxy server.

PARENT_PROXY:proxy.gruppo.x.local

PARENT_PROXY_PORT:80

APS will poll the upstream proxy and attempt to fail-over to a new one if it doesn’t

get a response within an appropriate time frame. The amount of time that it will

wait for a response before attempting fail-over is specified, in seconds, below:

PARENT_PROXY_TIMEOUT:15

Set to 1 if you want to grant this authorization service to clients from other computers.

NOTE: all the users from other hosts that will be using you copy of APS for authentication

will be using your credentials in NTLM auth at the remote host.

ALLOW_EXTERNAL_CLIENTS:0

If you want to allow some other but not all computers to use your proxy for authorization,

just set ALLOW_EXTERNAL_CLIENTS:0 and put friendly IP addresses here.

Use space as a delimiter.

NOTE that special addesses don’t work here (192.168.3.0 for example).

FRIENDLY_IPS:

Requested URLs are written to “url.log” file. May be useful.

URL_LOG:0

When a network service listens for connections, there is a maximum number of connection

attempts to that service that the underlying OS will allow to backlog waiting for a response

before the OS will start dropping new connection attempts with ‘Connection refused’. The

standard method of determining the maximum number of backlogged connections is to use the

SOMAXCONN constant, which is supposed to represent the maximum number that an OS will support

(for example, 5 on Windows 2000 Pro, and 200 on Windows 2000 server). However, because this

is a statically compiled value in a Python distribution, usually this instead represents the

the most conservative value (5 on all Windows platforms, and 128 on the GNU/Linux variant I

tried). So if you are running (for example) a massively threaded/parallel download manager,

the default value of, say, 5, or whatever SOMAXCONN happens to be set to, may be too low and

cause some connections to fail. The value below can be set to any integer (it seems that

Python just silently caps values above the hard limit for the underlying platform), or it can

be set to the special value of SOMAXCONN (i.e. MAX_CONNECTION_BACKLOG:SOMAXCONN), to use

whatever this value happens to be set to in your Python build. Setting this higher than

necessary may cause APS to consume more memory than you needed to.

MAX_CONNECTION_BACKLOG:5

#========================================================================
[CLIENT_HEADER]

This section describes what and how the server should change in the clients headers.

Made in order to prevent parent proxy from seeing that you are using wget instead of IE5.5

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, /
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)

for windows 2000 emulation :wink:

User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT5)

You can uncomment these chages in client’s header to mimic IE5+ better, but in this case

you may expirience problems with *.html if your client does not really handle compression.

#Accept-Encoding: gzip, deflate

#========================================================================
[NTLM_AUTH]

Optional value, if leaved blank then APS will use gethostname() to determine

host’s name.

NOTE1: If you Linux host name differs from Windows host name then it may be that

MS server wont recognize you host at all and wont grant you access

to resources requested. Then you have to use this option and APS will use

this name in NTLM negotiations.

NOTE2: There are several reports that you can successfully use “foreign” host name

here. Say, if user may access a resource from ‘host1’ and may not from ‘host2’

then there is a chance that APS running on ‘host2’ with NT_HOSTNAME:host1 will

be able to be granted access to the restricted resource. However use this on

you own risk as such a trick may be considered as a hack or something.

NT_HOSTNAME:

Windows Domain.

NOTE: it is not full qualified internet domain, but windows network domain.

NT_DOMAIN:Y.LOCAL

What user’s name to use during authorization. It may differ form real current username.

If you enable NTLM_TO_BASIC, below, you can either leave this blank or simply

hash it out.

USER:giando

Password. Just leave it blank here and server will request it at the start time,

or, if you enable NTLM_TO_BASIC, below, you can either leave this blank or simply

hash it out, and you won’t be prompted for a password at start time.

PASSWORD:1234ABCD

These two options replace old FULL_NTLM option.

NTLM authentication consists virtually of two parts: LM and NT. Windows95/98 use

only LM part, WindowsNT/2000 can use NT and LM or just NT part.

Almost always using just LM part will be enough. I had several reports

about LM and NT requirement and no about just NT.

So try to setup 1, 1 only if you have enough reasons to do so and when you understand

what you are doing.

0, 0 is an illegal combination

NOTE: if you change these options then you have to setup flag option accordingly.

LM_PART:1
NT_PART:0

Highly experimental option. See research.txt for details.

LM - 06820000

NT - 05820000

LM + NT - 07820000

NTLM_FLAGS: 06820000

This option makes APS try to translate NTLM authentication to very usual “Basic”

scheme. Almost all http clients know it. With this option set to 1 user will be requested

by his browser to enter his credentials and these username and password will be used by

APS for NTLM authentication at MS Proxy server or Web server.

In such a case different users can use one runnig APS with their own credentials.

NOTE1: currently translation works so it allows only one try for entering

username/password. If you make a mistake you will have to restart you browser.

NOTE2: With debug:1 basic username/password will be written in log file in clear

text format. I could try hide it, but the basic scheme is so weak that anybody

who had access to APS would be able to get it.

NTLM_TO_BASIC:0

#========================================================================
[DEBUG]

Set this to 1 if you want to see debug info in many log files. One per connection.

DEBUG:0

Set this to 1 to get even more debug info.

BIN_DEBUG:0

Set this to 1 to see some strange activity on screen. Actually you won’t want it.

SCR_DEBUG:0

Not actually a debug option but gives you some details on authentication process

into *.auth logs. Also see research.txt.

AUTH_DEBUG:0

root@lx01 ~ #

con l’IP è uaguale …

*/

Per favore ricapitoliamo altrimenti perdiamo il filo del discorso

con l’attuale configurazione

1 - Apri firefox. Edit --> preferences --> Advanced --> Network --> Settings --> manual proxy configuration
metti localhost e porta 5865
usa lo stesso proxy per gli altri protocolli
non usare il proxy per localhost, 127.0.0.1, lx01
e poi dai ok
2 - connettiti a http://www.google.com
3 - che succede ?
4 - ti chiede nuovamente user e pwd ?
5 - la vedi la pagina di google ?

se ti chiede user e pwd e non vedi la pagina di google c’è qualcosa che non va nella configurazione di ntlm

a yum ci pensiamo dopo

[quote=ranzo]
Per favore ricapitoliamo altrimenti perdiamo il filo del discorso

con l’attuale configurazione

1 - Apri firefox. Edit --> preferences --> Advanced --> Network --> Settings --> manual proxy configuration
metti localhost e porta 5865
usa lo stesso proxy per gli altri protocolli
non usare il proxy per localhost, 127.0.0.1, lx01
e poi dai ok
2 - connettiti a http://www.google.com
3 - che succede ?
4 - ti chiede nuovamente user e pwd ?
5 - la vedi la pagina di google ?

se ti chiede user e pwd e non vedi la pagina di google c’è qualcosa che non va nella configurazione di ntlm

a yum ci pensiamo dopo[/quote]

vedo la pagina di google, ma solo in parte, come se ci mettesse un sacco di tempo ad aprirsi …

per favore esegui tutti gli step che ti ho descritto e rispondi a tutte le domande anche se ripetute :slight_smile:

[quote=ranzo]
Per favore ricapitoliamo altrimenti perdiamo il filo del discorso

con l’attuale configurazione

1 - Apri firefox. Edit --> preferences --> Advanced --> Network --> Settings --> manual proxy configuration
metti localhost e porta 5865
usa lo stesso proxy per gli altri protocolli
non usare il proxy per localhost, 127.0.0.1, lx01
e poi dai ok
2 - connettiti a http://www.google.com
3 - che succede ?
4 - ti chiede nuovamente user e pwd ?
5 - la vedi la pagina di google ?

se ti chiede user e pwd e non vedi la pagina di google c’è qualcosa che non va nella configurazione di ntlm

a yum ci pensiamo dopo[/quote]

allora

per la 1 ho fatto quello che mi hai detto.
per la 2 quando apro un indirizzo mi appare il popup dell’autenticazione a localhost:5865
per la 3 il popup è già completo di nome utente e password nella forma y.local\giando e poi la password gli do OK e mi appare la pagina bianca (firefox in basso mi dice completato).
per la 4 il popup appare solo la prima volta che apro firefox e non appare finche non chiudo e riapro, se mi connetto ad un altro indirizzo firefox in basso mi dice “Lettura di nomsito” e rimane cosi.
per la 5 vedo una pagina bianca vuota o come ti pare.

ok aps non è configurato correttamente

in server.cfg attiva il debug

DEBUG:1

e manda l’output e vediamo che dice

EDIT:

anche io sono dietro un proxy isa ma senza autenticazione e pertanto non uso ntlm APS

comunque per togliermi lo sfizio ho provato ntlm APS e funziona alla perfezione.

a questo punto credo sia solo questione di configurare bene APS

grazie per la pazienza.
senti ho attivato il debug, ma il log dove lo dovrei trovare??

de nada :slight_smile:

i log sono nella dir di ntlm ed hanno un nome tipo “127.0.0.1.???” però cerca di non postarli tutti :slight_smile:
prova ad intercettare il problema e vedi se riesci ad isolare lo scorcio di log che indica qualcosa che non và

alle brutte posta tutti log.

quando cerco di allegare i file di log e clikko su update mi dice “Protector detects attacking actions” ho provato anche a rinominare i file in .jpg e .gif, ma nulla

un piccolo sforzo per carcare solo parte di log che contiene un errore ? :slight_smile:

una cosa che appare in tutti i log è

*** Got Error 407 - “Proxy authentication required”.

1 - controlla user e passwd
2 - prova a mettere il dominio davanti l’utente

[quote=ranzo]
1 - controlla user e passwd
2 - prova a mettere il dominio davanti l’utente[/quote]

ho provato sia con

dominio\utente

che con

utente@dominio

il risultato nn cambia

attenzione … per dominio non devi mettere lo stesso valore che metti in NT_DOMAIN:

ad esempio nel mio caso

NT_DOMAIN:nomeazienda.com

dominio utente = DIR

puoi chiedere ad un collega che gli propone explorer ad esempio

[quote=ranzo]
attenzione … per dominio non devi mettere lo stesso valore che metti in NT_DOMAIN:

ad esempio nel mio caso

NT_DOMAIN:nomeazienda.com

dominio utente = DIR

puoi chiedere ad un collega che gli propone explorer ad esempio[/quote]

allora in windows:
l’utente che accede al proxy è giando sul dominio x.local quindi avremo

x.local\giando oppure [email protected]

mentre l’utente che accede a Window in CTRL-ALT-CANC è

dogian sul dominio y.local

quindi avremo

y.local\dogian oppure [email protected]

(affermazione banale :stuck_out_tongue: )

beh prova con tutte le combinazioni … :slight_smile:

devi giocare un po con sto cavolo di aps perché risolto questo “we are on the horse” :stuck_out_tongue:

salve a tutti,
allora ho provato a modificare il file server.cfg in questo modo:

PARENT_PROXY_PORT:80
PARENT_PROXY:ip_del_proxy
NT_DOMAIN:dominio_dell’utente_che_fa_logon_in_Windows
USER:dominio_utente_del_proxy\utente_del_proxy
PASSWORD:password_dell’utente_del proxy

e aprendo il firefox, guardando i log e provando a navigare succede che a volte alcuni siti me li apre ed altri no, a volte lo stesso sito me lo apre ed altre volte no. Nei log si note a volte quando mi apre i siti accetta la connessione al proxy e di autentica regolarmente, altre vole viene negata con l’errore 407