How to send data from device to remote server?

If you can't connect to a server behind a router, how does the router know where to send returning data?

  • From my understanding, without port fowarding, you can't connect to a server behind a firewall. So how does a router know where to send returning data, after a client like an internet browswer requests data from a server? Does it send it to everyone and the client just knows what it's looking for? Also, why is this the case? Why can't you specify a private ip as well as a public ip to connect to a server behind a router? Thanks in advance.

  • Answer:

    What happens is that there are thousands of routers arranged a bit like layers - see the diagram at http://www.theshulers.com/whitepapers/internet_whitepaper/index.html#route The returning data packets go up through the router layers until it finds one that knows the address, then back down to the individual computer that requested the information. Routers are designed to help provide security for the computers they know about. They help stop a lot of "bad" packets and also stop denial of attacks before they overwhelm the computer. The only way a DDOS attack is really successful is if the packets come in so fast they use all the available bandwidth stopping legitimate traffic. A lot of routers keep logs, so you can see what they have done. If you could specify a private computer address behind the public router IP address then computers would be very much less secure than they are. You cannot access a server from inside the LAN part of a router because of the way they are designed. Port forwarding only works on traffic passing through a router, not bouncing back inside it. There is something called NAT Reflection that does allow this but for most people the solution is to either type the server address directly or set up the hosts file to do it. Suppose you have a server with the IP address of 192.168.1.11 that servers a website named mysite.com What usually happens is that when you simply type mysite.com into your computer that is on the same LAN then you just get the router's set up page. If you type 192.168.1.11 then that should take you directly to the server web pages. In Windows the hosts file is usually at c:\\windows\system32\drivers\etc\hosts You can add an entry to that file that says 192.168.1.11 mysite.com 192.168.1.11 www.mysite.com This way you can still use mysite.com in the address bar and it will be redirected to the server.

brisray at Yahoo! Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.