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: 8
Registered: June 2018
Junior Member
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: 708
Registered: September 2005
Senior Member
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: 8
Registered: June 2018
Junior Member
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: Thu Mar 28 10:07:35 GMT 2024

Total time taken to generate the page: 0.01610 seconds