From 7c0a6e60650c8f34c4d23995df6620bb4b77da52 Mon Sep 17 00:00:00 2001 From: Klaas TJEBBES Date: Mon, 18 Apr 2016 17:15:49 +0200 Subject: [PATCH] =?UTF-8?q?hooks/graphicsfw=20:=20correction=20des=20r?= =?UTF-8?q?=C3=A8gles=20iptables=20REF=20#12175=20@1h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hooks/graphicsfw | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hooks/graphicsfw b/hooks/graphicsfw index cd4a9af..1865cb8 100755 --- a/hooks/graphicsfw +++ b/hooks/graphicsfw @@ -31,12 +31,9 @@ function open_port() for ((i = 0; i < ${#authorized_ip[*]}; i +=1)) do ${IPTABLES} -I eth0-root -s ${authorized_ip[$i]}/${authorized_netmask[$i]} -p tcp -m tcp --dport ${vm_port} --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT - if [[ $? -eq 0 ]] - then - echo "/sbin/iptables -A eth0-root -s ${authorized_ip[$i]}/${authorized_netmask[$i]} -p tcp -m tcp --dport ${vm_port} --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT" >> "${RULES_FILE}" - fi + [[ ${?} -eq 0 ]] && echo "/sbin/iptables -I eth0-root -s ${authorized_ip[$i]}/${authorized_netmask[$i]} -p tcp -m tcp --dport ${vm_port} --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT" >> "${RULES_FILE}" ${IPTABLES} -I eth0-root -s $(CreoleGet one_master_ip) -p tcp -m tcp --dport ${vm_port} --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT - [[ ${?} -eq 0 ]] && echo "/sbin/iptables -A eth0-root -s $(CreoleGet one_master_ip) -p tcp -m tcp --dport ${vm_port} --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT" >> "${RULES_FILE}" + [[ ${?} -eq 0 ]] && echo "/sbin/iptables -I eth0-root -s $(CreoleGet one_master_ip) -p tcp -m tcp --dport ${vm_port} --tcp-flags FIN,SYN,RST,ACK SYN -j ACCEPT" >> "${RULES_FILE}" done }