iptables irgendwie was falsch

Backup, Restore und Transfer von Daten
Post Reply
tomgrill
Posts: 17
Joined: 2002-09-24 09:53
 

iptables irgendwie was falsch

Post by tomgrill »

ich hab folgendes eingegeben:

Code: Select all

iptables -N superftp
iptables -A OUTPUT  -p tcp --sport 21 -j superftp
iptables -A INPUT  -p tcp --dport 21 -j superftp
iptables -A superftp -j ACCEPT
dann zähler reset mit:

Code: Select all

iptables -Z
dann ca. 0.89 MB vom FTP geleecht und traffik nachgeschaut:

Code: Select all

iptables -L -v -x
das ist das ergebnis:

Code: Select all

Chain INPUT (policy ACCEPT 368 packets, 20107 bytes)
    pkts      bytes target     prot opt in     out     source               destination
      19      992 superftp   tcp  --  any    any     anywhere             anywhere           tcp dpt:ftp

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 683 packets, 893960 bytes)
    pkts      bytes target     prot opt in     out     source               destination
      16     1332 superftp   tcp  --  any    any     anywhere             anywhere           tcp spt:ftp

Chain superftp (2 references)
    pkts      bytes target     prot opt in     out     source               destination
      35     2324 ACCEPT     all  --  any    any     anywhere             anywhere
wie man sieht, ist der traffik beim output richtig 893960b, aber bei supertftp sind es nur 1332 bytes.

wieso ????
dodolin
Posts: 3840
Joined: 2003-01-21 01:59
Location: Sinsheim/Karlsruhe
Contact:
 

Re: iptables irgendwie was falsch

Post by dodolin »

Ã?h... sorry, aber ist dir überhaupt klar, dass es bei FTP sowas wie einen Kommandokanal und einen Datenkanal gibt?

Lesestoff:
http://www.iks-jena.de/mitarb/lutz/usen ... l.html#Ftp
http://www.interhack.net/pubs/fwfaq/#SE ... 0000000000
http://www.interhack.net/pubs/fwfaq/#SE ... 0000000000
http://www.ietf.org/rfc/rfc959.txt
tomgrill
Posts: 17
Joined: 2002-09-24 09:53
 

Re: iptables irgendwie was falsch

Post by tomgrill »

a jetzt gehts mercy :)
Post Reply