#
LXD port forwarding
#
opening ports on LXD
Let's make an example and use it to explain how to do It.
Easiest way to open a specific port in lxd container, is by using proxy device
command is used only after creating a lxd container
lxc config device add example123 pdevice09093 proxy listen=tcp:0.0.0.0:09093 connect=tcp:127.0.0.1:09093
lxc config device add
- adds device to our containerexample123
- name of your containerlisten=tcp:0.0.0.0:09093
- listening to 09093 portconnect=tcp:127.0.0.1:09093
- connecting to our container using existing 09093 TCP port on localhost