PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Squid und ncsa_auth



bert2002
19.08.05, 09:04
Guten Morgen,

ich hab dieses mal ein Squid Problem und zwar intresiert den absolut gar nicht das ich ein ncsa_auth haben will, hier mal meine Config:


http_port 8080
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
hosts_file /etc/hosts
auth_param basic program /usr/sbin/ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl kassel src 192.168.10.0/255.255.255.0
acl berlin src 192.168.11.0/255.255.255.0
acl ochtrup src 192.168.15.0/255.255.255.0
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow localhost
http_access allow kassel
http_access allow berlin
http_access allow ochtrup
acl users proxy_auth REQUIRED
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny to_localhost
http_access deny all
http_reply_access allow all
icp_access allow all
coredump_dir /var/spool/squid
visible_hostname proxy.xxxxxxxxxx.de


Hab ich wieder irgendwas kleines vergessen oder fehlt dieses mal was richtiges? Ich hab mich schon tot gesucht.... Es gibt keinerlei Fehlermeldung, er verbindet einfach als ob nichts wäre!

Oder empfiehlt ihr ne andere Authentification für Benutzer?

Danke! && MfG bert2002

drcux
19.08.05, 09:39
Dir fehtl noch eine acl:

acl authentification proxy_auth REQUIRED
http_access allow authentification

bert2002
19.08.05, 10:07
Will leider immer noch nicht, evtl was falsch an der ncsa oder an der passwd:



-rwxrwxrwx 1 squid squid 1446 2005-08-05 10:46 /etc/squid/passwd
-rwxr-xr-x 1 squid squid 52258 2005-05-04 15:05 /usr/sbin/ncsa_auth


Sollten ja stimmen...

Danke! && MfG bert2002

drcux
19.08.05, 11:59
keine Ahnung, arbeite selber mit pam_auth/smb_auth, hier meine squidconf für pam-auth, vieleicht probierst du das mal:

auth_param basic program /usr/sbin/pam_auth
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
acl authentification proxy_auth REQUIRED

acl verboten url_regex "/etc/squid/verboten"
acl erlaubt url_regex "/etc/squid/erlaubt"

http_access deny verboten !erlaubt
http_access allow authentification

bert2002
19.08.05, 12:37
Muss ich PAM irgendwie noch extra einrichten oder nimmt das die passwd?

Danke! && MfG bert2002

drcux
19.08.05, 13:07
er nimmt die /etc/passwd

bert2002
19.08.05, 15:01
pam will auch nicht *verzweifel*

Das gibts ja echt nicht....

MfG bert2002

drcux
19.08.05, 15:05
wie sieht denn deine komplette squid.conf aus? Fragt er garnicht nach einem Passwort, oder passiert ganix?

bert2002
19.08.05, 15:22
Hi,

also er fragt absolut nicht nach einem Passwort und verbindet sofort (also die Seite wird angezeigt).

Hier nocheinmal meine Komplette squid.conf


http_port 8080
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
hosts_file /etc/hosts
#auth_param basic program /usr/sbin/ncsa_auth /etc/squid/passwd
#auth_param basic children 5
#auth_param basic realm Squid proxy-caching web server
#auth_param basic credentialsttl 2 hours
#auth_param basic casesensitive off
auth_param basic program /usr/lib/squid/pam_auth
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
acl authentification proxy_auth REQUIRED
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl kassel src 192.168.10.0/255.255.255.0
acl berlin src 192.168.11.0/255.255.255.0
acl ochtrup src 192.168.15.0/255.255.255.0
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow localhost
http_access allow kassel
http_access allow berlin
http_access allow ochtrup
http_access allow authentification
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny to_localhost
http_access deny all
http_reply_access allow all
http_access allow authentification
icp_access deny all
coredump_dir /var/spool/squid
visible_hostname proxy.xxxx.de


Danke! && MfG bert2002

drcux
19.08.05, 16:35
Schreibe mal das "http_access allow authentification" direkt hinter "http_access allow localhost"

bert2002
19.08.05, 16:54
Hoi,

ohhh my god... Es geht.... du meine Güte..... das ist ja der Wahnsinn.... VIELEN DANK!!!

Also pam_auth geht nicht, er fragt zwar ab, aber nimmt keinen Usernamen und Passwort an.
Hab es dann gleich noch mit ncsa_auth ausprobiert und es funktioniert...

Nochmals Vielen Dank!!!

MfG bert2002

drcux
19.08.05, 18:24
Die Reihenfolge der http_accesss ist wichtig, wenn du mit "http_access allow kassel" das Netz Kassel erlaubst, wird danach für einen Rechner aus diesem Netz nichts mehr verboten, einmal erlaubt, immer erlaubt...

bert2002
19.08.05, 18:53
Ja, mann fällt immer wieder auf die Nase und das Aufsetehen macht Spaß :)

Jetzt bin ich umso glücklicher, nochmals Danke!

DANKE! && MfG bert2002