I’m trying to giving ssh access from outside to my containers by setting a NAT port-forwarding rule on the host (Basically I plan to use one port by container and forward the incoming traffic on this port from outside to the container port 22).
I managed to get it working manually but, in order to automatizing the process, I want to create the rule when the container start and removes it when it stops.
lxc config container set rax.lxc lxc.net.0.script.up=path/to/my/script
lxc config container edit
I end up with this error message:
Blockquote Config parsing error: Only interface-specific ipv4/ipv6 lxc.net. keys are allowed
So my questions are
Is this the right way to use these hooks ?
And if yes Is there a way to configure these hooks with LXD ?