Project

General

Profile

Tâche #8724

Scénario #12437: mises à jour la version ERA 2.4.3

ERA: pas de règle implicite pour les services udp

Added by Karim Ayari about 9 years ago. Updated about 8 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Gwenael Remond
Start date:
07/21/2015
Due date:
% Done:

100%

Estimated time:
1.00 h
Spent time:
Remaining (hours):
0.0

Description

quand on crée par exemple une règle de DNAT avec un service udp,
la règle implicit "ACCEPT" n'est pas créée. Par contre pas de soucis pour le tcp.
(vu avec Gwen)

History

#1 Updated by Gwenael Remond about 9 years ago

  • Status changed from Nouveau to Accepté
  • Assigned To set to Gwenael Remond
  • Target version set to 189
  • Estimated time set to 1.00 h

#2 Updated by Luc Bourdot about 9 years ago

  • Tracker changed from Anomalie to Bac à idée
  • Target version deleted (189)

#3 Updated by Gwenael Remond about 8 years ago

  • Tracker changed from Bac à idée to Tâche
  • Start date set to 07/20/2015
  • Parent task set to #12437
  • Remaining (hours) set to 1.0
  • Distribution changed from Toutes to EOLE 2.4

#4 Updated by Gwenael Remond about 8 years ago

  • % Done changed from 0 to 20

Je n'arrive pas à reproduire le problème.

J'ai d'abord créé un service utilisant le protocole UDP sur un port donné, puis une directive de type DNAT de DMZ vers EXTERIEUR utilisant ce service, l'extrémité de redirection étant l'extrémité <serveur_scribe_dmz>. J'ai bien une règle implicite de type ACCEPT qui ouvre le port correspondant au port renseigné dans le port de redirection.

Est-il possible d'avoir un cas d'usage qui reproduise le bug ?

#5 Updated by Karim Ayari about 8 years ago

oui pas de problème, je ferais cela demain. merci Gwen.

#6 Updated by Karim Ayari about 8 years ago

problème reproduit, attention quand j'ai créé la demande c'était en 2.3 et mes tests sont toujours en 2.3, alors peut-être que cela a été corrigé depuis ?!

j'ai créé une règle de DNAT venant de l'extérieur vers un serveur en dmz avec un service udp par exemple samba-udp et voilà le résultat :

root@plateformetest:/usr/share/era/modeles# iptables-save |grep "137:139" |grep 192.168.220.11
-A PREROUTING -d 10.169.253.252/32 -i eth0 -p udp -m udp --dport 137:139 -j DNAT --to-destination 192.168.220.11
root@plateformetest:/usr/share/era/modeles# iptables-save |grep "137:139" |grep ext-bas
root@plateformetest:/usr/share/era/modeles#

la règle ACCEPT n'est pas créée.

#7 Updated by Gwenael Remond about 8 years ago

  • Start date changed from 07/20/2015 to 07/21/2015

#8 Updated by Gwenael Remond about 8 years ago

La règle en ACCEPT existe bien mais tu n'as pas greppé la bonne chaîne : ce n'est pas dans la chaîne ext-bas mais dans la chaîne ext-dmz car il s'agit d'un accept en forward, et pas en input.

Par contre, tu nous as aidé à découvrir un bug :) ton grep "137:139" dans l'iptables-save est tout-à-fait pertinent mais la règle en ACCEPT générée n'est liée à aucun port, ce qui n'est pas normal !!!

> ### test_serveur 
> /sbin/iptables -t nat -A PREROUTING -p udp --dport 137:139 -i %%nom_zone_eth0 -s 0/0 -d 0/0 -j DNAT --to-destination 192.168.220.11
> /sbin/iptables -t filter -A ext-dmz -p udp -i %%nom_zone_eth0 -o %%nom_zone_eth3 -s 0/0 -d 192.168.220.11 -j ACCEPT

Merci à toi Karim !

Pour information, je viens de créer un scénario : #12437

#9 Updated by Karim Ayari about 8 years ago

arfff effectivement ! je ne regardais pas la bonne chaine.. :/
par contre je confirme qu'il y a bien un problème avec le numéro de port qui n'est pas spécifié ;)

-A ext-dmz -d 192.168.220.11/32 -i eth0 -o eth3 -p udp -j ACCEPT

#10 Updated by Joël Cuissinat about 8 years ago

  • Parent task deleted (#12437)

#11 Updated by Joël Cuissinat about 8 years ago

  • Tracker changed from Tâche to Anomalie
  • Status changed from Accepté to En cours

#12 Updated by Joël Cuissinat about 8 years ago

  • Tracker changed from Anomalie to Tâche
  • Parent task set to #12437

#13 Updated by Joël Cuissinat about 8 years ago

  • Status changed from En cours to Fermé
  • Remaining (hours) changed from 1.0 to 0.0

#14 Updated by Joël Cuissinat about 8 years ago

  • % Done changed from 20 to 100

Also available in: Atom PDF