LxCenter HyperVM & Kloxo Support

Forum



Members   Search      Help    Register    Login    Home
Home » Development Forums » HyperVM Development » fix_network_forwarding(Is this necessary?)
fix_network_forwarding [message #90407] Thu, 27 October 2011 13:05 Go to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
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
Re: fix_network_forwarding [message #92404 is a reply to message #90407] Mon, 12 December 2011 10:06 Go to previous messageGo to next message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2073
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative

I dont know if it is related, but HyperVM is acting as a router.
Do a traceroute to a VPS and you see it always goes first through the HyperVM server.
List iptables --list and you see all your VM IP's are forwarded.

So without that it might not work.. but maybe i have it wrong.




LxCenter - System Operations
Re: fix_network_forwarding [message #92492 is a reply to message #92404] Mon, 12 December 2011 23:40 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
All seems to work quite wellwith about 10 VMs running including 2 Windows VMs.

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: fix_network_forwarding [message #92693 is a reply to message #92492] Fri, 16 December 2011 11:49 Go to previous messageGo to next message
LxCenter_Danny is currently offline LxCenter_Danny  Netherlands
Messages: 2073
Registered: July 2007
Location: Netherlands
Grandmaster
LxCenter Core Team Member
LxCenter Representative

And the iptables list is empty ?




LxCenter - System Operations
Re: fix_network_forwarding [message #92695 is a reply to message #92693] Fri, 16 December 2011 12:01 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
No it isn't empty. I will also confirm that as HyperVM was designed to do that the Windows VMs don't see each other through NetBIOS. What would you like me to check to ensure that it is or is not needed?

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: fix_network_forwarding [message #100877 is a reply to message #92695] Sun, 02 September 2012 04:24 Go to previous message
semir is currently offline semir  Hungary
Messages: 985
Registered: January 2011
Location: Hungary
Senior Master
Forum Administrator
LxCenter Evangelist
Yep, but you are using bridged networking (as you use xen).
OpenVZ does need the ipv4 forwarding enabled.


ProfiVPS.com Cheap VPS hosting! Buy it from me Smile
ProfiVPS.hu Megbízható, Olcsó VPS bérlés, Virtuális szerver bérlés

If I helped you, please consider putting my link on your site/blog! Thank you in advance Smile

Do not forget: HyperVM and Kloxo are open source projects. As such, they need your contribution: if you were helped, add your 50 cents, and try to help others with their problems later.
Previous Topic:windows virtual server
Next Topic:HyperVM Wiki - Community Documentation
Goto Forum:
  


Current Time: Wed Jun 19 22:22:27 EDT 2013

Total time taken to generate the page: 0.01135 seconds
.:: Contact :: Home :: Privacy ::.

Click here to lend your support to: LxCenter and make a donation at www.pledgie.com !

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software