Network Forwarding inside LXC

Issues related to configuring your network
Post Reply
rmse17
Posts: 1
Joined: 2015/02/04 19:30:19

Network Forwarding inside LXC

Post by rmse17 » 2017/10/05 01:28:33

Hello,

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
Verifying:

Code: Select all

sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
Lets see inside container...

Code: Select all

lxc-attach -n my_cool_container
sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0
Trying to enable from side container...

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!

Post Reply