ip addresses

bpayne111

Junior Contributor
Joined
Feb 28, 2003
Messages
325
Location
BFE
i read a post by mooman_fl which discusses the problem of getting the external ip address of a router (that is not the correct term though... ¿NAT?)

from my understanding the post concluded that if a person is behind a router they would never be able to be a host on a game server without using some sort of outside source. (if they used .net to create the app that is)

i do not see how this is not possible to do using .net because it would seem to be a common practice.

i am making a game server now and being that i don't have my own dedicated server to host such am app. i'd like to allow users to host thier own games if they wanted to. from what i understand this is fine unless the person with a router wants to host a game on the internet instead of at his own network.

personally i'm willing to force the user to input the router's local ip address

how do i find this ip address on my own anyway? i was asked once by a tech support what it was and i had no idea.. (it's not in ipconfig)

there must be a way
brandon
 
an ip can have many ports. the router listens on 1 ip shared by many ccomputers or devices with ips. ip forwarding is when the router forwards an ip packet to one of those computers or devices.

So lets say I have a router and 4 machines -> (A, B, C, D). I run a webserver on A on port 80, ftp on B on port 21, a SMTP on C on port 25. Lets say the router's ip is 141.222.2.1.

no port fowarding:

me connecting to 141.222.2.1:80, 141.222.2.1:21, 141.222.2.1:25 will result in an unsuccessful connection. the router will refuse my connection because the router has no services running on those ports.


with port forwarding:
1) tell the router to forward/send all requests with a port# of 80 to computer A port 80, send all requests with a port# of 21 to computer B port 21, and all requests with a port# of 25 to computer C port 25.

So if 24.68.43.22 wants to connect to the router on port 80, the router will forward this data to computer A.

kinda get what I'm saying?
 
yea kinda but it all seems a little wierd
so if i have a user behind a router that wants to host my program, what is required to get the router to allow it to connect to the host computer?
i'm begining to accept that i can't do this with code, so what kind of user input am i gonna need to make it work?

thanks
brandon
 
a readme file stating what port the server listens on is more than enough.

the user will probably know how to do port forwarding.
 
Back
Top