Since the master has switched to fw4, iptables becomes legacy, but I can't find a way to use nftables to set up IPV6 NAT. I have kmod-nft-nat6 installed.
The command doesn't work:
nft add rule ip6 nat POSTROUTING ip6 saddr $(uci get network.globals.ula_prefix) meta oif wan counter masquerade
Sorry for the late reply because I didn't have chance to access my router until today. I updated to the master version and found the command in the main post is totally wrong in syntax
The right command should be:
nft add rule inet fw4 srcnat oifname wan meta nfproto ipv6 counter masquerade