Jump to content
Sign in to follow this  
4ntifa

Hosting on a multihomed host? Ports needed?

Recommended Posts

Is it possible to host a game on a multihomed (ie. multiple IPs and NICs) host, and if it is, how do you define which IP to host on?!

Which ports does a DEDICATED SERVER need? The only useful reference was the firewall section in AvonLady's FAQ, but it doesn't give a clear answer nor distinguish between ports needed by client and server.

Also, people seem to have trouble limiting the amount of players on a dedicated server. I've seen someone refer to a setting called "maxPlayers" or something, but found nothing in the 1.42 update's admin manual!

Share this post


Link to post
Share on other sites

I didn't understand the first part of your question, but a DS runs on UDP port 2234 by default.

-Rekrul

Share this post


Link to post
Share on other sites

Yeah, I know it runs on UDP 2234, but according to some FAQs etc. it also needs TCP 2234, TCP & UDP 2235 and a range of other ports. The other ports are, AFAIK, needed by client only, except possibly 2235. What I'd reallyreallyreally love to see is some official info from the BIS guys!

And about the first question... lets put it this way:

Mr. Host is sharing his internet connection to several boxes on his LAN. In order to do this, he has two network cards - one connected to his internet connection (ADSL, cable or whatever), and one connected to his LAN's HUB or switch. The card connected to internet is assigned a public IP, which is a "real" address, while the other one and the other LAN boxes have a "fake" IP in one of the private IP address ranges. NAT (network address translation) runs on his machine connected to the internet, translating the private network IPs to his public IP and vice versa in order to provide internet connection to the machines with no public IP. (Still with me?)

Mr. Host wants to run an OFP server on one of his boxes. If he chooses to run it on the machine with two network interfaces, there has to be a way of telling OFP on which IP to "listen" for incoming connections. If he chooses to host OFP on another machine (behind NAT and possibly firewall), he has to know which ports to forward to the machine (machines behind NAT are not visible to the world and cannot act as a server unless the ports in question are forwarded to the particular machine instead of hitting the NATting machine).

Actually, the multi-homed scenario concerns a friend of mine, we found I couldn't connect to (or even find) his multihomed OFP server while I can connect to other servers without a problem. The NAT scenario concerns me, since I run a separate NAT/DHCP/firewall box which runs on FreeBSD since I couldn't be convinced to do such critical task on a Windows box. biggrin.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (4ntifa @ Jan. 30 2002,08:33)</td></tr><tr><td id="QUOTE">I hate myself for doing this... sad.gif<span id='postcolor'>

As you should wink.gif

Share this post


Link to post
Share on other sites

*bump!!!*

Muahahahahahahahahaahahahahahahaaaaaa.....

Share this post


Link to post
Share on other sites

*delete user confirm y/n*

Muahahahahahahahahaahahahahahahaaaaaa.....

wink.gif

Share this post


Link to post
Share on other sites

Sorry, been away.

First off, you _only_ need one port to host the game. GameSpy probes your server on the following port e.g. you run server on 2234, GS probes on 2235. The range of ports 2300-2400 is DirectX ports wich are not neccesary (atleast not on DS).

As for the first part of your Q, I get it now. Good explenatiton.

This is what you have to do;

If you're running the server on one of the machines with LAN IP, you have to set port forwarding in the machine with NICs. You forward e.g. port 2234 (and 2235 if you'd like it to show in GS) to the LAN IP of the machine running DS.

If you want to run several machines with DS you have to run them on different ports (with the -port=nnnn promptcommand for the DS .exe file) and Port Forward the diff. port to the respective LAN IP. Remember to forward correct port to correct LAN IP, it's very annoying if you don't do, cause it takes you forever to realise. smile.gif

The clients not on your LAN has to connect to your WAN IP. That's the global IP you get from the ADSL modem. Typing 'ipconfig /all' in DOS (WinNT systems) or winipcfg (win9x/ME) will show you this IP. LAN clients has to connect to the LAN IP.

If you want to run the server on the machine with multiple NICs, I'm not sure how you bind the OFP server to the 'WAN NIC' but again if you use port forwarding to the LAN IP of your 'LAN NIC' you should be safe. If the OFP server is bound to the 'WAN NIC' they'll connect directly, if OFP server is bound to 'LAN NIC' port forwarding will fix it for you.

Feel free to ask if I was unclear.

-Rekrul

Share this post


Link to post
Share on other sites

Oh! And ofcourse, if you have a firewall there, make sure you open UDP 2234 to the LAN IP of the DS Server.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×