It is possible to forward ipv6 ports with ip6tables to internal lxc virtual machines. See private-cloud
- Get an unique ipv6 private subnet: https://simpledns.plus/private-ipv6
-
Add this subnet to: /etc/sysconfig/lxc-net
for example:LXC_IPV6_ADDR="fd81:2688:d2c6:5024::1"
LXC_IPV6_MASK="64"
LXC_IPV6_NETWORK="fd81:2688:d2c6:5024::/64"This will add an extra ipv6 to your lxc bridge.
- Add the ipv6 addresses to your lxc virtual machines on this host, find howto for your linux os.
-
Add the portforwarding rules to the iptables (/etc/sysconfig/ip6tables), like:
*nat
:PREROUTING ACCEPT [8:406]
:INPUT ACCEPT [6:302]
:OUTPUT ACCEPT [26:1977]
:POSTROUTING ACCEPT [26:1977]
-A PREROUTING -p tcp -i eth0 --dport 587 -j DNAT --to-destination fd81:2688:d2c6:5024::2