* [Sysadmins] iptables и ftp --- фича или баг?
@ 2008-11-19 19:47 Kharitonov A. Dmitry
2008-11-19 22:47 ` Alexey Shabalin
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Kharitonov A. Dmitry @ 2008-11-19 19:47 UTC (permalink / raw)
To: Sysadmins
[user@SERVER ~]$ sudo lsmod | egrep "ftp|ipt"
ipt_MASQUERADE 7808 1
ipt_REJECT 9472 705
iptable_mangle 7040 0
iptable_nat 11652 1
iptable_filter 7168 1
ip_tables 17604 3 iptable_mangle,iptable_nat,iptable_filter
ipt_REDIRECT 6272 0
ipt_LOG 10496 0
x_tables 18180 8
xt_state,xt_tcpudp,ipt_MASQUERADE,ipt_REJECT,iptable_nat,ip_tables,ipt_REDIRECT,ipt_LOG
ip_nat_ftp 7680 0
ip_nat 22060 4
ipt_MASQUERADE,iptable_nat,ipt_REDIRECT,ip_nat_ftp
ip_conntrack_ftp 12016 1 ip_nat_ftp
ip_conntrack 56800 6
xt_state,ipt_MASQUERADE,iptable_nat,ip_nat_ftp,ip_nat,ip_conntrack_ftp
делаю
-A INPUT -i wan -p tcp -m tcp --sport 20 ! --tcp-flags FIN,SYN,RST,ACK
SYN -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i wan -p tcp -m tcp --sport 21 ! --tcp-flags FIN,SYN,RST,ACK
SYN -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -o wan -p tcp -m tcp --dport 20 -m state --state
NEW,RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -o wan -p tcp -m tcp --dport 21 -m state --state
NEW,RELATED,ESTABLISHED -j ACCEPT
запускаю firefox
ERROR
The requested URL could not be retrieved
An FTP protocol error occurred while trying to retrieve the URL:
ftp://ftp.altlinux.org/pub/distributions/
<ftp://ftp.altlinux.org/pub/distributions/OpenMusic/>
Squid sent the following FTP command:*
*NLST
**and then received this reply*
*Use PORT or PASV first.
Your cache administrator is webmaster <mailto:webmaster>.
Generated Wed, 19 Nov 2008 23:35:09 GMT by server.dimahost
(squid/2.6.STABLE13)
делаю
-A INPUT -i wan -p tcp -m tcp --sport 20 ! --tcp-flags FIN,SYN,RST,ACK
SYN -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i wan -p tcp -m tcp --sport 21 ! --tcp-flags FIN,SYN,RST,ACK
SYN -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i wan -p tcp -m tcp --sport 1024:65535 ! --tcp-flags
FIN,SYN,RST,ACK SYN -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -o wan -p tcp -m tcp --dport 20 -m state --state
NEW,RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -o wan -p tcp -m tcp --dport 21 -m state --state
NEW,RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -o wan -p tcp -m tcp --dport 1024:65535 -m state --state
NEW,RELATED,ESTABLISHED -j ACCEPT
запускаю firefox
Всё нормально.
Я, так понимаю, не работают
ip_nat_ftp 7680 0
ip_conntrack_ftp 12016 1 ip_nat_ftp
Кто мне разъеснит: это фича или баг?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Sysadmins] iptables и ftp --- фича или баг?
2008-11-19 19:47 [Sysadmins] iptables и ftp --- фича или баг? Kharitonov A. Dmitry
@ 2008-11-19 22:47 ` Alexey Shabalin
2008-11-20 5:42 ` Kharitonov A. Dmitry
2008-11-22 15:27 ` Kharitonov A. Dmitry
2 siblings, 1 reply; 7+ messages in thread
From: Alexey Shabalin @ 2008-11-19 22:47 UTC (permalink / raw)
To: ALT Linux sysadmin discuss
2008/11/19 Kharitonov A. Dmitry :
> [user@SERVER ~]$ sudo lsmod | egrep "ftp|ipt"
> ipt_MASQUERADE 7808 1
> ipt_REJECT 9472 705
> iptable_mangle 7040 0
> iptable_nat 11652 1
> iptable_filter 7168 1
> ip_tables 17604 3 iptable_mangle,iptable_nat,iptable_filter
> ipt_REDIRECT 6272 0
> ipt_LOG 10496 0
> x_tables 18180 8
> xt_state,xt_tcpudp,ipt_MASQUERADE,ipt_REJECT,iptable_nat,ip_tables,ipt_REDIRECT,ipt_LOG
> ip_nat_ftp 7680 0
> ip_nat 22060 4
> ipt_MASQUERADE,iptable_nat,ipt_REDIRECT,ip_nat_ftp
> ip_conntrack_ftp 12016 1 ip_nat_ftp
> ip_conntrack 56800 6
> xt_state,ipt_MASQUERADE,iptable_nat,ip_nat_ftp,ip_nat,ip_conntrack_ftp
>
> делаю
> -A INPUT -i wan -p tcp -m tcp --sport 20 ! --tcp-flags FIN,SYN,RST,ACK SYN
> -m state --state RELATED,ESTABLISHED -j ACCEPT
> -A INPUT -i wan -p tcp -m tcp --sport 21 ! --tcp-flags FIN,SYN,RST,ACK SYN
> -m state --state RELATED,ESTABLISHED -j ACCEPT
> -A OUTPUT -o wan -p tcp -m tcp --dport 20 -m state --state
> NEW,RELATED,ESTABLISHED -j ACCEPT
> -A OUTPUT -o wan -p tcp -m tcp --dport 21 -m state --state
> NEW,RELATED,ESTABLISHED -j ACCEPT
>
> запускаю firefox
> ERROR
> The requested URL could not be retrieved
>
> An FTP protocol error occurred while trying to retrieve the URL:
> ftp://ftp.altlinux.org/pub/distributions/
> <ftp://ftp.altlinux.org/pub/distributions/OpenMusic/>
>
> Squid sent the following FTP command:*
> *NLST
> **and then received this reply*
> *Use PORT or PASV first.
> Your cache administrator is webmaster <mailto:webmaster>.
> Generated Wed, 19 Nov 2008 23:35:09 GMT by server.dimahost
> (squid/2.6.STABLE13)
>
> делаю
> -A INPUT -i wan -p tcp -m tcp --sport 20 ! --tcp-flags FIN,SYN,RST,ACK SYN
> -m state --state RELATED,ESTABLISHED -j ACCEPT
> -A INPUT -i wan -p tcp -m tcp --sport 21 ! --tcp-flags FIN,SYN,RST,ACK SYN
> -m state --state RELATED,ESTABLISHED -j ACCEPT
> -A INPUT -i wan -p tcp -m tcp --sport 1024:65535 ! --tcp-flags
> FIN,SYN,RST,ACK SYN -m state --state RELATED,ESTABLISHED -j ACCEPT
> -A OUTPUT -o wan -p tcp -m tcp --dport 20 -m state --state
> NEW,RELATED,ESTABLISHED -j ACCEPT
> -A OUTPUT -o wan -p tcp -m tcp --dport 21 -m state --state
> NEW,RELATED,ESTABLISHED -j ACCEPT
> -A OUTPUT -o wan -p tcp -m tcp --dport 1024:65535 -m state --state
> NEW,RELATED,ESTABLISHED -j ACCEPT
>
> запускаю firefox
> Всё нормально.
>
> Я, так понимаю, не работают
> ip_nat_ftp 7680 0
> ip_conntrack_ftp 12016 1 ip_nat_ftp
>
>
> Кто мне разъеснит: это фича или баг?
это пасивный режим работы ftp.
--
Alexey Shabalin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Sysadmins] iptables и ftp --- фича или баг?
2008-11-19 22:47 ` Alexey Shabalin
@ 2008-11-20 5:42 ` Kharitonov A. Dmitry
0 siblings, 0 replies; 7+ messages in thread
From: Kharitonov A. Dmitry @ 2008-11-20 5:42 UTC (permalink / raw)
To: shaba, ALT Linux sysadmin discuss
Alexey Shabalin пишет:
> 2008/11/19 Kharitonov A. Dmitry :
>
>> [user@SERVER ~]$ sudo lsmod | egrep "ftp|ipt"
>> ipt_MASQUERADE 7808 1
>> ipt_REJECT 9472 705
>> iptable_mangle 7040 0
>> iptable_nat 11652 1
>> iptable_filter 7168 1
>> ip_tables 17604 3 iptable_mangle,iptable_nat,iptable_filter
>> ipt_REDIRECT 6272 0
>> ipt_LOG 10496 0
>> x_tables 18180 8
>> xt_state,xt_tcpudp,ipt_MASQUERADE,ipt_REJECT,iptable_nat,ip_tables,ipt_REDIRECT,ipt_LOG
>> ip_nat_ftp 7680 0
>> ip_nat 22060 4
>> ipt_MASQUERADE,iptable_nat,ipt_REDIRECT,ip_nat_ftp
>> ip_conntrack_ftp 12016 1 ip_nat_ftp
>> ip_conntrack 56800 6
>> xt_state,ipt_MASQUERADE,iptable_nat,ip_nat_ftp,ip_nat,ip_conntrack_ftp
>>
>> делаю
>> -A INPUT -i wan -p tcp -m tcp --sport 20 ! --tcp-flags FIN,SYN,RST,ACK SYN
>> -m state --state RELATED,ESTABLISHED -j ACCEPT
>> -A INPUT -i wan -p tcp -m tcp --sport 21 ! --tcp-flags FIN,SYN,RST,ACK SYN
>> -m state --state RELATED,ESTABLISHED -j ACCEPT
>> -A OUTPUT -o wan -p tcp -m tcp --dport 20 -m state --state
>> NEW,RELATED,ESTABLISHED -j ACCEPT
>> -A OUTPUT -o wan -p tcp -m tcp --dport 21 -m state --state
>> NEW,RELATED,ESTABLISHED -j ACCEPT
>>
>> запускаю firefox
>> ERROR
>> The requested URL could not be retrieved
>>
>> An FTP protocol error occurred while trying to retrieve the URL:
>> ftp://ftp.altlinux.org/pub/distributions/
>> <ftp://ftp.altlinux.org/pub/distributions/OpenMusic/>
>>
>> Squid sent the following FTP command:*
>> *NLST
>> **and then received this reply*
>> *Use PORT or PASV first.
>> Your cache administrator is webmaster <mailto:webmaster>.
>> Generated Wed, 19 Nov 2008 23:35:09 GMT by server.dimahost
>> (squid/2.6.STABLE13)
>>
>> делаю
>> -A INPUT -i wan -p tcp -m tcp --sport 20 ! --tcp-flags FIN,SYN,RST,ACK SYN
>> -m state --state RELATED,ESTABLISHED -j ACCEPT
>> -A INPUT -i wan -p tcp -m tcp --sport 21 ! --tcp-flags FIN,SYN,RST,ACK SYN
>> -m state --state RELATED,ESTABLISHED -j ACCEPT
>> -A INPUT -i wan -p tcp -m tcp --sport 1024:65535 ! --tcp-flags
>> FIN,SYN,RST,ACK SYN -m state --state RELATED,ESTABLISHED -j ACCEPT
>> -A OUTPUT -o wan -p tcp -m tcp --dport 20 -m state --state
>> NEW,RELATED,ESTABLISHED -j ACCEPT
>> -A OUTPUT -o wan -p tcp -m tcp --dport 21 -m state --state
>> NEW,RELATED,ESTABLISHED -j ACCEPT
>> -A OUTPUT -o wan -p tcp -m tcp --dport 1024:65535 -m state --state
>> NEW,RELATED,ESTABLISHED -j ACCEPT
>>
>> запускаю firefox
>> Всё нормально.
>>
>> Я, так понимаю, не работают
>> ip_nat_ftp 7680 0
>> ip_conntrack_ftp 12016 1 ip_nat_ftp
>>
>>
>> Кто мне разъеснит: это фича или баг?
>>
> это пасивный режим работы ftp.
>
Это я знаю. Я пока вижу, что не работает модуль ip_conntrack_ftp
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <4924D188.9040203@ues.ru>]
* Re: [Sysadmins] iptables и ftp --- фича или баг?
@ 2008-11-20 5:34 ` Kharitonov A. Dmitry
2008-11-20 6:38 ` "ЗАО \"Уралэнерго-Союз\" / Бережко Иван"
0 siblings, 1 reply; 7+ messages in thread
From: Kharitonov A. Dmitry @ 2008-11-20 5:34 UTC (permalink / raw)
To: ALT Linux sysadmin discuss
> Только вчера занимался настройкой FTP, вот по этой статье
> http://www.sys-adm.org.ua/system/ftp-nat.php
> Сделал как там написано и все заработало, как в пассивнов так и в
> активном режиме
>
Там вообще приведён кривой способ настройки. Про 20 порт в правилах ни слова
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Sysadmins] iptables и ftp --- фича или баг?
2008-11-20 5:34 ` Kharitonov A. Dmitry
@ 2008-11-20 6:38 ` "ЗАО \"Уралэнерго-Союз\" / Бережко Иван"
2008-11-21 16:15 ` Kharitonov A. Dmitry
0 siblings, 1 reply; 7+ messages in thread
From: "ЗАО \"Уралэнерго-Союз\" / Бережко Иван" @ 2008-11-20 6:38 UTC (permalink / raw)
To: ALT Linux sysadmin discuss
Kharitonov A. Dmitry пишет:
>
>> Только вчера занимался настройкой FTP, вот по этой статье
>> http://www.sys-adm.org.ua/system/ftp-nat.php
>> Сделал как там написано и все заработало, как в пассивнов так и в
>> активном режиме
>>
> Там вообще приведён кривой способ настройки. Про 20 порт в правилах ни
> слова
>
> _______________________________________________
> Sysadmins mailing list
> Sysadmins@lists.altlinux.org
> https://lists.altlinux.org/mailman/listinfo/sysadmins
>
Да и еще, такая конструкция лишина всякого смысла
--tcp-flags FIN,SYN,RST,ACK SYN -m state --state RELATED,ESTABLISHED
у тебя из флагов установлен только SYN, но зато состояние
RELATED,ESTABLISHED
Давай весь конфиг с настройкой iptables, будет понятно тогда где пакеты
теряются
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Sysadmins] iptables и ftp --- фича или баг?
2008-11-20 6:38 ` "ЗАО \"Уралэнерго-Союз\" / Бережко Иван"
@ 2008-11-21 16:15 ` Kharitonov A. Dmitry
0 siblings, 0 replies; 7+ messages in thread
From: Kharitonov A. Dmitry @ 2008-11-21 16:15 UTC (permalink / raw)
To: ALT Linux sysadmin discuss
>>> Только вчера занимался настройкой FTP, вот по этой статье
>>> http://www.sys-adm.org.ua/system/ftp-nat.php
>>> Сделал как там написано и все заработало, как в пассивнов так и в
>>> активном режиме
>>>
>> Там вообще приведён кривой способ настройки. Про 20 порт в правилах
>> ни слова
>>
> Да и еще, такая конструкция лишина всякого смысла
> --tcp-flags FIN,SYN,RST,ACK SYN -m state --state RELATED,ESTABLISHED
> у тебя из флагов установлен только SYN, но зато состояние
> RELATED,ESTABLISHED
>
По моему все нормально.
iptables --append INPUT --in-interface lan --protocol tcp --dport 21
--match state --state NEW,ESTABLISHED,RELATED --jump ACCEPT
Здесь пропускаются пакеты, которые запрашивают и продолжают соединение
iptables --append OUTPUT --out-interface lan --protocol tcp --sport 21
'!' --syn --match state --state ESTABLISHED,RELATED --jump ACCEPT
Здесь пропускаются только пакеты, которые являются ответами, но не
являются запросами на соединение. Запрет syn -- это перебор, но не
смертельно.
Вы мне пальцем покажите, где он лезет на не привелегированный порт. И
для чего я его должен открывать?
Эта сессия просмотра директория из firefox.
[user@server ~]$ sudo tcpdump -S -i wan host ftp.altlinux.ru
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wan, link-type EN10MB (Ethernet), capture size 96 bytes
19:09:42.779715 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: S
2151863340:2151863340(0) win 192 <mss 1460,nop,nop,sackOK,nop,wscale 2>
19:09:42.784123 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: S
2070361771:2070361771(0) ack 2151863341 win 16384 <mss 1460,nop,wscale
0,nop,nop,sackOK>
19:09:42.784553 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: . ack
2070361772 win 48
19:09:42.823557 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: P
2070361772:2070361837(65) ack 2151863341 win 17520
19:09:42.823843 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: . ack
2070361837 win 31
19:09:42.824715 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: P
2151863341:2151863357(16) ack 2070361837 win 48
19:09:42.869297 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: P
2070361837:2070361871(34) ack 2151863357 win 17504
19:09:42.870181 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: P
2151863357:2151863387(30) ack 2070361871 win 48
19:09:42.884790 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: P
2070361871:2070361894(23) ack 2151863387 win 17474
19:09:42.886572 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: P
2151863387:2151863395(8) ack 2070361894 win 48
19:09:42.900289 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: P
2070361894:2070361924(30) ack 2151863395 win 17466
19:09:42.901204 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: P
2151863395:2151863404(9) ack 2070361924 win 48
19:09:42.914981 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: P
2070361924:2070361961(37) ack 2151863404 win 17457
19:09:42.915843 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: P
2151863404:2151863414(10) ack 2070361961 win 48
19:09:42.931310 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: P
2070361961:2070361998(37) ack 2151863414 win 17447
19:09:42.932175 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: P
2151863414:2151863424(10) ack 2070361998 win 48
19:09:42.952727 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: P
2070361998:2070362035(37) ack 2151863424 win 17437
19:09:42.955069 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: P
2151863424:2151863449(25) ack 2070362035 win 48
19:09:42.969849 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: P
2070362035:2070362086(51) ack 2151863449 win 17412
19:09:42.971572 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: P
2151863449:2151863455(6) ack 2070362086 win 48
19:09:42.984590 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: S
235890571:235890571(0) win 5840 <mss 1460,nop,nop,sackOK,nop,wscale 7>
19:09:42.984919 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: S
2157394915:2157394915(0) ack 235890572 win 192 <mss
1460,nop,nop,sackOK,nop,wscale 2>
19:09:43.014567 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: . ack
2157394916 win 46
19:09:43.014675 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: P
2070362086:2070362125(39) ack 2151863455 win 17406
19:09:43.039629 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: .
235890572:235890668(96) ack 2157394916 win 46
19:09:43.039906 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235890668 win 24
19:09:43.042045 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235890668 win 48
19:09:43.045567 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: P
235890668:235890764(96) ack 2157394916 win 46
19:09:43.047669 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235890764 win 48
19:09:43.053555 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: . ack
2070362125 win 48
19:09:43.076984 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: .
235890764:235890860(96) ack 2157394916 win 46
19:09:43.077834 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235890860 win 48
19:09:43.108141 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: P
235890860:235890956(96) ack 2157394916 win 46
19:09:43.110191 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235890956 win 48
19:09:43.139593 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: .
235890956:235891052(96) ack 2157394916 win 46
19:09:43.140640 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235891052 win 48
19:09:43.170495 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: P
235891052:235891148(96) ack 2157394916 win 46
19:09:43.172474 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235891148 win 48
19:09:43.201810 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: .
235891148:235891244(96) ack 2157394916 win 46
19:09:43.202594 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235891244 win 48
19:09:43.233352 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: P
235891244:235891340(96) ack 2157394916 win 46
19:09:43.235342 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235891340 win 48
19:09:43.264389 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: .
235891340:235891436(96) ack 2157394916 win 46
19:09:43.271891 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235891436 win 48
19:09:43.295729 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: P
235891436:235891532(96) ack 2157394916 win 46
19:09:43.296509 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235891532 win 48
19:09:43.326594 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: .
235891532:235891628(96) ack 2157394916 win 46
19:09:43.328678 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235891628 win 48
19:09:43.358343 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: P
235891628:235891724(96) ack 2157394916 win 46
19:09:43.360332 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235891724 win 48
19:09:43.389437 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: .
235891724:235891820(96) ack 2157394916 win 46
19:09:43.391404 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235891820 win 48
19:09:43.420552 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: P
235891820:235891916(96) ack 2157394916 win 46
19:09:43.421684 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235891916 win 48
19:09:43.451803 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: .
235891916:235892012(96) ack 2157394916 win 46
19:09:43.452842 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235892012 win 48
19:09:43.483064 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: P
235892012:235892108(96) ack 2157394916 win 46
19:09:43.484165 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235892108 win 48
19:09:43.514497 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: .
235892108:235892204(96) ack 2157394916 win 46
19:09:43.516485 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235892204 win 48
19:09:43.545584 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: P
235892204:235892300(96) ack 2157394916 win 46
19:09:43.547550 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: . ack
235892300 win 48
19:09:43.576957 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: FP
235892300:235892311(11) ack 2157394916 win 46
19:09:43.578965 IP 192.168.1.1.4269 > ftp.altlinux.org.ftp-data: F
2157394916:2157394916(0) ack 235892312 win 48
19:09:43.618446 IP ftp.altlinux.org.ftp-data > 192.168.1.1.4269: . ack
2157394917 win 46
19:09:43.639350 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: P
2070362125:2070362149(24) ack 2151863455 win 17406
19:09:43.639632 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: . ack
2070362149 win 42
19:09:43.640904 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: P
2151863455:2151863461(6) ack 2070362149 win 48
19:09:43.682156 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: P
2070362149:2070362163(14) ack 2151863461 win 17400
19:09:43.684500 IP 192.168.1.1.3538 > ftp.altlinux.org.ftp: F
2151863461:2151863461(0) ack 2070362163 win 48
19:09:43.687771 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: R
2070362163:2070362163(0) ack 2151863461 win 0
19:09:43.687839 IP ftp.altlinux.org.ftp > 192.168.1.1.3538: R
2070362163:2070362163(0) win 0
> Давай весь конфиг с настройкой iptables, будет понятно тогда где
> пакеты теряются
Там несколько тысяч строк...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Sysadmins] iptables и ftp --- фича или баг?
2008-11-19 19:47 [Sysadmins] iptables и ftp --- фича или баг? Kharitonov A. Dmitry
2008-11-19 22:47 ` Alexey Shabalin
@ 2008-11-22 15:27 ` Kharitonov A. Dmitry
2 siblings, 0 replies; 7+ messages in thread
From: Kharitonov A. Dmitry @ 2008-11-22 15:27 UTC (permalink / raw)
To: ALT Linux sysadmin discuss
Разобрался, работает так:
-A INPUT -i wan -p tcp -m tcp --sport 20 -m state --state
RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i wan -p tcp -m tcp --sport 21 -m state --state
RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -o wan -p tcp -m tcp --dport 21 -m state --state
NEW,RELATED,ESTABLISHED -j ACCEPT
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-11-22 15:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-19 19:47 [Sysadmins] iptables и ftp --- фича или баг? Kharitonov A. Dmitry
2008-11-19 22:47 ` Alexey Shabalin
2008-11-20 5:42 ` Kharitonov A. Dmitry
2008-11-20 5:34 ` Kharitonov A. Dmitry
2008-11-20 6:38 ` "ЗАО \"Уралэнерго-Союз\" / Бережко Иван"
2008-11-21 16:15 ` Kharitonov A. Dmitry
2008-11-22 15:27 ` Kharitonov A. Dmitry
ALT Linux sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git