common-squid1.conf.patch
modif/common-squid1.conf 2014-08-22 15:29:29.089026100 +0200 | ||
---|---|---|
29 | 29 |
%set %%network_key = "vlan_network_eth" + %%interface |
30 | 30 |
%set %%netmask_key = "vlan_netmask_eth" + %%interface |
31 | 31 |
%set %%ip_key = "vlan_ip_eth" + %%interface |
32 |
%set %%ip_vlan = %%getattr(%%vlans_iter, %%ip_key) |
|
33 |
acl to_localhost dst %%ip_vlan/32 |
|
32 | 34 |
acl vlan_eth%%{interface}_%%vlans_iter src %%getattr(%%vlans_iter, %%network_key)/%%calc_classe(%%getattr(vlans_iter, %%netmask_key)) |
33 | 35 |
acl reseaueth%%{interface}_%%vlans_iter dst %%getattr(%%vlans_iter, %%network_key)/%%calc_classe(%%getattr(%%vlans_iter, %%netmask_key)) |
34 |
acl localhosteth%%{interface}_%%vlans_iter dst %%getattr(%%vlans_iter, %%ip_key)/32
|
|
36 |
acl localhosteth%%{interface}_%%vlans_iter dst %%ip_vlan/32
|
|
35 | 37 |
%end for |
36 | 38 |
%end if |
37 | 39 |
%end def |
... | ... | |
54 | 56 |
%if %%alias_eth == "oui" |
55 | 57 |
#acl alias IP pour l'interface %%interface |
56 | 58 |
%for %%idx, %%res_alias in %%enumerate(%%getVar('alias_ip_eth'+%%interface)) |
59 |
acl to_localhost dst %%res_alias/32 |
|
57 | 60 |
%set %%network_val = %%getattr(%%res_alias, "alias_network_eth"+%%interface) |
58 | 61 |
%set %%netmask_val = %%getattr(%%res_alias, "alias_netmask_eth"+%%interface) |
59 | 62 |
acl eth%%{interface}alias%%idx src %%network_val/%%calc_classe(%%netmask_val) |