Scénario #20786
Revoir la partie Firewall de Sphynx
Statut:
Terminé (Sprint)
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
Début:
26/06/2017
Echéance:
13/07/2017
% réalisé:
100%
Temps estimé:
(Total: 3.00 h)
Temps passé:
1.00 h (Total: 4.00 h)
Points de scénarios:
2.0
Restant à faire (heures):
0.00 heure
Estimation basée sur la vélocité:
Release:
Liens avec la release:
Auto
Description
Le script 60-Sphynx_rules
exécute des règles iptables déjà prises en compte dans les dictionnaires et les autres scripts de /usr/share/eole/bastion/data/
Ce script peut également être simplifié en faisant prendre en charge certaines règles par le dictionnaire 30_sphynx.xml
J'avais déjà fait ce travail, à voir si c'est suffisant :
diff --git a/dicos/30_sphynx.xml b/dicos/30_sphynx.xml index c8b3993..a1d4cfd 100644 --- a/dicos/30_sphynx.xml +++ b/dicos/30_sphynx.xml @@ -3,6 +3,23 @@ <creole> <files> <service servicelist='dyn_route'>quagga</service> + <service_access service='arv'> + <port port_type='SymLinkOption'>arv_port</port> + </service_access> + <service_restriction service='arv'> + <ip interface='eth0' netmask='netmask_admin_eth0' netmask_type='SymLinkOption' ip_type='SymLinkOption'>ip_admin_eth0</ip> + <ip interface='eth1' netmask='netmask_admin_eth1' netmask_type='SymLinkOption' ip_type='SymLinkOption'>ip_admin_eth1</ip> + <ip interface='eth2' netmask='netmask_admin_eth2' netmask_type='SymLinkOption' ip_type='SymLinkOption'>ip_admin_eth2</ip> + <ip interface='eth3' netmask='netmask_admin_eth3' netmask_type='SymLinkOption' ip_type='SymLinkOption'>ip_admin_eth3</ip> + <ip interface='eth4' netmask='netmask_admin_eth4' netmask_type='SymLinkOption' ip_type='SymLinkOption'>ip_admin_eth4</ip> + </service_restriction> + <service_access service='isakmp'> + <port protocol='udp'>500</port> + <port protocol='udp'>4500</port> + </service_access> + <service_restriction service='isakmp'> + <ip interface='eth0' netmask='0.0.0.0'>0.0.0.0</ip> + </service_restriction> <file name='/etc/eole/ssl/ca-sphynx.conf' mkdir="True"/> <file name='/etc/eole/ssl/certif-vpn.conf' mkdir="True"/> <file name='/etc/arv/arv.conf'/> diff --git a/tmpl/60-Sphynx_rules b/tmpl/60-Sphynx_rules index 5621a6b..8bfa883 100644 --- a/tmpl/60-Sphynx_rules +++ b/tmpl/60-Sphynx_rules @@ -29,24 +29,6 @@ echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter /sbin/iptables -A root-eth0 -m policy --pol ipsec --proto esp --dir out -j ACCEPT ## definition de la chaine eth0-root -/sbin/iptables -A eth0-root -p tcp -m state --state NEW -m tcp --dport 4201:4202 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT -%if %%admin_eth0 == 'oui' -#ead-web on eth0 - %for %%ip_admin in %%ip_admin_eth0 -/sbin/iptables -A eth0-root -s %%ip_admin/%%ip_admin.netmask_admin_eth0 -p tcp -m state --state NEW -m tcp --dport 4200 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT -/sbin/iptables -A eth0-root -s %%ip_admin/%%ip_admin.netmask_admin_eth0 -p tcp -m state --state NEW -m tcp --dport 8088 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT - %end for -%end if -%if %%ssh_eth0 == "oui" -#ssh on eth0 - %for %%reseau_ssh in %%ip_ssh_eth0 -#/sbin/iptables -A eth0-root -s %%reseau_ssh/%%reseau_ssh.netmask_ssh_eth0 -p tcp -m state --state NEW -m tcp --dport 22 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT -/sbin/iptables -A eth0-root -s %%reseau_ssh/%%reseau_ssh.netmask_ssh_eth0 -p tcp -m state --state NEW -m tcp --dport 8090 --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT - %end for -%end if - -/sbin/iptables -A eth0-root -p udp -m udp --dport 500 -j ACCEPT -/sbin/iptables -A eth0-root -p udp -m udp --dport 4500 -j ACCEPT /sbin/iptables -A eth0-root -p esp -j ACCEPT /sbin/iptables -A eth0-root -m policy --dir in --pol ipsec --proto esp -j ACCEPT
Critère d'acceptation¶
- Le test jenkins de vérification des règles iptables doit être OK
Sous-tâches
Historique
#1 Mis à jour par Luc Bourdot il y a presque 7 ans
- Tracker changé de Proposition Scénario à Scénario
- Echéance mis à 13/07/2017
- Version cible mis à sprint 2017 26-28 Equipe MENSR
- Début mis à 26/06/2017
#2 Mis à jour par Joël Cuissinat il y a presque 7 ans
- Assigné à mis à force orange
- Points de scénarios mis à 1.0
#3 Mis à jour par Scrum Master il y a presque 7 ans
- Description mis à jour (diff)
- Assigné à changé de force orange à Fabrice Barconnière
- Release mis à EOLE 2.6.2
- Points de scénarios changé de 1.0 à 2.0
#4 Mis à jour par Scrum Master il y a presque 7 ans
- Description mis à jour (diff)
#5 Mis à jour par Gérald Schwartzmann il y a presque 7 ans
Les modifications sont bien présentes dans le paquet 2.6.2-2
Le test ne passe pas avant modification d'eole-ci-test :
23:18:30 AUTOMATE : DETECTION ALERTE !! 23:18:30 EOLE_CI_ALERTE: LES REGLES IPTABLES SONT INCORRECTES
http://jenkins.eole.lan/jenkins/job/2.6.2/job/test-checkinstance-sphynx-2.6.2-amd64/10/console
FIN check-instance : OK
http://jenkins.eole.lan/jenkins/job/2.6.2/job/test-checkinstance-sphynx-2.6.2-amd64/11/console
Le test passe depuis ce matin.
#6 Mis à jour par Gérald Schwartzmann il y a presque 7 ans
- Statut changé de Nouveau à Terminé (Sprint)