comp.protocols.tcp-ip
Discussion complète de l'article :
TCP File Transfer behind NAT

Date

Sujet

From


03-04-2008

     TCP File Transfer behind NAT

Saurabh

04-04-2008

         Re: TCP File Transfer behind NAT

Barry Margolin


Article : 30124
Date : 03-04-2008
From : Saurabh
Sujet : TCP File Transfer behind NAT

Dear All,

Can anyone tell me, how to write such a program that can transfer
files (either binary or text) behind NAT devices( such as for
computers behind firewalls and routers and other NAT devices) using
TCP socket programming.

I have a mechanism through which the public IP of the router and Port
number will be forwarded to me. But after that I am not sure that
simple TCP/IP socket programming will suffice or I need to do
something more for that.

If you have any article link or article or any example that shows how
the File Transfer can be done for such a case then please help me
regarding this.

Any sought of help or idea will be appreciated from you all.

from-
Saurabh Srivastava

Posez vos questions, réponses et remarques sur les forums de FrameIP


Article : 30125
Date : 04-04-2008
From : Barry Margolin
Sujet : Re: TCP File Transfer behind NAT

In article
<7ee48a57-143e-49b0-b4ca-e6aa5d11344f@r9g2000prd.googlegroups.com>,
Saurabh wrote:

> Dear All,
>
> Can anyone tell me, how to write such a program that can transfer
> files (either binary or text) behind NAT devices( such as for
> computers behind firewalls and routers and other NAT devices) using
> TCP socket programming.
>
> I have a mechanism through which the public IP of the router and Port
> number will be forwarded to me. But after that I am not sure that
> simple TCP/IP socket programming will suffice or I need to do
> something more for that.
>
> If you have any article link or article or any example that shows how
> the File Transfer can be done for such a case then please help me
> regarding this.
>
> Any sought of help or idea will be appreciated from you all.
>
> from-
> Saurabh Srivastava

You don't need to do anything special. The port forwarding of the
router should handle it all.

Things only get complicated if the application data includes the server
IP, because the client will expect this to be the public IP, but the
server expects it to be the private IP. This is an issue for the FTP
protocol, because private IPs are included in the PORT command and PASV
response; NAT routers have to recognize the FTP protocol specially and
rewrite these lines with the translated address.

But if you're designing a simple transfer protocol from scratch, just
make sure you don't do anything like this. As far as the socket
programming goes, NAT is transparent.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE don't copy me on replies, I'll read them in the group ***

Posez vos questions, réponses et remarques sur les forums de FrameIP




mot clé : tcp behind comp ip transfer file nat ipv6 vpn tcpip ipv4 voip ip tcp protocols

Copyright © 2003-2010 FrameIP TcpIP. Tous droits réservés. Les marques et marques commerciales mentionnées appartiennent à leurs propriétaires respectifs. L'utilisation de ce site Web TcpIP implique l'acceptation des conditions d'utilisation et du règlement sur le respect de la vie privée.
Sécurité entreprise SSII Reseaux Sécurité Test ADSL Affiliation