Reference: Forward port to LXC guest using UFW, answer by Steve Zahn. March 17, 2014.
The lxd service can be used to manage lxc system containers on Linux hosts, very much like Docker does for application containers. One Docker feature that LXD lacks is a native parameter for routing container ports so they can be accessed on the network beyond the lxd host. Routing using the iptables command
On an lxd host protected by the standard iptables kernel firewall, the following command will route external traffic to a specific port of a specific container:
$ sudo iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 8080 -j DNAT --to 10.1.0.5:80