Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

i'm not lazy i'm just resting before i get tired.
Posted

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?

Posted

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

i'm not lazy i'm just resting before i get tired.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...