TCP Internet

BlitzPlus Forums/BlitzPlus Beginners Area/TCP Internet

InvincibleWall(Posted 2010) [#1]
I have made a TCP/IP chat program that works perfectly over our network

but when I try and type an Router IP it fails

my dad said I needed to make it specify which computer inside the router gets the other end of the stream

I'm not sure exactly what I'm even doing in the first place... so I was kinda stumped when he said this...

If anyone knows of a good How To Do Networking page or something it would be nice

anyway if someone has the answer to my problem it would help too =D

Thanks in Advance


GfK(Posted 2010) [#2]
You need to look up "port forwarding" for your router. TCP/IP packets arrive on whichever port you specify. Once they arrive at the router, the router needs to know which PC on the network it needs to go to. Which in laymen's terms, is what port forwarding does.


xlsior(Posted 2010) [#3]
Depending on the make/model of the router, it may be referred to by different names:

- Port Forwarding
- NAT
- Services

The problem is that in a typical home network, you have a router with a single outside IP address, and it uses NAT (network address translation) to tie together multiple local network computers behind a single IP address.

If an outgoing connection is established, the router keeps track of it, and a response will automatically be re-directed to the computer that requested the information.

If you have an *unsollicited* incoming connection from the outside world, the router has no idea which machine to forward it to.

You have the option of setting up a 'DMZ' (= default internal computer that receives all unsollicited requests), but the downside of that is that you greatly increase the chances that that computer gets hacked from the outside world. the other way is to set up a port forward, where you explicitly tell your router that an incoming request to port -x- gets redirected to one of your internal IP addresses.


InvincibleWall(Posted 2010) [#4]
okay cool... with the nice fancy words provided by you guys I choked up more info from my dad.... only thing is the router and it's settings are off limits to me... and my dad isn't willing to change them for awhile =(

anyway thanks for the info, helped a lot


InvincibleWall(Posted 2010) [#5]
Okay I have a port forwarded to me and I'm using it in my code.... but it would seem that it still isn't getting to me... B+ OpenTCPserver works over internet connections right?

btw the code works just fine doing the same thing over our network with personal IP codes