Simplifying port forwarding with LXD
LXD containers are brilliant, but lacks an easy way to forward ports from the containers to the host. One can use iptables manually, of course, but I really missed something easy like Docker. To try and remedy this, I have conjured up a little bash script. With this script, you can add, delete and list port forwarding rules.
It's a bit rough around the edges, but maybe I'll tidy it up a bit some day.
Read on for the script and examples.