Closed zipperer closed 9 months ago
I propose the Getting Started: IP Address section notes that a firewall may block container from receiving IP address.
Getting Started: IP Address
In the commit on this pull request I provide example text. I ask the maintainers to rewrite the example text to their liking.
The example text I provide is likely over-specific. It refers to Ubuntu distribution in particular rather than Linux distributions generally.
I followed the instructions on https://linuxcontainers.org/lxc/getting-started/ through the steps in https://linuxcontainers.org/lxc/getting-started/#ip-address.
But I failed to get mycontainer to have an IP address.
mycontainer
I searched and found https://discuss.linuxcontainers.org/t/lxd-bridge-doesnt-work-with-ipv4-and-ufw-with-nftables/10034/17, including
sudo ufw allow in on lxdbr0 sudo ufw route allow in on lxdbr0 sudo ufw route allow out on lxdbr0
In those commands I replaced lxdbr0 with lxcbr0 -- the value for LXC_BRIDGE in /etc/default/lxc-net. After I executed
lxdbr0
lxcbr0
LXC_BRIDGE
/etc/default/lxc-net
root@host:~# ufw allow in on lxcbr0 root@host:~# ufw route allow in on lxcbr0 root@host:~# ufw route allow out on lxcbr0 root@host:~# service lxc-net restart root@host:~# lxc-stop --name mycontainer root@host:~# lxc-destroy --name mycontainer root@host:~# lxc-create --name mycontainer --template download -- --dist ubuntu --release jammy --arch amd64 root@host:~# lxc-start --name mycontainer
the container received an IP address.
I found #639 , but I do not find that page on the site.
Thank you for looking into this.
I propose the
Getting Started: IP Address
section notes that a firewall may block container from receiving IP address.In the commit on this pull request I provide example text. I ask the maintainers to rewrite the example text to their liking.
The example text I provide is likely over-specific. It refers to Ubuntu distribution in particular rather than Linux distributions generally.
The problem I encountered that motivates this pull request
I followed the instructions on https://linuxcontainers.org/lxc/getting-started/ through the steps in https://linuxcontainers.org/lxc/getting-started/#ip-address.
But I failed to get
mycontainer
to have an IP address.What I did
I searched and found https://discuss.linuxcontainers.org/t/lxd-bridge-doesnt-work-with-ipv4-and-ufw-with-nftables/10034/17, including
In those commands I replaced
lxdbr0
withlxcbr0
-- the value forLXC_BRIDGE
in/etc/default/lxc-net
. After I executedthe container received an IP address.
Related issue
I found #639 , but I do not find that page on the site.
Thank you for looking into this.