On 6 May 2004 07:50:56 -0700, Julia Goolia <(E-Mail Removed)> wrote:
> Hello,
>
> I am confused about the theory or inner workings of port forwarding.
> If I have a network with 2 computers running behind a router which
> effectively shares 1 IP between the 2 computers... and they both
> listen on port 8000... the calls to listen and bind should return
> successfully right? What happens (without port forwarding) when
> someone trys to connect to this network on port 8000?
>
> I find this weird, because when I run Bit Torrent, it seems to work OK
> even without port forwarding... how is this possible?
When 2 computers are behind NAT or masquerade, if they make an outgoing
connection, the NAT/masq actually uses a different source port and/or
id in the packet out the public IP, so it knows where to forward a
related reply (or in some cases even if the reply comes to a different
related port).
However, if you had 2 PC's behind NAT/masq both listening on port 8000,
and a connection from outside was initiated to port 8000 on your public
IP, the NAT/masq box would not know what to do with that, unless the
NAT/masq box either had something listening on that port that knew what to
do with it, or was set to forward that public ip

ort to a single internal
ip

ort.
I am not familiar with Bit Torrent, but if it broadcasts like other file
sharing programs, the other end would know what public port or packet id
to use to reach a particular internal IP, based on your outgoing packets.
--
David Efflandt - All spam ignored
http://www.de-srv.com/