Page 1 of 1

iptables irgendwie was falsch

Posted: 2003-04-07 22:31
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 ????

Re: iptables irgendwie was falsch

Posted: 2003-04-07 22:43
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

Re: iptables irgendwie was falsch

Posted: 2003-04-07 23:08
by tomgrill
a jetzt gehts mercy :)