Solved

Virtual Machine Configuration

Posted on 2011-02-16
16
973 Views
Last Modified: 2013-11-16
A friend of mine and I are considering starting up a small hosting business where we will be primarily focusing on allowing people to host game servers on virtual machines that all reside on a single server. If two people were hosting the same game, on the same port, how would we route the traffic to the corresponding virtual server while still utilizing the same port?
0
Comment
Question by:nmanley
  • 8
  • 8
16 Comments
 
LVL 4

Accepted Solution

by:
gmooney7 earned 500 total points
ID: 34912588
It is a non issue, since each virtual machine will have its own ip(s).....so you can have an instance on each vm run on the same port, they will be running on different ip's.
0
 

Author Comment

by:nmanley
ID: 34912595
I understand that. They will all be "local" IPs though. We do not have the capital for multiple static WANs.
0
 
LVL 4

Expert Comment

by:gmooney7
ID: 34912600
On another note, if you have multiple game instances on a single vm, you can do nat translation on your router.  This will still require you have to multiple ip's available, but you will be able to redirect traffic destined for the same port on different ip's, to the same vm on other ports than the default.

Let me know if you need clarification.
0
 
LVL 4

Expert Comment

by:gmooney7
ID: 34912607
If you have a single ip, then you will not be able to do it.  

1 application per port per ip
0
 

Author Comment

by:nmanley
ID: 34912731
By single IP do you mean single WAN or single LAN? They will all have unique LAN IPs of course but not unique WANs.
0
 

Author Comment

by:nmanley
ID: 34913057
To expound a bit - I'll make an example.

With 5 different domains all hosting a similar, but independent server.

Let's call them www.domain1.com, www.domain2.com, etc. The port used is hard-coded into the client, not difficult to change - but a hassle none-the-less.

Each domain/server is owned by a different group/company/person/whatever. Rather than making the players/servers go through the hassle of changing the ports on the client/server configuration, is there a way to have all of the games come through the same port, on the same internet line, but route to the different corresponding server on the internal network?

players connecting to domain1.com on port 12345 go to port 12345 on internal ip 192.168.1.101
players connecting to domain2.com on port 12345 go to port 12345 on internal ip 192.168.1.102
etc, yet all going to the same WAN address.
0
 
LVL 4

Expert Comment

by:gmooney7
ID: 34913080
Someone else may have an idea, but as far as I know, this can't be done.  Somehow the packets would have to be tagged coming from the client, and your router would have to know how to deal with the tags. This functionality does not exist in a router as far as I know, because it would have to work at layer 4 or above.  

Name based hosting of web servers is similar, but the webserver knows which content to send based on the http header.  But we're still talking one server, answering on one port, 80.

So, I don't think  you can do it like you want, but someone else may have an idea.
0
 

Author Comment

by:nmanley
ID: 34913112
Hrm. That was kinda where the idea started as - name based hosting of web servers.

We currently have a few sites hosted on our server, and one of the mentioned game servers. We were just trying to thing of ways to appeal to the potential customers. Requiring that they configure their servers differently than defaulted, and requiring that their players do the same with the client isn't a very appealing aspect for a paid service.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:nmanley
ID: 34918112
Also, it is still technically one server as far as the router is concerned...it'd be multiple VMs.
0
 
LVL 4

Expert Comment

by:gmooney7
ID: 34918144
Yes, but the VM's will have their own ip's, mac addresses, etc.  They are different servers as far as the router is concerned.
0
 

Author Comment

by:nmanley
ID: 34918502
In that case then, what if there was an initial server which grabbed the initial packet, checked it for a particular domain, flagged the incoming ip and sent all requests by that ip on that port to the appropriate server.

So the first packet/set of packets is scanned for a domain and then all future requests are forwarded to the appropriate vm until a disconnect packet is sent, at which time, it removes it from the list.

Not sure how programming/processing intensive this would be, but just an idea.
0
 
LVL 4

Expert Comment

by:gmooney7
ID: 34919092
This could work with the right code.  It would essentially be a proxy.

But the expense of writing this complex code would be cheaper than leasing a block of ip's?

Your application couldn't support some type of game browser similar to gamespy or other in game browser that could query a service on your server, and then let the client know which port to connect to?
0
 

Author Comment

by:nmanley
ID: 34919305
We wouldn't be able to have an in-game browser because the client would be connecting to a different customer's server. We would not want a client to be aware that they are connecting to a server that handles multiple game servers. Essentially we are looking for a way to set up a routing method similar to virtual hosts with Apache except the services accepting the request would be different based on where it was routed. I guess the only way I can think of to achieve this without leasing a block of IPs would be to write a program that works as Apache does in redirecting packets based off header information. Do you have any other ideas or suggestions?
0
 
LVL 4

Expert Comment

by:gmooney7
ID: 34919325
That is the extent of what I know you might try.

I'm not a programmer by trade, so I can't be of much help on the coding side of things.
0
 

Author Comment

by:nmanley
ID: 34919521
Do you think it would be possible to set up a DNS server of sorts that reads the global request based off hostname and redirect it locally?
0
 
LVL 4

Expert Comment

by:gmooney7
ID: 34919638
I don't see why not.  It wouldn't have to be a dns server, but the client would have to send the hostname along in its packets. The proxy server that distributes the traffic would have to recognize the tag, create new packets with a new destination port and send it on to the server.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VPN Problems 3 53
Use VLAN to separate WiFi from everything else 9 80
1 WAN to 2 LAN 4 61
Watchguard XTM 2 55
Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now