CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2001
    Location
    Oregon
    Posts
    3

    Winsock thru Routers

    Hi....
    I am quite new to Winsock programming, but I am really stuck - I can't listen for connections thru my router!!
    It all works fine for the LAN, but internet users are unable to connect...
    Any help would be greatly appreciated.
    Thanks,
    Safeer.


  2. #2
    Join Date
    Apr 2000
    Posts
    737

    Re: Winsock thru Routers

    If you are able to listen to a connection in you own LAN and was not able to listen to internet user, this is most probably because you have a LAN address something look like this,

    192.168.AAA.BBB

    this address is only local to you own LAN, even if other having address which difference in AAA, you will have to have a gateway for them to communicate with you, not to say internet user, for internet user, you must be connecting to an ISP, where they will give you a real IP.

    HTH

    cksiow
    http://vblib.virtualave.net - share our codes


  3. #3
    Join Date
    May 2001
    Location
    Oregon
    Posts
    3

    Re: Winsock thru Routers

    Thanks for your reply!!

    But I already have the gateway and DHCP and everything set up on the router... The router is configured with one IP, and it shares the connection to the LAN (with 192.168.AAA.BBB IP's).

    The problem is when I listen with winsock:

    Ws1.LocalPort = 23
    Ws1.Listen



    it only allows LAN users to connect instead of users comming in through the router!

    Sorry about being vague in the first post...
    Thanks for you help!


  4. #4
    Join Date
    Apr 2000
    Posts
    737

    Re: Winsock thru Routers

    I am not sure whether I interprete you situation correctly or not, you are saying that your router is actually having an real IP which connected to net ? if yes, then for other to connect to you, I think you need to have some kind of proxy server to distribute the packet for you as outside user will only see your router, rather than u, so proxy server might be able to solve your problem.

    I use this little program called WinProxy before, where we have a LAN in our home and only one phone line, all of us can connect to Net via the proxy server. not sure on how are you going to do it, sorry.

    HTH


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

Featured