Click to See Complete Forum and Search --> : Winsock thru Routers
nemesisiv
May 9th, 2001, 06:08 PM
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.
cksiow
May 9th, 2001, 07:50 PM
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
nemesisiv
May 9th, 2001, 09:07 PM
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!
cksiow
May 9th, 2001, 09:31 PM
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
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.