Results 1 to 6 of 6

Thread: [RESOLVED] TCP/IP Ports?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    Resolved [RESOLVED] TCP/IP Ports?

    I have made a few TCP/IP based programs in the past. One of the requirements my program had was to open up the required port in the user's router.

    How does MSN / AIM / Google Talk etc.. communicate with a server without making me open the required port in my router? Does it not need a new port to be opened? If so, how do I do the same?

  2. #2
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: TCP/IP Ports?

    Those services also require an open port.
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    Re: TCP/IP Ports?

    What ports do they use? Are the ports already open, or does the program open the port? Since I never confirmed any change to my router...

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: TCP/IP Ports?

    Outbound connections (initiated by the client) don't require an open port because outgoing traffic is usually not caught by the router. Listening for incoming connections from behind a router requires that traffic on a port or port range is forwarded from the router to the target machine (the server). Don't bump your threads.

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: TCP/IP Ports?

    In your case you probably have a program acting as a server, behind your NAT router.

    Those IM services you list have already taken care of exposing their servers to the outside world. So you'd need to do the same, typically by configuring your router to map incoming connections on port X to computer Y port Z on your private (inside) network. X and Z can be the same port, but usually they don't have to be. Outside users will always connect to X though, since this is the exposed port.

    If you are using a recent OS (XP or later) there are system components that allow your program to create and delete such mappings. It depends on whether your router has UPnP, has it turned on, and the level of UPnP support it offers.

    See [VB6] PortMapper - UPnP NAT Traversal Class which I posted a while back. You could drop the Class into your projects and use it as is, or read it as an example of how to use the upnp.dll directly yourself.

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    Re: TCP/IP Ports?

    Thank you - this thread is resolved

Posting Permissions

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



Click Here to Expand Forum to Full Width