[config/v6] J'ai modifié les realms des machines v6 only.
* Tout ça pour pas me faire chier à faire une correspondance realm v4 <-> v6 only. :p
This commit is contained in:
parent
bc55f67f15
commit
1cc8fe4270
3 changed files with 22 additions and 20 deletions
|
@ -61,7 +61,7 @@ def tracker_torrent(ip6tables):
|
|||
def ports(dev_ip6, dev_list):
|
||||
''' Ouvre les ports '''
|
||||
for machine in machines :
|
||||
for type_machine in ['fil', 'fil-v6', 'wifi', 'wifi-v6', 'serveurs']:
|
||||
for type_machine in ['fil', 'adherents-v6', 'wifi', 'wifi-adh-v6', 'serveurs']:
|
||||
for plage in rid[type_machine]:
|
||||
if int(machine.rid()) in range(plage[0], plage[1]):
|
||||
for dev in dev_list:
|
||||
|
@ -82,7 +82,7 @@ def ports(dev_ip6, dev_list):
|
|||
|
||||
for proto in open_ports.keys():
|
||||
ip6tables.filter.forward('-i %s -p %s -m multiport --dports %s -j ACCEPT' % (dev_ip6, proto, open_ports[proto]))
|
||||
for type_machine in ['fil', 'fil-v6', 'wifi', 'wifi-v6']:
|
||||
for type_machine in ['fil', 'adherents-v6', 'wifi', 'wifi-adh-v6']:
|
||||
ip6tables.filter.forward('-i %s -d %s -j %s' % (dev_ip6,
|
||||
prefix[dprefix[type_machine]][0], 'EXT' + re.sub('-', '',
|
||||
type_machine.upper())))
|
||||
|
@ -94,7 +94,7 @@ def ports(dev_ip6, dev_list):
|
|||
# FIXME: proxy transparent -> port 80
|
||||
ip6tables.filter.forward('-i %s -p tcp -m multiport --dports 0:24,26:79,80,81:134,136,140:444,446:65535 -j ACCEPT' % dev)
|
||||
|
||||
for type_machine in ['fil', 'fil-v6', 'wifi', 'wifi-v6']:
|
||||
for type_machine in ['fil', 'adherents-v6', 'wifi', 'wifi-adh-v6']:
|
||||
ip6tables.filter.forward('-i %s -s %s -j %s' % (iface6(type_machine),
|
||||
prefix[dprefix[type_machine]][0], 'CRANS' + re.sub('-', '',
|
||||
type_machine.upper())))
|
||||
|
@ -123,7 +123,7 @@ def basic_fw():
|
|||
ip6tables.filter.ieui64('! -s %s -j RETURN' % net)
|
||||
|
||||
# Correspondance MAC-IP
|
||||
mac_ip(ip6tables, machines, ['fil', 'fil-v6', 'adm', 'wifi', 'wifi-v6', 'serveurs'])
|
||||
mac_ip(ip6tables, machines, ['fil', 'adherents-v6', 'adm', 'wifi', 'wifi-adh-v6', 'serveurs'])
|
||||
|
||||
|
||||
def main_router():
|
||||
|
@ -181,7 +181,7 @@ def main_router():
|
|||
ip6tables.filter.forward('-j INGRESS_FILTERING')
|
||||
|
||||
# Pour les autres connections
|
||||
for type_m in [i for i in ['fil', 'fil-v6', 'wifi', 'wifi-v6'] if not 'v6' in i]:
|
||||
for type_m in [i for i in ['fil', 'adherents-v6', 'wifi', 'wifi-adh-v6'] if not 'v6' in i]:
|
||||
ip6tables.filter.mac('-s %s -j %s' % (prefix[type_m][0], 'MAC' +
|
||||
type_m.upper()))
|
||||
ip6tables.filter.forward('-i %s -j MAC' % dev_crans)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue