Browse Source

hooks/graphicsfw : correction des règles iptables REF #12175 @1h

tags/pkg/dev/eole-2.7.0/0.0.1-0
Klaas TJEBBES 3 years ago
parent
commit
7c0a6e6065
1 changed files with 2 additions and 5 deletions
  1. 2
    5
      hooks/graphicsfw

+ 2
- 5
hooks/graphicsfw View File

@@ -31,12 +31,9 @@ function open_port()
31 31
     for ((i = 0; i < ${#authorized_ip[*]}; i +=1))
32 32
     do
33 33
         ${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
34
-        if [[ $? -eq 0 ]]
35
-        then
36
-            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}"
37
-          fi
34
+        [[ ${?} -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}"
38 35
         ${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
39
-        [[ ${?} -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}"
36
+        [[ ${?} -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}"
40 37
     done
41 38
 }
42 39
 

Loading…
Cancel
Save