Project

General

Profile

Tâche #12411

Amon - Scénario #16041: EAD Amon : gérer le décalage de +2h sur les restrictions horaires

Groupe de machine : rectriction horaire, ouverture d'une minute dans règles iptables

Added by Vincent Febvre over 7 years ago. Updated over 6 years ago.

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

100%

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

Description

Test effectué sur un amon 2.4.1

Lorsqu'on définit des plages horaires d'ouverture pour un groupe de machine en sélectionnant "web selon horaire", les règles iptables sont correctement générées mais il y a un lapse de temps d'une minute où l'accès web est de nouveau disponible :

-A FORWARD -i eth1 -o eth0 -p tcp -m multiport --dports 80,443,3128,8080 -m set --match-set generale src -m time --timestart 20:30:00 --timestop 23:59:00 --weekdays Thu --datestop 2038-01-19T03:14:07 --kerneltz -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -i eth1 -o eth0 -p tcp -m multiport --dports 80,443,3128,8080 -m set --match-set generale src -m time --timestart 00:00:00 --timestop 08:00:00 --weekdays Thu --datestop 2038-01-19T03:14:07 --kerneltz -j REJECT --reject-with icmp-port-unreachable

De 23:59:00 à 00:00:00, les accès sont permis selon ces règles.
Il faudrait que les plages horaires soient plutôt 20:30:00 à 23:59:59 et 00:00:00 à 08:00:00 (dans mon exemple).

Associated revisions

Revision 4a71f32c (diff)
Added by Bruno Boiget over 6 years ago

Corrections sur règles horaires

  • Récupération de la time_zone définie dans la configuration (amon.cfg)
  • force les plages à finir à 23:59:59 au lieu de 23:59 ou 24:00

ref #1216 @5m
ref #12411 @10m

History

#1 Updated by Fabrice Barconnière almost 7 years ago

  • Tracker changed from Anomalie to Tâche
  • Estimated time set to 1.00 h
  • Parent task set to #16041
  • Remaining (hours) set to 1.0

#2 Updated by Bruno Boiget almost 7 years ago

Une autre solution serait d'utiliser l'option --contiguous d'iptables pour les plages incluant un changement de jour (si cela est compatible avec l'interface web).

 Matching across days might not do what is expected. For instance,

    -m time --weekdays Mo --timestart 23:00 --timestop 01:00 Will match Monday, for one hour from midnight to 1 a.m., and then again for another hour from 23:00 onwards. If this is unwanted, e.g. if you would like 'match for two hours from Montay 23:00 onwards' you need to also specify the --contiguous option in the example above. 

Pour l'exemple donné :

-A FORWARD -i eth1 -o eth0 -p tcp -m multiport --dports 80,443,3128,8080 -m set --match-set generale src -m time --timestart 20:30:00 --timestop 08:00:00 --contiguous --weekdays Thu --datestop 2038-01-19T03:14:07 --kerneltz -j REJECT --reject-with icmp-port-unreachable

#3 Updated by Bruno Boiget over 6 years ago

  • Status changed from Nouveau to En cours
  • Assigned To set to Bruno Boiget

#4 Updated by Scrum Master over 6 years ago

  • Status changed from En cours to Résolu

#5 Updated by Lionel Morin over 6 years ago

  • % Done changed from 0 to 100

#6 Updated by Lionel Morin over 6 years ago

  • Remaining (hours) changed from 1.0 to 0.0

#7 Updated by Lionel Morin over 6 years ago

  • Status changed from Résolu to Fermé

Also available in: Atom PDF