Project

General

Profile

Anomalie #3406

eole-firewall : pouvoir mettre interface à auto

Added by Emmanuel GARETTE over 11 years ago. Updated over 11 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Category:
-
Start date:
04/26/2012
Due date:
% Done:

100%

Spent time:
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).


Related issues

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

Associated revisions

Revision 2c20a35c (diff)
Added by Emmanuel GARETTE over 11 years ago

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.

Revision ccb0c162 (diff)
Added by Alexandre Delaunay over 5 years ago

display itemtype name also for core object; fix #3406

History

#1 Updated by Emmanuel GARETTE over 11 years ago

  • Status changed from Nouveau to Résolu
  • % Done changed from 0 to 100

#2 Updated by Joël Cuissinat over 11 years ago

  • Status changed from Résolu to 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

Also available in: Atom PDF