Open main menu


565 bytes added ,  07:02, 22 December 2021
add IPv6 crap
== LXD Networking ==
Before setting any static IPs, you need to enable stateful DHCPv6 on LXD's virtual NIC. For more info about why, see [ a related thread on LXC's Discouse insance].<pre>lxc network set lxdbr0 ipv6.dhcp.stateful true</pre> To bind a container to a host port with NAT, you first need a static IP on the container:
lxc network attach lxdbr0 <instance> eth0 eth0
lxc config device set <instance> eth0 ipv4.address=<container-ip> ipv6.address=<container-ip>
Then the proxy device needs to be added:. Note the square brackets <code>[]</code> surrounding the IPv6 address in the second command.
lxc config device add <instance> port-forward forward_ipv4 proxy connect=tcp:<container-ip>:<port> listen=tcp:<host-public-ip>:<port> nat=truelxc config device add <instance> port-forward_ipv6 proxy connect=tcp:[<container-ip>]:<port> listen=tcp:[<host-public-ip>]:<port> nat=true