Projet

Général

Profil

Anomalie #3406

eole-firewall : pouvoir mettre interface à auto

Ajouté par Emmanuel GARETTE il y a presque 12 ans. Mis à jour il y a presque 12 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Début:
26/04/2012
Echéance:
% réalisé:

100%

Temps passé:
Distribution:
EOLE 2.3

Description

Parfois, il n'est pas facile de savoir sur quelle interface une règle sera appliquée.

Il serait intéressant de pouvoir déduire l'interface (ca peu fonctionnera plutôt mal avec des adresses réseaux).


Demandes liées

Lié à eole-proxy - Anomalie #2882: proxy : possibilité de faire coopérer les caches Fermé 13/02/2012
Précède Documentations - Evolution #3580: [eole-firewall] documenter : interface='auto' Fermé 06/06/2012

Révisions associées

Révision 2c20a35c (diff)
Ajouté par Emmanuel GARETTE il y a presque 12 ans

eole-firewall : pouvoir mettre interface à auto (fixes #3406 @2h)

- loader.py : ajout de la fonction get_interface_from_ip. Cette fonction utilise "ip route get" pour déterminer l'interface. S'il ne trouve pas, renvoi eth0. Cette méthode est appeler dans allow_src et allow_dst.

Révision ccb0c162 (diff)
Ajouté par Alexandre Delaunay il y a environ 6 ans

display itemtype name also for core object; fix #3406

Historique

#1 Mis à jour par Emmanuel GARETTE il y a presque 12 ans

  • Statut changé de Nouveau à Résolu
  • % réalisé changé de 0 à 100

#2 Mis à jour par Joël Cuissinat il y a presque 12 ans

  • Statut changé de Résolu à Fermé
root@eclair:~# cat /usr/share/eole/firewall/00_ltsp_auto.fw
allow_src(interface='auto', ip='10.21.11.60', port='664')
allow_src(interface='auto', ip='192.168.230.60', port='665')
allow_dest(interface='auto', ip='10.21.11.61', port='666')
allow_dest(interface='auto', ip='192.168.230.61', port='667')
root@eclair:~# iptables-save | grep 66
-A PREROUTING -s 10.21.11.60/32 -i breth1 -p tcp -m tcp --dport 664 --tcp-flags FIN,SYN,RST,ACK SYN -j DNAT --to-destination 192.0.2.54:664
-A PREROUTING -s 192.168.230.60/32 -i eth0 -p tcp -m tcp --dport 665 --tcp-flags FIN,SYN,RST,ACK SYN -j DNAT --to-destination 192.0.2.54:665
-A FORWARD -s 10.21.11.60/32 -d 192.0.2.54/32 -i breth1 -p tcp -m tcp --dport 664 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -s 192.168.230.60/32 -d 192.0.2.54/32 -i eth0 -p tcp -m tcp --dport 665 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -s 192.0.2.54/32 -d 10.21.11.61/32 -i br0 -o breth1 -p tcp -m tcp --dport 666 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
-A FORWARD -s 192.0.2.54/32 -d 192.168.230.61/32 -i br0 -o eth0 -p tcp -m tcp --dport 667 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT

Formats disponibles : Atom PDF