I am new in using lxc and I launched an centos/7/i386 on ubuntu server and now I need to assign an ip to it.
Hi @farbod_peimanzadeh, you mean lxc or lxd, if you are talking about lxd then it supports dhcp server. As soon as you determine the firewall type with the lxc info | grep -i firewall
command then you can check the rules with either sudo iptables -L
or sudo nft list ruleset
.
Regards.
I mean lxd. I am not sure that I should use dhcp. the thing is that this vm is on a server and I need to give an Ip to it.
Hi,
You can assign static ip addr like that.
lxc config device override <container_name> eth0 ipv4.address=<IP_ADDRESS>
Regards.