worldofbalance / wob-server

4 stars 6 forks source link

Port for Sea Divided #10

Closed anuagg closed 8 years ago

anuagg commented 8 years ago

I had a doubt regarding which port to use to run the new game server. As per my knowledge we are using port 20038 and 20039 tcp/udp ports to run cow and rr servers. So, should I use 20040? Are these ports randomly chosen or do they have any specific significance. Is there any specific port that I should use or 20040 is fine?

Fito commented 8 years ago

Using port 20040 should be fine. These ports are now hardcoded. Ideally we would make the ports configurable, in the minigames_conf file. I will work on that, but in the mean time go ahead and use 20040

Fito commented 8 years ago

Answering your question, the Internet Assigned Numbers Authority port list states: "Port numbers are assigned in various ways, based on three ranges: System Ports (0-1023), User Ports (1024-49151), and the Dynamic and/or Private Ports (49152-65535)" So any port from 1024 to 49151 is ok to be used by users (us). Some people also claim that the highest the port number, the more secure it is, but I don't know much about that.

jensvdh commented 8 years ago

Yes. Well known software usually uses ports 0 - 1023. HTTP on 80, SSH on 43 and so on. So do not use those ports.

Anything above that is safe to use by "other applications". Other than the well known ports the only thing on our server facing the outside world is MySQL (3306) and Apache (80)

Maybe we can add a wiki page with all the software used by our game and which ports it is running on?

Also, it would be great if we could have a configuration file that all minigames read from and can get their port number from? That way we can dynamically change the port number instead of having to recompile our entire code base.

@Fito I don't think any port number is "more secure" than the other. It really is just an identifier. Usually most ports are locked down from the outside world and whitelisted using a firewall like IPtables. Not sure how that is setup on thecity.sfsu.edu, will have to investigate.

anuagg commented 8 years ago

okay, as using port 20040 seems to be safe, I'll use that. And yes, reading port numbers through minigame_conf file is definitely the ideal thing to do. We'll be working on that.

Adding a wiki page can help, both us and the future users, in case of checking port availability, avoid use of same port or to know what all software are being used. So, if we know all the ports that are being used, then we can go ahead and create a wiki page. I don't know much about the ports used though.

jensvdh commented 8 years ago

Cool. I'll SSH into thecity this weekend and see which ports are being used using IpTables and then report back here.

anuagg commented 8 years ago

@rujoota @niculistana Ports used for Card of wild and running rhino are 20038 and 20039 right ? If so, @worldofbalance/client We'll have to update the Constants file scripts for both running rhino and card of wild inside wob_client code. I can see these port numbers as comments in there.

niculistana commented 8 years ago

@anuagg I believe so, unless @Fito changed anything.

Fito commented 8 years ago

I didn't change anything. Those should still be the ports used.

rujoota commented 8 years ago

Same here, I didn't change anything