ufwでIPv4のみポート許可するには /etc/default/ufw の以下の部分で IPV6=no
にしてから sudo ufw reload
する。
/etc/defaults/ufw:
# Set to yes to apply rules to support IPv6 (no means only IPv6 on loopback # accepted). You will need to 'disable' and then 'enable' the firewall for # the changes to take affect. IPV6=yes