Jump to content

  • Log In with Google      Sign In   
  • Create Account

Creating an MMORPG - Connecting/Opening Ports?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Foamkittygamer   Members   -  Reputation: 102

Like
0Likes
Like

Posted 20 February 2013 - 02:08 PM

Hi, I was working on a mmo project a few months back, and I've been testing it out with a port with some problems. For some reason I couldn't connect to the internet for my game to access my server. I created a system where I can send a string text (done in java), and the server would respond confirming a connection to my game to the server.

 

I affirmed that the coding is fine with no errors, but maybe it's because I have been using a random port instead of one that could be used by more common online games.

 

Is there any suggested ports that I should use for my MMORPG? I need one that isn't firewalled and can connect accross the web using the string of text I'm sending through it.

 

Someone suggested I use port 80, but my concern is that hackers can access my files by using a browser with easy access to the data. Given that the database won't be part of the transmission, but logged seperately for security, I still don't think an HTTP port is the best option... I could be wrong.

 

Any suggestions?


Edited by Foamkittygamer, 20 February 2013 - 02:08 PM.


Sponsor:

#2 SimonForsman   Crossbones+   -  Reputation: 6324

Like
1Likes
Like

Posted 20 February 2013 - 02:45 PM

The port you use shouldn't have any impact on security. for a browser to be able to access your server files your server has to explicitly make those available through the HTTP protocol.

clients should be able to connect to any port so the most likely issue is that your server (or a router between your server and the internet) is misconfigured
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#3 Havsmonstret   Members   -  Reputation: 464

Like
1Likes
Like

Posted 20 February 2013 - 03:09 PM

Here's a list of ports that are known to be used for various applications: http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

I'd not recommend using port 80 though, or any other port that are known to be used for obvious reasons. It wont cause any troubles for the clients though.


Edited by Navall, 20 February 2013 - 03:10 PM.


#4 Foamkittygamer   Members   -  Reputation: 102

Like
0Likes
Like

Posted 20 February 2013 - 04:04 PM

Yeah, I checked that out before. I guess I just need to keep testing.

 

I opened a port from the server-side, and tried to get a response from my game client. It didn't seem to work, and I checked my code over a few times (for both applications), and they seem to be fine.

 

I used a reference to make sure the connection protocol was correctly called too.

 

Is it possible that, even if I opened the port, that there could be something else I need to make the connection work?


Edited by Foamkittygamer, 20 February 2013 - 04:06 PM.


#5 Kylotan   Moderators   -  Reputation: 3338

Like
2Likes
Like

Posted 20 February 2013 - 04:21 PM

Someone suggested I use port 80, but my concern is that hackers can access my files by using a browser with easy access to the data.

 
That's not how ports work, don't worry. Ports are just numbers, and don't give anybody any special mode of access. If you are listening on port 80 with your application then there can't be a web server also listening on port 80, which means there is no way a browser can get any web data from your machine, never mind access any files.

 

Is there any suggested ports that I should use for my MMORPG? I need one that isn't firewalled and can connect accross the web using the string of text I'm sending through it.

 

Technically you don't connect to MMOs across the web, you connect across the internet. The web is the subset of the internet that uses HTTP and web pages.

As for which ports are firewalled, any or all of them could be. Really you just have to pick an arbitrary number (above 1024, preferably) and let the client know which one it is.

 

Regarding debugging your problem - add plenty of logging on both sides to see if the connection gets made at all. There should be no doubt - either the connection is made, or it is not, and you need to check the error values to find out what is happening. That will usually give you some idea of what the problem is. (eg. bad host name, connection refused, connection timed out, some other exception). Ideally you test with both client and server on a local machine to verify that the logic is correct, then try remotely, opening firewalls and enabling port forwarding on the server end as necessary.



#6 Khatharr   Crossbones+   -  Reputation: 3078

Like
2Likes
Like

Posted 20 February 2013 - 08:31 PM

As for which ports are firewalled, any or all of them could be. Really you just have to pick an arbitrary number (above 1024, preferably) and let the client know which one it is.

This is the accepted method. Port numbers lower than 1024 are 'reserved' for specific purposes. In terms of programming and socket access this means almost nothing. You can use those port numbers just like any other. It just means that when people see those numbers they may expect the associated service on that port, so typically you want to use one that's not in the reserved range. Port numbers are 16 bits and unsigned. The maximum value is typically not used, so any number between 1024 and 65534 is available to you.

You may want to look into WireShark if you're working with networking. It will let you peek at what's actually going over the wire.


void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS