From NixNet
396 bytes added ,  05:02, 23 March 2021
no edit summary
[[Category:Admin guides]]
# LXD Networking
To bind a container to a host port with NAT, you first need a static IP on the container:
lxc attach lxdbr0 <instance> eth0 eth0
lxc config device set <instance> eth0 ipv4.address=<container-ip>
Then the proxy device needs to be added:
lxc config device add <instance> port-forward proxy connect=tcp:<container-ip>:<port> listen=tcp:<host-ip>:<port>