Author Topic: Is is possible to change client net port ?  (Read 2570 times)

yossarianuk

  • VM-68
  • Posts: 127
Is is possible to change client net port ?
« on: March 18, 2008, 02:25:46 PM »
Hi.

Is there a way to change the UDP port used by paintball2 ?

Cheers

KnacK

  • Global Moderator
  • Autococker
  • Posts: 3039
Re: Is is possible to change client net port ?
« Reply #1 on: March 18, 2008, 02:29:54 PM »
Yes, as long as the server is talking the same port as you want to change to.

or....


You could use PAT = port address translation - on your firewall.  Where you have your wirewall change the outbound and inbound port.

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: Is is possible to change client net port ?
« Reply #2 on: March 18, 2008, 02:54:31 PM »
The PB2 client uses a randomized client port to protect against connectionless packet exploits (Q2MSG is the common tool for this exploit).  I believe you can override this by specifying the client port in the command line, but I would recommend against using the "default" value of 27901 since it would be trivial for someone to fire up Q2MSG and start stuffing commands down to the client.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Is is possible to change client net port ?
« Reply #3 on: March 19, 2008, 01:38:12 PM »
cl_port, maybe?  I don't remember offhand.  As Bain said, it's randomized each time the game is loaded to prevent attacks.

Herron

  • VM-68
  • Posts: 235
Re: Is is possible to change client net port ?
« Reply #4 on: March 20, 2008, 06:25:51 AM »
Add this to the end of your command line (where ##### is whatever UDP port you want to use):

+set qport #####

You can't change it in-game because it's write protected.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Is is possible to change client net port ?
« Reply #5 on: March 20, 2008, 10:02:24 AM »
Actually, qport is something different - that's attached to the packets so if two people connect from the same IP and port, the server can distinguish between them.

Herron

  • VM-68
  • Posts: 235
Re: Is is possible to change client net port ?
« Reply #6 on: March 20, 2008, 10:07:54 AM »
Oops.  I just thought I remembered that Q2MSGs worked based on qport values and that's why you started randomizing them.