Skip to content

Commit 990e4a6

Browse files
widoRohit Yadav
authored andcommitted
ipv6: Allow all ICMPv6 traffic if -1 is provided as a ICMP type
ip6tables no longer takes '--icmpv6-type any' as a argument. To allow all ICMPv6 traffic with ip6tables it has to be invoked this way: $ ip6tables -I i-2-14-VM -p icmpv6 -s ::/0 -j ACCEPT All ICMPv6 traffic is now allow into the Instance. Signed-off-by: Wido den Hollander <wido@widodh.nl>
1 parent c384239 commit 990e4a6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

scripts/vm/network/security_group.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,11 @@ def add_network_rules(vm_name, vm_id, vm_ip, vm_ip6, signature, seqno, vmMac, ru
10521052
elif 'icmp' != protocol:
10531053
execute('ip6tables -I ' + vmchain + ' -p ' + protocol + ' -m ' + protocol + ' --dport ' + range + ' -m state --state NEW ' + direction + ' ' + ip + ' -j ' + action)
10541054
else:
1055-
execute('ip6tables -I ' + vmchain + ' -p icmpv6 --icmpv6-type ' + range + ' ' + direction + ' ' + ip + ' -j ' + action)
1055+
# ip6tables does not allow '--icmpv6-type any', allowing all ICMPv6 is done by not allowing a specific type
1056+
if range == 'any':
1057+
execute('ip6tables -I ' + vmchain + ' -p icmpv6 ' + direction + ' ' + ip + ' -j ' + action)
1058+
else:
1059+
execute('ip6tables -I ' + vmchain + ' -p icmpv6 --icmpv6-type ' + range + ' ' + direction + ' ' + ip + ' -j ' + action)
10561060

10571061
egress_vmchain = egress_chain_name(vm_name)
10581062
if egressrule_v4 == 0 :

0 commit comments

Comments
 (0)