ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Maxim Tyurin <mrkooll@bungarus.info>
To: ALT Linux Community <community@lists.altlinux.org>
Subject: Re: [Comm] ftp пассивный режим и iptables
Date: Thu, 09 Nov 2006 18:48:49 +0200
Message-ID: <45535BF1.7050106@bungarus.info> (raw)
In-Reply-To: <45535179.8060501@boudnik.kiev.ua>

Sergei Boudnik пишет:
> Igo пишет:
>> Чего не хватает чтобы пускал через пасивный режим
>>
>> $IPTABLES -A INPUT -p TCP -s ipaddr --dport 20  -j ACCEPT
>>   
> Это не нужно вообще
>> $IPTABLES -A INPUT -p TCP -d ipaddr --sport 20  -j ACCEPT
>>   
> Это может пригодиться, чтобы самому качать в активном режиме
>> $IPTABLES -A INPUT -p TCP -s ipaddr --dport 21  -j ACCEPT
>>   
> Это нужно для любого ftp
>> $IPTABLES -A INPUT -p TCP -d ipaddr --sport 21  -j ACCEPT
>>   
> Это лишнее
>> $IPTABLES -A INPUT -p TCP -m state --state ESTABLISHED,RELATED -j ACCEPT
>>
>>
>> [root@cerber sysconfig]# lsmod |grep ip
>> ip_conntrack_ftp        3856   1
>>   
> В идеале этот модуль должен отработать ftp соединения, но реальность 
> далека от идеала, поэтому приходится делать по-старинке:
> 
> $IPTABLES -A INPUT -p tcp --sport 32768:65535 --dport 32768:65535 -j ACCEPT

Не нужно вредных советов.
И нормально работает трассировка ftp

Для работы ftp хватит:
modprobe ip_conntrack_ftp
iptables -A INPUT -p TCP -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p TCP -s ipaddr --dport 20  -j ACCEPT
iptables -A INPUT -p TCP -s ipaddr --dport 21  -j ACCEPT
-- 
With Best Regards, Maxim Tyurin
JID:	MrKooll@jabber.pibhe.com
   ___
  / _ )__ _____  ___ ____ _______ _____
 / _  / // / _ \/ _ `/ _ `/ __/ // (_-<
/____/\_,_/_//_/\_, /\_,_/_/  \_,_/___/
               /___/


  parent reply	other threads:[~2006-11-09 16:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-09 15:15 Igo
2006-11-09 16:04 ` Sergei Boudnik
2006-11-09 16:14   ` Dmitriy L. Kruglikov
2006-11-09 16:46     ` Sergei Boudnik
2006-11-09 16:52       ` Dmitriy L. Kruglikov
2006-11-09 18:04         ` Sergei Boudnik
2006-11-09 16:48   ` Maxim Tyurin [this message]
2006-11-09 17:03     ` Andrii Dobrovol`s`kii
2006-11-09 18:15     ` Sergei Boudnik
2006-11-14 17:20 ` Anton Gorlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45535BF1.7050106@bungarus.info \
    --to=mrkooll@bungarus.info \
    --cc=community@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git