Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 985
  • Last Modified:

Virtual Machine Configuration

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
nmanley
Asked:
nmanley
  • 8
  • 8
1 Solution
 
gmooney7Commented:
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
 
nmanleyAuthor Commented:
I understand that. They will all be "local" IPs though. We do not have the capital for multiple static WANs.
0
 
gmooney7Commented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
gmooney7Commented:
If you have a single ip, then you will not be able to do it.  

1 application per port per ip
0
 
nmanleyAuthor Commented:
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
 
nmanleyAuthor Commented:
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
 
gmooney7Commented:
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
 
nmanleyAuthor Commented:
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
 
nmanleyAuthor Commented:
Also, it is still technically one server as far as the router is concerned...it'd be multiple VMs.
0
 
gmooney7Commented:
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
 
nmanleyAuthor Commented:
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
 
gmooney7Commented:
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
 
nmanleyAuthor Commented:
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
 
gmooney7Commented:
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
 
nmanleyAuthor Commented:
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
 
gmooney7Commented:
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

Who's Defending Your Organization from Threats?

Protecting against advanced threats requires an IT dream team – a well-oiled machine of people and solutions working together to defend your organization. Download our resource kit today to learn more about the tools you need to build you IT Dream Team!

  • 8
  • 8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now