есть ipfw+natd с внешним айпи. (192.168.10.10 && 84.54.64.20)
прописываю в /etc/natd.conf:
Код: Выделить всё
redirect_port tcp 192.168.10.99:20 20
redirect_port tcp 192.168.10.99:21 21
далее в фаерволе добавил такие строке ниже ната:
Код: Выделить всё
03400 0 0 allow tcp from any to 192.168.10.99 dst-port 20 in via xl0
03500 0 0 allow tcp from any to 192.168.10.99 dst-port 20 out via nve0
03600 66 3558 allow tcp from any to 192.168.10.99 dst-port 21 in via xl0
03700 66 3558 allow tcp from any to 192.168.10.99 dst-port 21 out via nve0
из локальки естесвенно все ок работает.. а вот когда ко мне пытаются подклчистя из инета на внешнйи айпи происходит следующее:
на клиенте:
Код: Выделить всё
Status: Resolving IP-Address for server.spb.ru
Status: Connecting to 84.54.64.20:21...
Status: Connection established, waiting for welcome message...
Response: 220 ftp.artpaint FTP server (Version 6.00LS) ready.
Command: USER artpaint
Response: 331 Password required for artpaint.
Command: PASS **********
Error: Connection timed out
Error: Could not connect to server
прообуем еще раз. на этот раз удается даже сделать LIST. но потом опять бяда:
Код: Выделить всё
Status: Resolving IP-Address for server.spb.ru
Status: Connecting to 84.54.64.20:21...
Status: Connection established, waiting for welcome message...
Response: 220 ftp.artpaint FTP server (Version 6.00LS) ready.
Command: USER artpaint
Response: 331 Password required for artpaint.
Command: PASS **********
Response: 230 User artpaint logged in.
Command: SYST
Response: 215 UNIX Type: L8 Version: BSD-199506
Command: FEAT
Response: 211- Extensions supported:
Response: MDTM
Response: REST STREAM
Response: SIZE
Response: 211 End.
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/usr/home/artpaint" is current directory.
Command: TYPE A
Response: 200 Type set to A.
Command: PASV
Response: 227 Entering Passive Mode (84,54,64,20,237,91)
Command: LIST
Error: Connection timed out
Error: Failed to retrieve directory listing
Код: Выделить всё
Dec 3 14:22:27 ftp ftpd[56505]: connection from user200-99.tsinet.ru (217.97.200.99)
Dec 3 14:22:43 ftp ftpd[56505]: FTP LOGIN FROM user200-99.tsinet.ru as artpaint
Dec 3 14:30:47 ftp ftpd[56957]: connection from user200-99.tsinet.ru (217.97.200.99)
Dec 3 14:30:47 ftp ftpd[56957]: FTP LOGIN FROM user200-99.tsinet.ru as artpaint