On CentOS 6, ip6tables is literally giving a nightmare on this machine.
Having
ip6tables -P INPUT ACCEPT
ip6tables -P OUTPUT ACCEPT
ip6tables -P FORWARD ACCEPT
with
ip6tables -A INPUT -p tcp -m multiport ! --dports 21,22,80,443 -j DROP
ip6tables -A INPUT -p udp -m multiport ! --dports 21,22,80,443 -j DROP
ip6tables -A INPUT ! -p ipv6-icmp -j DROP
ip6tables -A OUTPUT -p tcp -m multiport ! --dports 21,22,80,443 -j DROP
ip6tables -A OUTPUT -p udp -m multiport ! --dports 21,22,80,443 -j DROP
ip6tables -A OUTPUT ! -p ipv6-icmp -j DROP
or having the the top and bottom inverted, still doesnt help.
the IP6tables either block all ports, or allow all in/out. I have flushed the ip6tables to ensure no rules are there before putting these rules.
All that is required is to allow all traffic and to deny multiple ports for in/out for both tcp/udp
The ports above are example purpose only.
Thanks.
EDIT: reached a better stage, yet not working with inverses
ip6tables -F
ip6tables -X
ip6tables -P INPUT ACCEPT
ip6tables -P FORWARD ACCEPT
ip6tables -P OUTPUT ACCEPT
ip6tables -I FORWARD -j DROP --protocol tcp -m multiport --dports 22,80,443