Results 1 to 3 of 3

Thread: TCP Windows Service Listener

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    1

    Unhappy TCP Windows Service Listener

    Hi,

    I have a problem with a window service that should be listen to TCP connection on some port.
    It is OK if the client connect to localhost host by name or by ip 127.0.0.1, but it can't connect to it by its true IP from network or from the same machine. The problem persist in telneting on that port the machine : it works only to 127.0.0.1

    I used winsockets.

  2. #2
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: TCP Windows Service Listener

    The 'true' IP as you called it is the IP of the router, what you need to do is go into the router settings and look for 'Port Forwarding' you then need to configure it to forward whatever port your app uses, to the local IP of the machine that is running the listener program.

    When you try to connect to the 'true' IP, or external Internet IP, the router receives the connection attempt, but if PF is not configured, the router does not know which host on the network to pass the connection to, so it will just drop it. That is why you can't connect to the external IP.
    Chris

  3. #3
    Lively Member
    Join Date
    Jun 2006
    Location
    City of Angles. Right Angles.
    Posts
    110

    Re: TCP Windows Service Listener

    Also, if you setup the listener to listen to localhost, it will only resolve to 127.0.0.1. Try making the listener listen on 0.0.0.0 which should listen on all available interfaces simultaneously.

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