OpenVZ Forum


Home » General » Support » net.ipv4.ip_forward
net.ipv4.ip_forward [message #53390] Wed, 04 July 2018 11:26 Go to next message
fvafva is currently offline  fvafva
Messages: 4
Registered: June 2018
Junior Member
From: *fcrmedia.com
Hello,

I am using CentOS 6 as host for openVZ, and Ubuntu 16 as guests.

On all our hosts net.ipv4.ip_forward=1, which looks normal according to documention.
But I have same for guests (mainly webservers).

Is it a requirement to have net.ipv4.ip_forward=1 for VPS?

Thanks.
Re: net.ipv4.ip_forward [message #53391 is a reply to message #53390] Wed, 04 July 2018 13:02 Go to previous messageGo to next message
vaverin is currently offline  vaverin
Messages: 682
Registered: September 2005
Senior Member
From: *virtuozzo.com
Dear fvafva,

usually containers have only one network interface, so net.ipv4.ip_forward=1 is not required for them.
It can be useful if container have severl interfaces, openvpn tunnel for example.

Such setting in containers are inherited from host,
and can be adjusted via /etc/sysctl.conf inside guest.

in my new centos6 containers this systl is set to 0,
because /etc/sysctl.conf in Os template overrides the setting inherited from host.

Thank you,
Vasily Averin
Re: net.ipv4.ip_forward [message #53392 is a reply to message #53391] Wed, 04 July 2018 13:06 Go to previous message
fvafva is currently offline  fvafva
Messages: 4
Registered: June 2018
Junior Member
From: *fcrmedia.com
So looks like we have net.ipv4.ip_forward=1 just because it is inherited from host.
I understand from your post it is not required by openVZ (but of course can be required for different reasons).

Thanks for that answer.

Previous Topic: Add second HDD Custom Location / Partition
Next Topic: Nat table is not able to access
Goto Forum:
  


Current Time: Mon Oct 22 03:09:06 GMT 2018