SQUID avec filtrage Active Directory

klawee Messages postés 67 Statut Membre -  
JEXALO Messages postés 222 Statut Membre -
Bonjour,

Je vous expose mon problème:

Je suis en train de mettre en place un Proxy SQUID qui aura pour pour but de filtrer les accès a Internet.

J'ai donc installé une distribution Ubuntu, que j'ai joins à mon domaine. Lorsque je fais Wbinfo -u et -g mes users et groupes s'affichent bien.

J'ai ensuite installé mon SQUID puis mon SQUIDGUARD.

Dans mon fichier Squid.conf j'ai fais en sorte qu'un mot de passe soit demandé et j'ai spécifié le groupe qui était autorisé a se connecter sur Internet.

Cependant j'ai beau rentrer des identifiants, l'authentification ne fonctionne pas. Il me met que je ne suis pas autorisé.

Il doit y avoir un problème dans mon fichier de conf mais je ne le vois pas.

----------------------------------------------------------------------------------------------------------
SQUID.CONF
----------------------------------------------------------------------------------------------------------
auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp
auth_param ntlm children 5
auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic
auth_param basic children 5
auth_param basic realm SQUID
auth_param basic credentialsttl 2 hours

auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp --require-membership-of=MONDOMAINE.COM\\acces-internet-full

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
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 CONNECT method CONNECT
acl ntlm proxy_auth REQUIRED
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow ntlm
http_access allow localhost
http_access deny all
http_port 3128
coredump_dir /var/spool/squid3
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320
append_domain .mondomaine.com

-----------------------------------------------------------------------------------------------------------------
SQUIDGUARD
-----------------------------------------------------------------------------------------------------------------

#
# CONFIG FILE FOR SQUIDGUARD
#
# Caution: do NOT use comments inside { }
#

dbhome /var/lib/squidguard/db
logdir /var/log/squidguard

#
# TIME RULES:
# abbrev for weekdays:
# s = sun, m = mon, t =tue, w = wed, h = thu, f = fri, a = sat

time workhours {
weekly mtwhf 08:00 - 16:30
date *-*-01 08:00 - 16:30
}

#
# SOURCE ADDRESSES:
#

src admin {
ip 192.168.176.132

}

src reseau {
ip 192.168.176.1-192.168.176.250
}

}

#
# DESTINATION CLASSES:
#

dest good {

dest local {
}

dest porn {
}

#dest adult {
# domainlist BL/adult/domains
# urllist BL/adult/urls
# expressionlist BL/adult/expressions
# redirect http://admin.foo.bar.de/cgi-bin/blocked.cgi?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&targetgroup=%t&url=%u
#}

#
# ACL RULES:
#

acl {

admin {
pass any
}

reseau {
pass local none
}

default {
pass local none
redirect http://192.168.176.132
}
}
------------------------------------------------------------------------------------------------------------------

J'espère que vous pourrez m'aider! Merci d'avance.

8 réponses

  1. Malekal_morte- Messages postés 178136 Date d'inscription   Statut Modérateur, Contributeur sécurité Dernière intervention   24 712
     
    Salut,

    Regarde dans les logs Squid.
    1
  2. JEXALO Messages postés 222 Statut Membre 157
     
    Bonjour,

    Je me permets de m'immiscer dans votre conversation juste pour vous dire que ce n'est certes pas grâce au forum que vous avez résolu votre problème, mais qu'il serait vraiment sympa de votre part de partager votre solution.
    En effet je pense et vous serez peut-être d'accord avec moi que la connaissance s'accroit lorsque on la partage. Alors oui vous n'avez pas trouvé d'aide cette fois sur le forum mais peut-être une prochaine fois :)
    Merci à vous.
    Cordialement.
    1
  3. klawee Messages postés 67 Statut Membre 1
     
    dans mon access.log j'ai ça:

    1392019812.425 0 192.168.176.122 TCP_DENIED/407 3769 CONNECT aus3.mozilla.org:443 - HIER_NONE/- text/html
    1392019812.470 1 192.168.176.122 TCP_DENIED/407 4066 CONNECT aus3.mozilla.org:443 - HIER_NONE/- text/html
    1392019812.562 65 192.168.176.122 TCP_DENIED/407 4401 CONNECT aus3.mozilla.org:443 - HIER_NONE/- text/html
    1392019812.929 0 192.168.176.122 TCP_DENIED/407 3785 CONNECT snippets.mozilla.com:443 - HIER_NONE/- text/html
    1392019812.932 0 192.168.176.122 TCP_DENIED/407 4082 CONNECT snippets.mozilla.com:443 - HIER_NONE/- text/html

    Et dans cache.log j'ai ça:

    2014/02/10 07:50:18| storeDirWriteCleanLogs: Starting...
    2014/02/10 07:50:18| Finished. Wrote 0 entries.
    2014/02/10 07:50:18| Took 0.00 seconds ( 0.00 entries/sec).
    2014/02/10 07:50:18| logfileRotate: daemon:/var/log/squid3/access.log
    2014/02/10 07:50:18| logfileRotate: daemon:/var/log/squid3/access.log
    2014/02/10 07:50:18| Pinger socket opened on FD 11
    2014/02/10 07:50:18| helperOpenServers: Starting 1/5 'ntlm_auth' processes
    2014/02/10 07:50:18| helperOpenServers: Starting 1/5 'ntlm_auth' processes
    2014/02/10 07:50:18| pinger: Initialising ICMP pinger ...
    2014/02/10 07:50:18| pinger: ICMP socket opened.
    2014/02/10 07:50:18| pinger: ICMPv6 socket opened
    2014/02/10 07:55:22| Logfile: opening log stdio:/var/log/squid3/netdb.state
    2014/02/10 07:55:22| Logfile: closing log stdio:/var/log/squid3/netdb.state
    2014/02/10 07:55:22| NETDB state saved; 0 entries, 0 msec
    2014/02/10 09:02:14| Logfile: opening log stdio:/var/log/squid3/netdb.state
    2014/02/10 09:02:14| Logfile: closing log stdio:/var/log/squid3/netdb.state
    2014/02/10 09:02:14| NETDB state saved; 0 entries, 0 msec
    2014/02/10 10:07:50| Logfile: opening log stdio:/var/log/squid3/netdb.state
    2014/02/10 10:07:50| Logfile: closing log stdio:/var/log/squid3/netdb.state
    2014/02/10 10:07:50| NETDB state saved; 0 entries, 0 msec
    2014/02/10 10:29:35| Squid is already running! Process ID 2755
    0
  4. klawee Messages postés 67 Statut Membre 1
     
    J'ai regardé dans mes logs Squidguard et j'ai ca comme erreurs:

    2014-02-10 12:33:44 [18021] INFO: New setting: dbhome: /var/lib/squidguard/db
    2014-02-10 12:33:44 [18021] INFO: New setting: logdir: /var/log/squidguard
    2014-02-10 12:33:44 [18021] FATAL: syntax error in configfile /etc/squidguard/squidGuard.conf line 33
    2014-02-10 12:33:44 [18021] ERROR: Going into emergency mode
    2014-02-10 12:33:44 [18021] ERROR: Ending emergency mode, stdin empty
    2014-02-10 12:36:28 [18091] INFO: New setting: dbhome: /var/lib/squidguard/db
    2014-02-10 12:36:28 [18091] INFO: New setting: logdir: /var/log/squidguard
    2014-02-10 12:36:28 [18091] FATAL: syntax error in configfile /etc/squidguard/squidGuard.conf line 33
    2014-02-10 12:36:28 [18091] ERROR: Going into emergency mode
    2014-02-10 12:36:28 [18091] ERROR: Ending emergency mode, stdin empty
    0
  5. Vous n’avez pas trouvé la réponse que vous recherchez ?

    Posez votre question
  6. klawee Messages postés 67 Statut Membre 1
     
    Mon authentification a marché une fois! mais je ne sais pas comment j'ai fais.

    Je me délogué pour retesté et là par contre ça ne marche plus, y a t-il un format particulier a saisir pour ses identifiants?
    0
  7. klawee Messages postés 67 Statut Membre 1
     
    cache.log:

    2014/02/11 10:05:44| Preparing for shutdown after 139 requests
    2014/02/11 10:05:44| Waiting 30 seconds for active connections to finish
    2014/02/11 10:05:44| Closing HTTP port [::]:3128
    2014/02/11 10:05:44| Closing Pinger socket on FD 12
    2014/02/11 10:05:44| Shutdown: NTLM authentication.
    2014/02/11 10:05:44| Shutdown: Negotiate authentication.
    2014/02/11 10:05:44| Shutdown: Digest authentication.
    2014/02/11 10:05:44| Shutdown: Basic authentication.
    2014/02/11 10:05:48| Pinger exiting.
    2014/02/11 10:05:49| Starting Squid Cache version 3.3.8 for x86_64-pc-linux-gnu...
    2014/02/11 10:05:49| Process ID 11786
    2014/02/11 10:05:49| Process Roles: master worker
    2014/02/11 10:05:49| With 65536 file descriptors available
    2014/02/11 10:05:49| Initializing IP Cache...
    2014/02/11 10:05:49| DNS Socket created at [::], FD 6
    2014/02/11 10:05:49| DNS Socket created at 0.0.0.0, FD 7
    2014/02/11 10:05:49| Adding nameserver 127.0.1.1 from /etc/resolv.conf
    2014/02/11 10:05:49| Adding nameserver 192.168.176.12 from /etc/resolv.conf
    2014/02/11 10:05:49| Adding nameserver 192.168.178.200 from /etc/resolv.conf
    2014/02/11 10:05:49| Adding domain domaine.com from /etc/resolv.conf
    2014/02/11 10:05:49| helperOpenServers: Starting 0/5 'ntlm_auth' processes
    2014/02/11 10:05:49| helperStatefulOpenServers: No 'ntlm_auth' processes needed.
    2014/02/11 10:05:49| helperOpenServers: Starting 0/5 'ntlm_auth' processes
    2014/02/11 10:05:49| helperOpenServers: No 'ntlm_auth' processes needed.
    2014/02/11 10:05:49| Logfile: opening log daemon:/var/log/squid3/access.log
    2014/02/11 10:05:49| Logfile Daemon: opening log /var/log/squid3/access.log
    2014/02/11 10:05:49| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
    2014/02/11 10:05:49| Store logging disabled
    2014/02/11 10:05:49| Swap maxSize 0 + 262144 KB, estimated 20164 objects
    2014/02/11 10:05:49| Target number of buckets: 1008
    2014/02/11 10:05:49| Using 8192 Store buckets
    2014/02/11 10:05:49| Max Mem size: 262144 KB
    2014/02/11 10:05:49| Max Swap size: 0 KB
    2014/02/11 10:05:49| Using Least Load store dir selection
    2014/02/11 10:05:49| Set Current Directory to /var/spool/squid3
    2014/02/11 10:05:49| Loaded Icons.
    2014/02/11 10:05:49| HTCP Disabled.
    2014/02/11 10:05:49| Pinger socket opened on FD 12
    2014/02/11 10:05:49| Squid plugin modules loaded: 0
    2014/02/11 10:05:49| Adaptation support is off.
    2014/02/11 10:05:49| Accepting HTTP Socket connections at local=[::]:3128 remote=[::] FD 10 flags=9
    2014/02/11 10:05:49| pinger: Initialising ICMP pinger ...
    2014/02/11 10:05:49| pinger: ICMP socket opened.
    2014/02/11 10:05:49| pinger: ICMPv6 socket opened
    2014/02/11 10:05:50| storeLateRelease: released 0 objects
    2014/02/11 10:08:56| Starting new ntlmauthenticator helpers...
    2014/02/11 10:08:56| helperOpenServers: Starting 1/5 'ntlm_auth' processes
    0
  8. klawee Messages postés 67 Statut Membre 1
     
    Ouaw aucune réponse mince
    0
  9. klawee Messages postés 67 Statut Membre 1
     
    J'ai réussi et c pas grace a vous hein
    0