How to allow an IP (ipv6) address using ufw?

Solution 1:

man ufw is the answer (at line 139), the manual mention this:

...
         ufw deny proto tcp from 2001:db8::/32 to any port 25

       This  will  deny all traffic from the IPv6 2001:db8::/32 to tcp port 25
       on this host. Note that IPv6 must be enabled  in  /etc/default/ufw  for
       IPv6 firewalling to work.
...

Since the OP not mentioning more detail about his difficulties, I hope this answer may help you to create IPV6 ufw rules