Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2008

Tip: Looking for answers? Try searching our database.

TCP File Transfer behind NAT

Thread view: 
Saurabh - 03 Apr 2008 12:18 GMT
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
Marcelo Morales - 03 Apr 2008 14:07 GMT
> Dear All,
>
[quoted text clipped - 16 lines]
> from-
> Saurabh Srivastava

There is no api for NAT. NAT is a networking construct, not a
programming option. Firewalls that NAT are designed to prevent outside
connections.

UPNP, static NAT and port forwarding are your only choices (that I
know of) if you have no control over the NATed hosts. All these
options are controlled and configured in the NAT device. So there is
no general solution.

If you can control the NATed host, just open a tcp socket from the
NATed host to the non-NATed and keep it open.

If you wish to use UDP instead, make the NATed host udp-ping the non-
NATed host in regular time intervals, to keep the NAT connection
tracking going on the NAT device. This might not work.

hope it helps

Marcelo Morales


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.