| fix_network_forwarding [message #90407] |
Thu, 27 October 2011 13:05  |
|
In lxins.php, the following is done:
function fix_network_forwarding()
{
$list = file("/etc/sysctl.conf");
foreach($list as $__l) {
if (strstr($__l, "net.ipv4.ip_forward") !== false) {
$newlist[] = "net.ipv4.ip_forward = 1\n";
} else {
$newlist[] = $__l;
}
}
our_file_put_contents("/etc/sysctl.conf", implode("", $newlist));
shell_exec("sysctl -p");
}
http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch- fw.html describes the uses of this.
I can see the possible uses for this, but wonder if this is good as a default setting as generally it would not be used.
https://www.mercuryvps.com
HyperVM Xen VPS hosting
|
|
|
|
|
|
|
|