Squid Authentifizierung: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
Zeile 4: Zeile 4:
 
*apt install apache2-utils
 
*apt install apache2-utils
 
==User anlegen==
 
==User anlegen==
* Erstes Anlegen
+
;Erstes Anlegen
 +
*htpasswd -B -c /etc/squid/passwordfile sterling
 
<pre>
 
<pre>
*htpasswd -B -c /etc/squid/passwordfile sterling
 
 
New password:
 
New password:
 
Re-type new password:
 
Re-type new password:
Zeile 12: Zeile 12:
 
</pre>
 
</pre>
 
* Später
 
* Später
* '''htpasswd -B /etc/squid/passwordfile ''neuer.user'' '''
+
*htpasswd -B /etc/squid/passwordfile ''neuer.user''  
  
 
==Konfiguration der Authentifizierung==
 
==Konfiguration der Authentifizierung==
* '''vim /etc/squid/squid.conf'''
+
*vim /etc/squid/squid.conf
 
<pre>
 
<pre>
 +
...
 
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwordfile
 
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwordfile
 
auth_param basic children 20 startup=0 idle=1
 
auth_param basic children 20 startup=0 idle=1

Aktuelle Version vom 17. April 2025, 13:52 Uhr

Authentifizierung

  • Wird genutzt um sich bei dem Browser zu authentifizieren, und somit bestimmte Seiten freigeschaltet werden können

Install

  • apt install apache2-utils

User anlegen

Erstes Anlegen
  • htpasswd -B -c /etc/squid/passwordfile sterling
New password:
Re-type new password:
Adding password for user sterling
  • Später
  • htpasswd -B /etc/squid/passwordfile neuer.user

Konfiguration der Authentifizierung

  • vim /etc/squid/squid.conf
...
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwordfile
auth_param basic children 20 startup=0 idle=1
auth_param basic concurrency 0
auth_param basic credentialsttl 2 hours
auth_param basic realm xinux-user-access
auth_param basic casesensitive off

erstellen der acl

acl xinux-user proxy_auth REQUIRED

erstellen der http_access

http_access allow xinux-user
  • Nun müssen sich alle erstellten User authentifizieren