28 Apr 2003 mascot   » (Journeyer)

mathieu: In answer to your question about FTP over routers which perform NAT. Firstly, as you're probably aware, there are two modes of FTP - Active and Passive. Passive FTP works over almost all routers, whereas active FTP rarely works over NAT unless the router is clever enough to know how to specifically interpret FTP traffic. Most FTP done via web browsers and the like is passive, since it works in more scenarios, but on Linux the command-line ftp client defaults to active FTP.

Passive FTP is easy. All connections are made from the client to the server, so the router can just route these as with any other connection (like HTTP and the rest).

Active FTP, however, requires the server to open a connection to the client. In the case of a router that does NAT, the router must know which machine on the local network to send this incoming connection to. In the case of a Linux router, that's the job of the FTP Conntrack module (I think), which basically keeps track of the FTP connection. If your router supports Active FTP, it probably has a similar piece of software running.

I hope this answers your question. And I hope someone will in turn correct any mistakes in my answer :-)

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!