OpenNebula / addon-context-linux

Linux VM Contextualization
Apache License 2.0
56 stars 73 forks source link

Contextualization resets ip_forward status for vm - CentOS 7 #215

Closed gamma589 closed 3 years ago

gamma589 commented 3 years ago

Run of the contextualization script sets /proc/sys/net/ipv4/ip_forward to 0. This is needed for hosts running docker or docker-compose. Is there any way to disable this or set it up so it stops doing that ? I'm reluctant to modify it myself because I still want to download vanilla images from the marketplace instead of baking them myself. Centos 7 image id is 5.12.0-1.20200609

vholer commented 3 years ago

It's enough to persist the required state in system configuration.

# echo 'net.ipv4.ip_forward=1' >>/etc/sysctl.conf