Scénario #20786
Revoir la partie Firewall de Sphynx
Status:
Terminé (Sprint)
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
06/26/2017
Due date:
07/13/2017
% Done:
100%
Estimated time:
(Total: 3.00 h)
Spent time:
1.00 h (Total: 4.00 h)
Story points:
2.0
Remaining (hours):
0.00 hour
Velocity based estimate:
Release:
Release relationship:
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
Subtasks
History
#1 Updated by Luc Bourdot over 6 years ago
- Tracker changed from Proposition Scénario to Scénario
- Due date set to 07/13/2017
- Target version set to sprint 2017 26-28 Equipe MENSR
- Start date set to 06/26/2017
#2 Updated by Joël Cuissinat over 6 years ago
- Assigned To set to force orange
- Story points set to 1.0
#3 Updated by Scrum Master about 6 years ago
- Description updated (diff)
- Assigned To changed from force orange to Fabrice Barconnière
- Release set to EOLE 2.6.2
- Story points changed from 1.0 to 2.0
#4 Updated by Scrum Master about 6 years ago
- Description updated (diff)
#5 Updated by Gérald Schwartzmann about 6 years ago
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 Updated by Gérald Schwartzmann about 6 years ago
- Status changed from Nouveau to Terminé (Sprint)