Getting winsock to listen on external ip
i have internet over cable and wireless on my laptop, i am trying to make a server/client program to use over the internet, but i can only get winsock to listen on the internal network IP (ie 192.168.1.103). How do i get it to listen for connections coming in over the my internet IP (ie 63.58.xx.xxx)
Re: Getting winsock to listen on external ip
never mind, i figured it out, i just needed to configure my wireless router.
Re: Getting winsock to listen on external ip
How to do it ? i really need it now..
(i am not the topic maker but i need it)
Re: Getting winsock to listen on external ip
Quote:
Originally Posted by k3pos
How to do it ? i really need it now..
(i am not the topic maker but i need it)
Configure port forwarding on your router and make sure any firewalls aren't blocking the connections in your program.
You will need to find out your LAN IP. Winsock.LocalIP (or is it .LocalHostIP) will show you your local IP. Or just go to command prompt and type: ipconfig
Then you will need to access your router, it's usually:
http://192.168.0.1
http://192.168.1.1
One of those unless your router uses different numbers. Then you will need to find Port Forwarding (might be in advanced settings) and enter your IP and the port number your program uses. Select either TCP, UDP, or both depending on which one your program uses.
Then check the enable box and save your settings.
The quickest/easiest way is to enable your computer for DMZ hosting. But this will open all ports and can even mess up somethings (my current ISP doesn't like when I enable DMZ hosting for some reason). So I would not recommend it.
Re: Getting winsock to listen on external ip
It would be interesting to see somebody's code for UPnP to do this automatically from a VB program. Of course not every router supports it, not everyone has it enabled in Windows, not everyone has WinXP, etc. etc.
Re: Getting winsock to listen on external ip
there is a another easy way to do that. make a simple appz and call http://www.whatismyip.com and parse the page for the ip. the page will show you your external ip if i am not wrong. but you know i am nerd man, so i could be wrong.
Re: Getting winsock to listen on external ip
Getting your external IP doesn't send packets from your router (the device sitting on the external IP) to the computer on the LAN - the router still has to be told which computer gets traffic for which port.