Thread: What Port is it Using?

  1. #1
    Set Apart -- jrahhali's Avatar
    Join Date
    Nov 2002
    Posts
    256

    What Port is it Using?

    Hello.
    I'm behind a router, and want to host a game, except i don't know what port the game is trying to use, and so i can't forward the port through my router.
    Is there any way I can find out what port is trying to be used?
    Clear the mines from our Shazbot!
    Get the enemy Shazbot!

  2. #2
    Registered User
    Join Date
    Apr 2005
    Posts
    134
    Can't you force the game to run on a specific port which is predefined? Selecting a port at runtime may be a problem as it will keep changing every time you run the game. Accordingly you will have to change the access-lists on your router.

  3. #3
    Set Apart -- jrahhali's Avatar
    Join Date
    Nov 2002
    Posts
    256
    >>Can't you force the game to run on a specific port which is predefined?
    Nope, that's the problem

    In addition, if this helps, the game uses UDP/IP server to connect instead of TCP/IP host. I'm not hugely familiar with UDP/IP, but could this be related to not being able to select a specific port?
    Clear the mines from our Shazbot!
    Get the enemy Shazbot!

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    try going to the command prompt and running
    netstat -a
    then start the game and get it to the point where it's waiting for a connection then ALT+tab back to command prompt and run
    netstat -a
    again and see wich listening ports have been added.
    or check the developers technical suport pages.

  5. #5
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Quote Originally Posted by Quantum1024
    try going to the command prompt and running
    netstat -a
    then start the game and get it to the point where it's waiting for a connection then ALT+tab back to command prompt and run
    netstat -a
    again and see wich listening ports have been added.
    or check the developers technical suport pages.
    Also, Windows recently added the -b option to netstat. This will give the process name responsible for each connection or listening port.
    netstat -b -a

  6. #6
    Set Apart -- jrahhali's Avatar
    Join Date
    Nov 2002
    Posts
    256
    alright! worked great!
    turns out the port was 2000 .
    thanks guys.
    Clear the mines from our Shazbot!
    Get the enemy Shazbot!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. FTP program
    By jakemott in forum Linux Programming
    Replies: 14
    Last Post: 10-06-2008, 01:58 PM
  2. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  3. Segmentation Fault - Trying to access parallel port
    By tvsinesperanto in forum C Programming
    Replies: 3
    Last Post: 05-24-2006, 03:28 AM
  4. Basic port scanner code .. pls help ???
    By intruder in forum C Programming
    Replies: 18
    Last Post: 03-13-2003, 08:47 AM
  5. DOS, Serial, and Touch Screen
    By jon_nc17 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-08-2003, 04:59 PM