Home
News
rFactor 2
rFactor 1
Forums
Contact
Company
Technology
Image Space Inc. YouTube rFactor 2 Twitter Image Space Inc. Google Plus rFactor 2 Facebook
Mediafire
Try or Buy rFactor 2
$43.99/84.99 Windows Only PCDL
Download rFactor 2 Demo Now!

NOTICE Notice: This is an old thread and information may be out of date. The last post was 829 days ago. Please consider making a new thread.
Results 1 to 17 of 17

  Click here to go to the first staff post in this thread.   Thread: Dedicated Server Ports

  1.   Click here to go to the next staff post in this thread.   #1
    Tim Wheatley's Avatar ISI Staff

     rFactor 2 Validated PC Specification @timwheatley1979 YouTube Channel Twitch/Streaming Channel Photo/Screenshot sharing profile 

    Location
    USA (Central)

    Dedicated Server Ports

    Ports required for successfully hosting LAN races

    Port Number
    34447 TCP Session, Race and Chat Information
    34297 UDP LAN Query Information
    34397 UDP Race Event Information

    Ports required for successfully hosting Internet only races

    Port
    34447 TCP Session, Race and Chat Information
    34397 UDP Race Event Information

    For detailed instructions on setting up port forwarding in your router visit: PortForward.com
    Locate your router brand, then click on your model number.
    On the next page is a large list of products. Scroll down and click on rFactor.
    The following page will contain detailed instructions.

  2. #2
    fastorro's Avatar

     rFactor 2 Validated PC Specification @fastorro Where I race Modding Group 

    Registered
    Oct 2010
    Location
    Barcelona
    The port 34297 required for internet races... isnīt it?

    Anyway it's more simple to do access "rfactor dedicated.exe" when windows firewall advice to you for block or access it.

  3.   This is the last staff post in this thread.   #3
    Jeremy Miller's Avatar ISI Staff

     rFactor 2 Validated PC Specification @jeremymmiller 

    The query port should not be need to host and internet race. It is used to discover servers running on a LAN by broadcasting a message on the LAN subset to that port. If any servers see that broadcast, they will respond to the originator of the message. This method does not work on the internet. On the wider internet; the matchmaker stores a server's query data and clients interact with the matchmaker to get Race Event Port. Once the client get the Race Event Port, they can a attempt to join on that port. 34447 is used for transferring setups and other non real-time traffic.

  4. #4
    fastorro's Avatar

     rFactor 2 Validated PC Specification @fastorro Where I race Modding Group 

    Registered
    Oct 2010
    Location
    Barcelona
    but... i connect to our server by iport and i use 34298 or 34299 etc...

  5. #5
    Achim Ennenbach's Avatar

     PC Specification 

    Newer Member
    Oct 2010
    Location
    Germany, near Bonn
    Are there any ports to query the normal game (not the dedicated) to get current track and session and/or other informations?
    I tried the ports mentioned above but get always an "ConnectionClosed" or "TimedOut" error ...

  6. #6
    Gonzo's Avatar

     rFactor 2 Validated PC Specification 

    Location
    Germany, Essen
    Knowledgeable member
    I wonder why you do not add in which direction those ports are needed?
    Inbound or outbound?

  7. #7
    Achim Ennenbach's Avatar

     PC Specification 

    Newer Member
    Oct 2010
    Location
    Germany, near Bonn
    I want to query the game for current trackname, session and what's possible else. I think that's what you call "outbound", right?
    I don't want to control rfactor, simply "ask for information".

    I'm asking this, because i'm writing a software which logs some memory values from rfactor and process information for some kind of cheat "detector/logger" and it would be great to get at least the values for current trackname and session directly per TCP or UDP query from rFactor.
    Other informations (like current profile, spectator mode yes/no) would be great too, but track and session is what is needed currently the most.

    I tried to use the code, Rene from Wiesenthal Racing uses to query the dedicated server and it works very well for servers, but not for the normal game.
    So that's why i'm asking.

    Hopefully here's somebody who can give me a hint.

  8. #8
    yifter's Avatar

     rFactor 2 Validated PC Specification Where I race 

    Registered
    Dec 2010
    Location
    Germany
    Quote Originally Posted by Achim Ennenbach View Post
    I want to query the game for current trackname, session and what's possible else. I think that's what you call "outbound", right?
    I don't want to control rfactor, simply "ask for information".
    If you want to query someones rfactor client, then i would call it inbound fromt the clients point of view. The Driver has then to open the ports in his firewall(Router AND Windows) for inbound traffic for the ports in question.

    I think what you want to do is only possible, if someone is hosting a session with the client (not the dedi). Maybe you can test that. I think in client mode this is not possible.

  9. #9
    Achim Ennenbach's Avatar

     PC Specification 

    Newer Member
    Oct 2010
    Location
    Germany, near Bonn
    No, i don't want to query someones rFactor, just the local running game. So, no need to open ports on the firewall.

  10. #10
    yifter's Avatar

     rFactor 2 Validated PC Specification Where I race 

    Registered
    Dec 2010
    Location
    Germany

    Try this

    before you start rfactor in windows console

    netstat -ano

    and do it again after you started rF. This way you _should_ see, on which ports rF is listening, if any.

  11. #11
    Achim Ennenbach's Avatar

     PC Specification 

    Newer Member
    Oct 2010
    Location
    Germany, near Bonn
    I used ProcessExplorer http://technet.microsoft.com/de-de/s...rnals/bb896653 to monitor which ports rFactor uses and there are some. But i wasn't successfull, when i tried to query those ports. Querying the same ports on a dedicated server was successfull. So maybe i use the wrong commands, or this feature is disabled for the "normal" rfactor.exe.

  12. #12
    tom ilsbroux's Avatar
     

    Newer Member
    Dec 2011
    Can someone confirm its port 34448 TCP instead of 34447 ? 34447 didn't work for me, got time-outs, then analysing the use of ports it shows 34448. Changing my to forward port 34448 it worked.

    When I started up a second dedicated server on the same machine it uses 34449.
    Last edited by tom ilsbroux; 04-22-12 at 10:33 AM.

  13. #13
    Tripp's Avatar

     PC Specification 

    Registered
    Dec 2010
    Location
    Sweden
    yea that how it work for every server you start up it add 1 port more how to edit that so you can host on other ports open multiplayer ini i each install of rf then Query Port Start="34297" // range is 1025 - 65535
    Port Start="34397" // range is 1025 - 65535 is default

    you can edit this to what you wanna have port a you like this Query Port Start="34335" // range is 1025 - 65535 but remember open port that servers use i se a tiny little program that is free http://www.nirsoft.net/utils/cports.html

  14. #14
    tom ilsbroux's Avatar
     

    Newer Member
    Dec 2011
    Thx, yeah I knew about those UDP ports and the settings in the multiplayer.ini But I didn't knew about the TCP ports which you can't set (at least I havn't found it). Also it didn't use 34447 when I started it up first time.

    Would be great if there was a better explenation how rFactor handles these ports.

  15. #15
    Noel Hibbard's Avatar

     rFactor 2 Validated PC Specification Facebook profile Where I race LiveRacers Driver Page 

    Registered
    Oct 2010
    Location
    Jacksonville, FL
    The 34447 port is based off "Port Start" in the mutiplayer.ini. The default "Port Start" is 34397. So if you set it to say 34399 then the 34447 port becomes 34449.

  16. #16
    Noel Hibbard's Avatar

     rFactor 2 Validated PC Specification Facebook profile Where I race LiveRacers Driver Page 

    Registered
    Oct 2010
    Location
    Jacksonville, FL
    Quote Originally Posted by Achim Ennenbach View Post
    I want to query the game for current trackname, session and what's possible else. I think that's what you call "outbound", right?
    I don't want to control rfactor, simply "ask for information".
    I am not sure what languages you know, but here is some VB.Net sample code for querying a server. If you have any questions about this code just ask:
    Code:
    Sub query()
    	tbStatus.Text = ""
    	Dim udpClient As New System.Net.Sockets.UdpClient
    	udpClient.Connect(tbIP.Text, tbPort.Text)
    	udpClient.Send(System.Text.Encoding.ASCII.GetBytes("rF_S\0"), 6)
    	Dim RemoteIpEndPoint As New System.Net.IPEndPoint(System.Net.IPAddress.Any, 0)
    	Dim receiveBytes As Byte() = udpClient.Receive(RemoteIpEndPoint)
    	tbStatus.AppendText("Gameversion: " & ShortFromBuffer(receiveBytes, &H11).ToString())
    	tbStatus.AppendText(vbCrLf & "Server Name: " & StringFromBuffer(receiveBytes, &H2D).ToString())
    	tbStatus.AppendText(vbCrLf & "MOTD: " & StringFromBuffer(receiveBytes, &H69).ToString())
    	tbStatus.AppendText(vbCrLf & "Series: " & StringFromBuffer(receiveBytes, &H19).ToString())
    	tbStatus.AppendText(vbCrLf & "Track: " & StringFromBuffer(receiveBytes, &H49).ToString())
    	tbStatus.AppendText(vbCrLf & "Session: " & (ByteFromBuffer(receiveBytes, &HD2) >> 5).ToString())
    	tbStatus.AppendText(vbCrLf & "Session Time: " & ShortFromBuffer(receiveBytes, &HD9).ToString())
    	tbStatus.AppendText(vbCrLf & "Session Laps: " & (ShortFromBuffer(receiveBytes, &HDB) / 16).ToString())
    	tbStatus.AppendText(vbCrLf & "Current Players: " & ByteFromBuffer(receiveBytes, &HCF).ToString())
    	tbStatus.AppendText(vbCrLf & "Max Players: " & ByteFromBuffer(receiveBytes, &HD0).ToString())
    End Sub
    
    Private Function StringFromBuffer(ByVal buffer As Byte(), ByVal idx As Byte) As String
    	Dim returnString As String = ""
    	While buffer(idx) <> &H0
    		returnString = returnString & Char.ConvertFromUtf32(buffer(idx))
    		idx = idx + 1
    	End While
    	Return returnString
    End Function
    
    Private Function ByteFromBuffer(ByVal buffer As Byte(), ByVal idx As Byte) As Integer
    	Return buffer(idx)
    End Function
    
    Private Function ShortFromBuffer(ByVal buffer As Byte(), ByVal idx As Byte) As Integer
    	Return buffer(idx) Or (buffer(idx + 1) << 8)
    End Function
    
    Private Function LongFromBuffer(ByVal buffer As Byte(), ByVal idx As Byte) As Integer
    	Return buffer(idx) Or (buffer(idx + 1) << 8) Or (buffer(idx + 2) << 16) Or (buffer(idx + 3) << 24)
    End Function

  17. #17
    tom ilsbroux's Avatar
     

    Newer Member
    Dec 2011
    Quote Originally Posted by Noel Hibbard View Post
    The 34447 port is based off "Port Start" in the mutiplayer.ini. The default "Port Start" is 34397. So if you set it to say 34399 then the 34447 port becomes 34449.
    Ah thank you makes alot of sense.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •