Evolution #3574
[bastion] devrait afficher un "warning" en cas de masque de sous-réseau invalide
Status:
Fermé
Priority:
Normal
Assigned To:
Category:
-
Target version:
Distribution:
EOLE 2.3
Description
J'ai pu mettre :
root@eoleng:~# cat /usr/share/eole/firewall/00_root_nut.fw allow_src(interface='eth0', ip='1.1.1.2/1.1.1.0', port='3493', tcpwrapper="upsd") root@eoleng:~# iptables-save | grep 3493 -A PREROUTING -s 1.1.1.0/1.1.1.0 -i eth0 -p tcp -m tcp --dport 3493 --tcp-flags FIN,SYN,RST,ACK SYN -j DNAT --to-destination 127.0.0.1:3493 -A FORWARD -s 1.1.1.0/1.1.1.0 -d 127.0.0.1/32 -i eth0 -p tcp -m tcp --dport 3493 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
Alors que je voulais :
root@sphynx:~# cat /usr/share/eole/firewall/00_root_nut.fw allow_src(interface='eth0', ip='1.1.1.2/255.255.255.0', port='3493', tcpwrapper="upsd") root@sphynx:~# iptables-save | grep 3493 -A PREROUTING -s 1.1.1.0/24 -i eth0 -p tcp -m tcp --dport 3493 --tcp-flags FIN,SYN,RST,ACK SYN -j DNAT --to-destination 127.0.0.1:3493 -A FORWARD -s 1.1.1.0/24 -d 127.0.0.1/32 -i eth0 -p tcp -m tcp --dport 3493 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT
Associated revisions
- loader.py : amélioration de la gestion des erreurs
Fixes #3574 @45m
History
#1 Updated by Emmanuel GARETTE over 11 years ago
En complément, j'utilise IPy pour valider, mais visiblement il n'a pas le comportement voulu dans ce cas.
#2 Updated by Joël Cuissinat about 11 years ago
- Target version changed from Mises à jour 2.3.6 RC to Mises à jour 2.3.7 RC
#3 Updated by Benjamin Bohard about 11 years ago
- Status changed from Nouveau to En attente d'informations
Test effectué hors contexte dans un shell python :
>>> import IPy >>> ip = IPy.IP('1.1.1.0/1.1.1.0') ValueError: Netmask 0x1010100L can't be expressed as an prefix.
#4 Updated by Joël Cuissinat almost 11 years ago
- Assigned To set to Joël Cuissinat
En fait, il y avait bien ce test mais il n'est plus bloquant depuis qu'on a ajouté le support des noms de domaine : 8b3a52ee :)
#5 Updated by Joël Cuissinat almost 11 years ago
- Status changed from En attente d'informations to Résolu
- % Done changed from 0 to 100
Appliqué par commit 56276a3e70b730e8f5cf5fa92f1080ef8dc30779.
#6 Updated by Joël Cuissinat almost 11 years ago
- Status changed from Résolu to Fermé
root@amonecole-eclair:~# cat /usr/share/eole/firewall/00_root_bad.fw allow_src(interface='eth0', ip='1.1.1.2/1.1.1.0', port='666') root@amonecole-eclair:~# /etc/init.d/bastion restart * Stopping l7filter [ OK ] * Stopping Serveur Creole: creole_serv [ OK ] * Stopping firewall: bastion [ OK ] * Starting Serveur Creole: creole_serv [ OK ] * Starting firewall: bastion (modèle "2zones-amonecole-nginx") Error : Error for ip 1.1.1.2/1.1.1.0: Netmask 0x1010100L can't be expressed as an prefix. in 00_root_bad.fw !! Erreur a la generation des regles eole-firewall !! non appliquées ! [fail] * Starting l7filter