[PLUTO-help] ftp e iptables

gianni eliabaley a interfree.it
Mer 24 Mar 2010 12:47:17 CET


E' da più di un anno che cerco di inviare files tramite FTP senza riuscirci.
Siccome non ho mai perso la speranza, ogni tanto ci riprovo e su un sito
ho trovato alcune istruzioni che non risco a interpretare:

How do I open port 21 using Linux iptables firewall?

Use iptables administration tool for IPv4 packet filtering and NAT under
Linux to open tcp port 21 (FTP). Following rule-set assumes that your
eth0 network interface is directly connected to the Internet. It has
public ip (202.54.1.20). FTP use both port 21 and 20 (port 21 for the
command port and port 20 for the data). So following iptables rules take
care of both ports (add rules to your iptables based shell script):

First login as the root user.

Next type the following command to load two iptables modules:
|# modprobe ip_conntrack
# modprobe ip_conntrack_ftp   (questa parte l'avevo già fatta da un bel
pezzo!)
|

iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d 202.54.1.20 --dport 21 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -s 202.54.1.20 --sport 21 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT

iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d 202.54.1.20 --dport 1024:65535 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -p tcp -s 202.54.1.20 --sport 1024:65535 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT

ptables -A OUTPUT -p tcp -s 202.54.1.20 --sport 20 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d 202.54.1.20 --dport 20 -m state --state ESTABLISHED -j ACCEPT


 Nelle istruzioni iniziali la dove dice "your eth0 network interface is  directly connected to the Internet." cosa intende esattamente con connessione diretta?
E poi è un problema sela mia Realtek non è eth0 ma eth7?

Potete aiutarmi?

gianni Saccardo





More information about the pluto-help mailing list