Thursday, November 11, 2010

Router Can Never Redirect a Connection From Outside World to Inside World Unless it Sees an Open Port - Right?

Assume i send a request to a server from my PC behind a router. Web server will response, the response will hit my router first. Then how come my router will redirect this response to my PC since i do not have an open port set on router for the out going web browser connection?Router Can Never Redirect a Connection From Outside World to Inside World Unless it Sees an Open Port - Right?
The router automatically opens the necessary ports dynamically in response to an established session. Most routers use Network Address Translation. When you hit a site outside of your network, NAT keeps a record of your machine's IP address and the outgoing session. When it receives a response from the web server it opens the ports as necessary and forwards the packets to your machine.



This is an over-simplified explanation of the process. Port pair assignments are taken care of during the TCP/IP handshake. Once a port is opened dynamically the router will only accept traffic on that port from the source IP of the destination and only if the packet sequence numbers match up properly.Router Can Never Redirect a Connection From Outside World to Inside World Unless it Sees an Open Port - Right?
TFTP

Report Abuse


You need to re-phrase your questions and provide more information.
Because the web browser makes the connection. After that data can go both ways. The web server isn't trying to make a new connection. It is just replying using the existing connection.
Some ports are static, like mail, UDP, and a few others

(see link below for a list of 'common ports').



Of the other 65,535 odd ports, the router sends outbound requests through established ports, then listens on a port for the reply, then relays the packets to the MAC of the proper machine from it's address table.

Unrequested packets, going to the wrong port, are dropped.

Go to GRC 'Shields Up' for a handy %26amp; informative firewall %26amp; port explanation + tests, etc.

http://www.grc.com/x/ne.dll?rh1dkyd2



Port 80 handles outgoing Internet requests.

';This is the primary port used by the world wide web (www) system. Web servers open this port then listen for incoming connections from web browsers. Similarly, when a web browser is given a remote address (like grc.com or amazon.com), it assumes that a remote web server will be listening for connections on port 80 at that location.';



Your header will describe (among several things) what port and what machine on your local network sent the request %26amp; the reply will have a header with this same info (as it's destination).

No comments:

Post a Comment