Project

General

Profile

01inc-squid.conf.patch

Emmanuel GARETTE, 06/03/2013 05:16 PM

Download (2.15 KB)

View differences:

modif/01inc-squid.conf 2013-06-03 17:12:47.478406113 +0200
1 1
##
2
%def activer_auth(%%num_interface, %%squid_auth_eth, %%nom_machine_eth, %%vlan_eth, %%id_vlan_eth)
2
%def activer_auth(%%num_interface, %%squid_auth_eth, %%nom_machine_eth, %%vlan_eth, %%id_vlan_eth, %%alias_eth, %%alias_ip_eth)
3 3
# Gestion de l'authentification pour chaque interface
4 4
%if (%%activer_squid_auth == 'oui' and (%%nom_domaine_smb != '' or %%ip_serveur_ldap1 != '' or %%nom_domaine_krb != '' or %%ip_serveur_ldapad != '') and %%squid_auth_eth == 'non') or (%%activer_squid_auth == 'non')
5 5
http_access allow %%nom_machine_eth
......
8 8
http_access allow vlan_eth%%{num_interface}_%%vlans_iter
9 9
%end for
10 10
%end if
11
 %if %%alias_eth == "oui"
12
  %for %%res_alias in %%alias_ip_eth
13
http_access allow eth%%{num_interface}alias%%res_alias.index
14
  %end for
15
 %end if
11 16
%end if
12 17
%end def
13 18

  
14 19
## pas d'authentification pour les interfaces
15 20
%if %%nombre_interfaces == '1'
16
%%activer_auth(0, 'oui', %%nom_machine, %%vlan_eth0, %%id_vlan_eth0)
21
%%activer_auth(0, 'oui', %%nom_machine, %%vlan_eth0, %%id_vlan_eth0, %%alias_eth0, %%alias_ip_eth0)
17 22
%end if
18 23

  
19 24
%if %%nombre_interfaces >= "2"
20
%%activer_auth(1, %%squid_auth_eth1, %%nom_machine_eth1, %%vlan_eth1, %%id_vlan_eth1)
25
%%activer_auth(1, %%squid_auth_eth1, %%nom_machine_eth1, %%vlan_eth1, %%id_vlan_eth1, %%alias_eth1, %%alias_ip_eth1)
21 26
%end if
22 27

  
23 28
%if %%nombre_interfaces >= "3"
24
%%activer_auth(2, %%squid_auth_eth2, %%nom_machine_eth2, %%vlan_eth2, %%id_vlan_eth2)
29
%%activer_auth(2, %%squid_auth_eth2, %%nom_machine_eth2, %%vlan_eth2, %%id_vlan_eth2, %%alias_eth2, %%alias_ip_eth2)
25 30
%end if
26 31

  
27 32
%if %%nombre_interfaces >= "4"
28
%%activer_auth(3, %%squid_auth_eth3, %%nom_machine_eth3, %%vlan_eth3, %%id_vlan_eth3)
33
%%activer_auth(3, %%squid_auth_eth3, %%nom_machine_eth3, %%vlan_eth3, %%id_vlan_eth3, %%alias_eth3, %%alias_ip_eth3)
29 34
%end if
30 35

  
31 36
%if %%nombre_interfaces == "5"
32
%%activer_auth(4, %%squid_auth_eth4, %%nom_machine_eth4, %%vlan_eth4, %%id_vlan_eth4)
37
%%activer_auth(4, %%squid_auth_eth4, %%nom_machine_eth4, %%vlan_eth4, %%id_vlan_eth4, %%alias_eth4, %%alias_ip_eth4)
33 38
%end if
34 39

  
35 40