Open main menu

Changes

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:
<pre>
lxc attach lxdbr0 <instance> eth0 eth0
lxc config device set <instance> eth0 ipv4.address=<container-ip>
</pre>
 
Then the proxy device needs to be added:
<pre>
lxc config device add <instance> port-forward proxy connect=tcp:<container-ip>:<port> listen=tcp:<host-ip>:<port>
</pre>