Ftp

From Gentoo Linux Wiki

Jump to: navigation, search

This article is a Stub. You can help Gentoo-Wiki by expanding it.


Contents

[edit] Definition

FTP stands for File Transfer Protocol.

FTP server usually stock number of file available to user from a remote connection. They might allow uploading of files.

[edit] Active FTP

  • the transition is initiated by the client to port 21;
  • the server answers from port 21 to port >1023;
  • the data is transmitted from the server from the port 20;
  • the client answers to port 20

[edit] Passive FTP

Passive FTP (or PASV) does not use port 20, communications between server and client occur to/from port 21 of the server and the data is transmitted to/from port >1023.

[edit] FTP Clients

Must-have:

  • net-misc/wget
  • net-ftp/ftp

Others:

  • net-ftp/axyftp
  • net-ftp/cmdftp
  • net-ftp/easyftp
  • net-ftp/ftpcube
  • net-ftp/gftp
  • net-ftp/kftpgrabber
  • net-ftp/lftp
  • net-ftp/ncftp
  • net-ftp/pftpfxp
  • net-ftp/tnftp

[edit] FTP Servers

See Category:FTPD.

[edit] IPTables

A decent Iptables configuration on the client side:

File: Iptables.conf
 # FTP
 -A INPUT        -p tcp  --sport 21      -m state --state ESTABLISHED            -j ACCEPT
 -A OUTPUT       -p tcp  --dport 21      -m state --state NEW,ESTABLISHED        -j ACCEPT
 # active
 -A INPUT        -p tcp  --sport 20 --dport 1024: -m state --state ESTABLISHED,RELATED           -j ACCEPT
 -A OUTPUT       -p tcp  --dport 20 --sport 1024: -m state --state ESTABLISHED                   -j ACCEPT
 # passive
 -A INPUT        -p tcp  --sport 1024: --dport 1024: -m state --state ESTABLISHED                -j ACCEPT
 -A OUTPUT       -p tcp  --sport 1024: --dport 1024: -m state --state ESTABLISHED,RELATED        -j ACCEPT 
{{{2}}}

[edit] Links

Active FTP vs. Passive FTP, a Definitive Explanation

Personal tools