I need to get ipv4 forwarding enabled inside an lxc container. I enable it on the physical host, but inside the container it is still disabled.
On the host, I run the following:
Code: Select all
sysctl -w net.ipv4.ip_forward=1
Code: Select all
sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
Code: Select all
lxc-attach -n my_cool_container
sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0
Code: Select all
sysctl -w net.ipv4.ip_forward=1
sysctl: setting key "net.ipv4.ip_forward": Read-only file system
Thanks for your help!