Forward only specific interfaces to the captive portal

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
aurore
ynerant 3 years ago
parent 6e53fd7bdb
commit d5506e8568

@ -23,9 +23,11 @@
### Specify each interface role
role = ['routeur', 'portail']
interfaces_type = {
'routable' : ['eth1', 'eth2'],
'routable-portail': ['eth2'],
'sortie' : ['eth3', 'eth4'],
'admin' : ['eth5', 'eth6']
}

@ -371,7 +371,7 @@ class iptables:
def capture_connection_portail(self, subtable="PORTAIL-CAPTIF-REDIRECT"):
"""Redirige les connexions 80 et 443 vers l'ip cible"""
self.init_nat(subtable, decision="-")
for interface in self.interfaces_settings['routable']:
for interface in self.interfaces_settings['routable-portail']:
self.jump_traficfrom("nat", interface, "PREROUTING", subtable, mode='4')
for protocol in self.portail_settings['authorized_hosts']:

Loading…
Cancel
Save