Chocolate Software Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: FSHost Server and Game PC on same network.  (Read 10720 times)

Nostradamus

  • Newbie
  • *
  • Offline Offline
  • Posts: 5
FSHost Server and Game PC on same network.
« on: May 25, 2008, 05:52:10 PM »

Hi.

First of all i like to thank Russell Gilbert for an amazing product:)

Okay over to my problem, hehe

First some network info:

- FSHost server running on IP: 192.168.100.101
- Game PC with FS2004 on IP: 192.168.100.102

So far i have been reading here I need to open those ports in my ROUTER:
(My FSHOST server are only for FS2004 and FSX players.)

- UDP 23456        (default port for FS2004 and FSX)
- UDP 23432        (For FsNavigator users)
- UDP 6073          (DirectPlay8)
- UDP 2300-2400 (DirectPlay8 Range)
- TCP 80             (FSHOST Web)

In my ROUTE NAT Port Forward i have those rules:

  If         Protocol         Ext. port range           NAT IP              Int. port range             Description     
   
WAN         UDP                23456            192.168.100.101            23456                       FSHost Server UDP 23456 FS2004/FSX

WAN         UDP                23432            192.168.100.101            23432                       FSHost Server UDP 23432 FsNavigator

WAN         UDP                 6073             192.168.100.101             6073                       FSHost Server UDP 6073 DirectPlay8

WAN         UDP             2300-2400         192.168.100.101         2300-2400                   FSHost Server UDP 2300-2400 DirectPlay8 Range

WAN         TCP              HTTP                192.168.100.101            HTTP                        FSHost Server TCP 80 (HTTP)

And in my ROUTER Firewall Rules that are made automatically by the NAT Port Forward above:

Protocol     Source     Port            Destination          Port        Gateway     Schedule     Description

   UDP            *          *          192.168.100.101      23456          *                               NAT FSHost Server UDP 23456 FS2004/FSX

   UDP            *          *          192.168.100.101      23432          *                               NAT FSHost Server UDP 23432 FsNavigator

   UDP            *          *          192.168.100.101      6073            *                               NAT FSHost Server UDP 6073 DirectPlay8

   UDP            *          *          192.168.100.101  2300 - 2400      *                               NAT FSHost Server UDP 2300-2400 DirectPlay8 Range

   TCP            *          *          192.168.100.101      HTTP           *                               NAT FSHost Server TCP 80 (HTTP)


So far i know.. nobody have problem to connect my FSHost server from the Internet.

- I like to know if my ports are correct open, maybe i have added to many ports for only FS2004 and FSX??
- What ports need the clients to open in his ROUTER/FIREWALL to connect my FSHost server?
- I have figured out some players are still allowed to connect my FSHoster server even they are connected with another port, how do i block users with another port use that my FSHost are running? I have connection monitor in my Firewall/Router so i can see the players port they are connected from.
And example in my connection monitor look like this:

192.168.100.101:23456 <--- AAA.BBB.CCC.DDD:23456 <--- 215.XXX.XXX.XXX:48759

As you can see his connect to my FSHost server with port UDP 48759, how do I prevent users to do that. I only want user to connect with UDP 23456 and a correct monitor connection look like this:

192.168.100.101:23456 <--- AAA.BBB.CCC.DDD:23456 <--- 215.XXX.XXX.XXX:23456

Here is a info from my connection monitor in my ROUTER/FIREWALL:
Good connection :)

Protocol          Source             ->           Router             ->         Destination                 State        

udp    192.168.100.101:23456 ->     MY EXT. IP:51951 ->          User 1 IP:23432    MULTIPLE:MULTIPLE
udp    192.168.100.101:23456 <-     MY EXT. IP:23456 <-          User 1 IP:23456    MULTIPLE:MULTIPLE

udp    User 1 IP:23432           <-      192.168.100.101:23456                                 MULTIPLE:MULTIPLE    
udp    User 1 IP:23456          ->       192.168.100.101:23456                                 MULTIPLE:MULTIPLE    


Users with wrong ports make problems to other user to connect, they got this message: "Unable to connect to all players"? that's way i need to block other ports to connect to my FSHost server.

- And now... I also like to play on my own Server, hehe. I have figured out sometimes, when i'm playing in my own server with my Game PC (IP: 192.168.100.102) not all user can join the server becouse of me :(

I connect my own FSHost server with port 23456 i FS2004 multilayer setting and i can use IP: 192.168.100.101 or my external IP(AAA.BBB.CCC:DDD) and can do the same with FsNavigator with port 23432. To me it's look like it's FsNavigator that makes problems for someone to connect. So if i disconnect my FsNavigator, they can connect, hmm

Not sure why i have problem with this, do i need to connect to my FSHost server with another port, like 23455 and port 23433 i FsNav?

I'm running UPnP service in my ROUTER/FIREWALL so i can see programs using UPnP like FSHost and my FS2004.

The UPnP Status in my ROUTER/FIREWALL look like this:

  Port     Protocol          Internal IP                 Description
6073         udp         255.255.255.255             dpnsvr (255.255.255.255:6073) 6073 UDP
23456       udp         192.168.100.101             FSHost32 (192.168.100.101:23456) 23456 UDP

When i join my FSHost server, then i got two new UPnP here:

28415        udp      192.168.100.102               fs9 (192.168.100.102:23456) 28415 UDP
23432        udp      192.168.100.102               fs9 (192.168.100.102:23432) 23432 UDP

As you can see, when i connect to my own FSHost Server with port 23456, the port are changed to 28415, but if join with port 23455, than the UPnP shows this:

23455        udp      192.168.100.102               fs9 (192.168.100.102:23455) 23455 UDP

So what do i need to open in my ROUTER/FIREWALL so i can join my own FSHost server without making problems for other? or
What port do I need to use to connect to my own FSHost server?

Thanks alot, and sorry for the long post. If you need more info, just let me know :)

Cheers!
« Last Edit: August 27, 2008, 09:12:36 AM by Nostradamus »
Logged

wheelie

  • Senior Member
  • ****
  • Offline Offline
  • Posts: 111
    • Flightservers.net
Re: FSHost Server and Game PC in same network.
« Reply #1 on: May 26, 2008, 02:18:12 AM »

My set up might be similar to yours (and there is a long thread on this here: http://www.chocolatesoftware.com/forum/index.php?topic=636.0).

In summary, what I have found that works is:

1. Router 1 (the one connected to the Internet) forwards UDP ports 2302-2400, 6073, and 23456 to Router 2 and also forwards TCP ports 81-84 to Router 2 (because I have four servers running).

2. Router 2 (the one to which all the PCs on the LAN are connected) only forwards TCP ports 81-84 and UDP port 23456 to PC 1 (the one running the four FSHost sessions).

As far as I can understand it what happens is that connections from the outside world come in on port 23456 and 6073. All four servers are 'listening' on port 6073 and so all four will respond to the request and the pilot attempting to connect will see all four servers on the connection dialog. FS9 and FSHost then negotiate whatever port they want to use. For internal connections, I suppose something similar happens but the packets stay on the LAN rather than being sent to the big wide world through Router 1).

With this setup I have been able to have an FSX session running on PC 2 and an FS9 session running on PC 3 and have other pilots connecting from the outside world.

The only 'drawback' I have seen with this setup is that it is very unforgiving when people connect and they have not got their own port forwarding operating correctly (i.e. if one person has a bad setup then nobody can connect to any of the servers). When I have found this problem I have had to 'kick' one player at a time and retry the connection until I find which player was the culprit and then apply a temporary ban on that player.
Logged

Nostradamus

  • Newbie
  • *
  • Offline Offline
  • Posts: 5
Re: FSHost Server and Game PC in same network.
« Reply #2 on: May 26, 2008, 04:01:50 AM »

Hi.

Thanks for your replay :)

Well not quit sure if we have same setup, but i only have one ROUTER with 7 clients inside. One FSHost server on local IP 192.168.100.101 and my FS2004 computer with local IP 192.168.100.102 the rest of the computers are not important now. :)

                                                                                     Internet
                                                                                          v
                                                                                          |
                                                                                          |
                                                                                          |
                                                                                          |
                                                                                          V
                                                                          |^^^^^^^^^^^^^^|
                                                                          | ROUTER/FIREWALL   |
                                                                          |       Local IP:             |
                                                                          |   192.168.100.10       |
                                                                          |      DHCP Server       |
                                                                          | 192.168.100.100-     |
                                                                          | 192.168.100.110      |
                                                                          ^^^^^^^^^^^^^^^
                                                                         /                                 \
                                                                        /                                   \
                                                                       /                                     \
                                                                      /                                       \
                                                                     /                                         \
                                                                    /                                           \
                                                                   V                                           V
                                                 |^^^^^^^^^^^^^^                 |^^^^^^^^^^^^^^
                                                 | FSHOST Server PC1 |                |    MY FS2004   PC2   |
                                                 |         Local IP:          |                |         Local IP:          |
                                                 |   192.168.100.101    |                |   192.168.100.102    |
                                                 ^^^^^^^^^^^^^^^                ^^^^^^^^^^^^^^^

Okay,, and now. In my ROUTER/FIREWALL Local IP: 192.168.100.10 i have Port Forward those ports:

- UDP 23456
- UDP 23432
- UDP 6073
- UDP 2300-2400
- TCP 80

       TO

FSHOST Server PC1 like i wrote in my first post :)
All those ports are port forwarded to FSHOST (192.168.100.101)

And everything looks OK, other can connect to my FSHOST Server.

And now, what ports do i need to port forward from my ROUTER/FIREWALL to my FS2004 computer(192.168.100.102)?
Have I port forwarded to many ports from ROUTER/FIREWALL to FSHOST Server?

I have problem to connect FSNavigator from my FS2004 game PC2(192.168.100.102) when some user are connect from outside, still when they have correct port.
The problem is, when i connect to my own FSHOST Server from my FS2004 Game PC with port 23456 in FS2004, my ROUTER/FIREWALL change my port to another port automatically, and that port can be whatever. And that's the problem when other user don't have my "new" porten open. The reason why i got new port, it's becouse port 23456 are in use by FSHOST Server. How can i fix this problem, do i need to tell everyone to open a new port range in there ROUTER i.e like UDP 23455 - UDP 23456 so i can use port 23455 in my FS2004 game PC to connect my FSHOST Server so my ROUTER/FIREWALL don't change my port?? This FS stuff here make my crazy, hehe I have been running lot of game servers here, and FS it's the worst game to make running good in LAN, hehe "Bi... slap Microsoft for that" :D :D

Thanks ;)
« Last Edit: August 27, 2008, 09:17:33 AM by Nostradamus »
Logged

wheelie

  • Senior Member
  • ****
  • Offline Offline
  • Posts: 111
    • Flightservers.net
Re: FSHost Server and Game PC in same network.
« Reply #3 on: May 26, 2008, 11:40:39 PM »

Hi,

OK. My set-up is different cos I have another router between the internet and your router/firewall.

The problem I see with your set-up (and of course the real experts in this area will tell me I am wrong) is that whenever your router gets a packet on any of the ports you are forwarding it will always be sent to your FSHost server. The result will be that when another player's session tries to send you information then it will be sent to your FSHost server (192.168.100.101) and not your session (192.168.100.102) so the other player will get the "not all players were able to connect" message because your session didn't respond.

It was because of this that I stopped forwarding all ports to the FSHost server except UDP 23456 and TCP 81-84. I rely on FSHost listening to port 6073 and responding to any requests and then somehow the router figures out where to send the packets to. However, when I connect to my FSHost server I use a port number like 28000 and each of the FSHost servers responds. Example from the fshostclient debug log
Quote
080527 07:23:09  *** DPlayMsg: DPN_MSGID_ENUM_HOSTS_RESPONSE, port=23456, session=World Tour and Free Flight
080527 07:23:09  *** DPlayMsg: DPN_MSGID_ENUM_HOSTS_RESPONSE, port=23455, session=Everest Mountain Rescue
080527 07:23:09  *** DPlayMsg: DPN_MSGID_ENUM_HOSTS_RESPONSE, port=23454, session=UK Coastline
080527 07:23:09  *** DPlayMsg: DPN_MSGID_ENUM_HOSTS_RESPONSE, port=23453, session=Airline Pilot
080527 07:23:10  *** DPlayMsg: DPN_MSGID_ASYNC_OP_COMPLETE, hResult: 0x0
080527 07:23:10  *** DPlayMsg: DPN_MSGID_ASYNC_OP_COMPLETE, hResult: 0x0
080527 07:23:23  *** DPlayMsg: DPN_MSGID_CREATE_PLAYER, player: *Radar (FSHost 3.2), observer: no, plane: (Host), id: 2038309980
080527 07:23:23  Added player: *Radar (FSHost 3.2)
080527 07:23:23  Connected to host: 'Airline Pilot' on IP: 192.168.123.95, port: 23453
So, each of the servers responded and when I chose which server I wanted then it used port 23453.

As to your 'problem' with users getting different ports than the ones you specify, I don't think you need to worry about that because FSHost and FS9/FSHostClient negotiate which ports to actually use and so you can't force them to use a specific port (in theory they negotiate in the range 2302-2400).

Now I just have to sit back and wait for all the experts to tell me I am completely wrong  ::)
Logged

Russell Gilbert

  • Administrator
  • Guru
  • *****
  • Offline Offline
  • Posts: 1476
    • FSHost
Re: FSHost Server and Game PC in same network.
« Reply #4 on: May 27, 2008, 02:51:06 PM »

Hi Nostradamus,

Wheelie is correct, you're forwarding all the right ports, but a port can only be forwarded to one machine at a time.  You have to forward them to FSHost, and you've done that.  But the problem is that when you're connected to the session from the second machine, and then someone else joins, their FS tries to send a packet to your second machine, but how can it get to that machine if the ports are forwarded to the FSHost machine?  The packet goes from their PC to your router, then your router has to figure out how to send it to your second PC.  But since the packet arrived on one of the forwarded ports, the router has no choice but to send it to the FSHost PC, and the second PC never gets it.  That's the problem with using two machines on the same LAN.  :(

The best option is to run both FSHost and FS on the same machine.  Many people do that, and I think you'll find that FSHost doesn't use that much of your CPU, so you probably won't see much of a hit at all in your FS performance.  If you do that, your problems will be over.

If you absolutely can't run them both on the same machine, then you can try what wheelie suggested and forward some of the ports to FSHost and some of them to your second machine, but I think you'll eventually have problems with some users even in that case.  But it may work for some people.

The other option is to try DXport, which allows you to forward part of the 2302-2400 range to one PC, and part to another PC.  More info in my post here:

http://www.chocolatesoftware.com/forum/index.php?topic=408.msg2187;topicseen#msg2187

Russell
Logged

Nostradamus

  • Newbie
  • *
  • Offline Offline
  • Posts: 5
Re: FSHost Server and Game PC in same network.
« Reply #5 on: May 27, 2008, 06:05:25 PM »

@ Russell Gilbert and wheelie

Thank you so much for all the info. :)
I got lot of info now, and I'm gonna do some tests and see if there is another way around this :)
I have lot of options in my ROUTER/FIREWALL like NAT 1:1, Outgoing NAT, NAT Forwarding you name it, hehe
I really miss a debug info in FS2004. Do FSHOST have a debug info file somewhere? :)


Thanks allot both of you. I let you know if i found a solution, hehe
And if there is other Networks experts out there that maybe know a way around, let's us know :)

 


Logged
Pages: [1]   Go Up
 

anything