squid.conf.patch
modif/squid.conf 2011-06-20 10:10:04.000000000 +0200 | ||
---|---|---|
2 | 2 |
##Librairie de fonctions |
3 | 3 |
####ACL### |
4 | 4 |
%def set_acl_interfaces(%%num_interface, %%nom_machine_eth, %%adresse_network_eth, %%adresse_netmask_eth, %%adresse_ip_eth, %%vlan_eth, %%id_vlan_eth) |
5 |
# definition des acls pour chaque interface |
|
5 |
%set %%interface_key = "eth" + str(%%num_interface) |
|
6 |
# definition des acls pour l'interface %%interface_key |
|
6 | 7 |
acl %%nom_machine_eth src %%adresse_network_eth/%%adresse_netmask_eth |
8 |
%for %%i_route_adresse in %%route_adresse |
|
9 |
%if %%i_route_adresse.route_int == %%interface_key |
|
10 |
acl %%nom_machine_eth src %%i_route_adresse/%%i_route_adresse.route_netmask |
|
11 |
%end if |
|
12 |
%end for |
|
7 | 13 |
acl localhosteth%%{num_interface} dst %%adresse_ip_eth/255.255.255.255 |
8 | 14 |
acl reseaueth%%{num_interface} dst %%adresse_network_eth/%%adresse_netmask_eth |
15 |
%for %%i_route_adresse in %%route_adresse |
|
16 |
%if %%i_route_adresse.route_int == %%interface_key |
|
17 |
acl reseaueth%%{num_interface} dst %%i_route_adresse/%%i_route_adresse.route_netmask |
|
18 |
%end if |
|
19 |
%end for |
|
9 | 20 |
%if %%vlan_eth == "oui" |
10 | 21 |
%for %%vlans in %%id_vlan_eth |
11 | 22 |
%set %%network_key = "adresse_network_vlan_eth" + str(%%num_interface) |