Есть PC роутер на нем крутится ProFTPd,
есть локалка eth0 192.168.0.0/24,
сеть провайдера eth1 с серым IP 10.0.0.0/8 + белый IP 109.x.x.x (натится у прова)
Из локалки ФТП работает без нареканий, а вот при попытке подконнектится из мира TotalCommander ругается: 500 illegal PORT command (Команда PORT не выполнена)
при этом в логах ProFTPd:
Feb 15 02:10:01 debian proftpd[1769] debian (195.x.x.x): FTP session opened.
Feb 15 02:10:01 debian proftpd[1769] debian (195.x.x.x): Preparing to chroot to directory '/home/ftp'
Feb 15 02:10:01 debian proftpd[1769] debian (195.x.x.x): ANON ftp: Login successful.
Feb 15 02:10:22 debian proftpd[1769] debian (195.x.x.x): Refused PORT 192,168,0,2,4,189 (address mismatch)
Собсно вопрос чего такое происходит, почему в Refused PORT 192,168,0,2,4,189 ip машинки стоящей за натом (с которой я тоталом пытаюсь подконнектится) из внешнего мира?.
конфиг proftpd.conf
Include /etc/proftpd/modules.conf
UseIPv6 off
IdentLookups off
ServerName "Debian"
ServerType standalone
DeferWelcome off
MultilineRFC2228 on
DefaultServer on
ShowSymlinks on
TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200
DisplayLogin welcome.msg
DisplayChdir .message true
ListOptions "-l"
DenyFilter \*.*/
Port 21
MaxInstances 30
User proftpd
Group nogroup
Umask 022 022
AllowOverwrite on
TransferLog /var/log/proftpd/xferlog
SystemLog /var/log/proftpd/proftpd.log
<IfModule mod_quotatab.c>
QuotaEngine off
</IfModule>
<IfModule mod_ratio.c>
Ratios off
</IfModule>
<IfModule mod_delay.c>
DelayEngine on
</IfModule>
<IfModule mod_ctrls.c>
ControlsEngine off
ControlsMaxClients 2
ControlsLog /var/log/proftpd/controls.log
ControlsInterval 5
ControlsSocket /var/run/proftpd/proftpd.sock
</IfModule>
<IfModule mod_ctrls_admin.c>
AdminControlsEngine off
</IfModule>
<Anonymous ~ftp>
User ftp
Group nogroup
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
MaxClients 10
DisplayLogin welcome.msg
DisplayChdir .message
</Anonymous>
ну и iptables-save на всякий случай
# Generated by iptables-save v1.4.8 on Wed Feb 15 06:30:18 2012
*mangle
:PREROUTING ACCEPT [133224:35760532]
:INPUT ACCEPT [24252:3225708]
:FORWARD ACCEPT [108966:32534488]
:OUTPUT ACCEPT [11105:2959046]
:POSTROUTING ACCEPT [120111:35500855]
-A PREROUTING -i eth0 -j TTL --ttl-set 64
COMMIT
# Completed on Wed Feb 15 06:30:18 2012
# Generated by iptables-save v1.4.8 on Wed Feb 15 06:30:18 2012
*nat
:PREROUTING ACCEPT [29362:2096394]
:POSTROUTING ACCEPT [22:2700]
:OUTPUT ACCEPT [748:53536]
-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
-A POSTROUTING -o eth1 -j SNAT --to-source 10.x.x.x
COMMIT
# Completed on Wed Feb 15 06:30:18 2012
# Generated by iptables-save v1.4.8 on Wed Feb 15 06:30:18 2012
*filter
:INPUT DROP [14103:877031]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:0]
:common-check - [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -j common-check
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i eth0 -j ACCEPT
-A INPUT -i eth1 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -i eth1 -p tcp -m tcp --dport 20 -j ACCEPT
-A INPUT -i eth1 -p tcp -m tcp --dport 21 -j ACCEPT
-A INPUT -i eth1 -p icmp -m icmp --icmp-type 3 -j ACCEPT
-A INPUT -i eth1 -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A INPUT -i eth1 -p icmp -m icmp --icmp-type 12 -j ACCEPT
-A FORWARD -j common-check
-A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -s 192.168.0.0/24 -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -j common-check
-A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -j ACCEPT
-A common-check -m state --state INVALID -j DROP
-A common-check -p tcp -m tcp --tcp-flags SYN,ACK SYN,ACK -m state --state NEW -j REJECT --reject-with tcp-reset
-A common-check -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j DROP
-A common-check -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,PSH,URG -j DROP
-A common-check -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -j DROP
-A common-check -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,ACK,URG -j DROP
-A common-check -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j DROP
-A common-check -p tcp -m tcp --tcp-flags SYN,RST SYN,RST -j DROP
-A common-check -p tcp -m tcp --tcp-flags FIN,SYN FIN,SYN -j DROP
COMMIT
П.С. modprobe nf_conntrack_ftp загружен, ЧЯДНТ???