Страница 1 из 1

Научите нуба ходить на ftp через фаерволл.

Добавлено: 2010-11-02 21:43:40
UsCr
Здравствуйте. На Freebsd 8.1 настроил proftp, с помощью ipfw пробросил порт с внешнего 34853 на внутренний 21 порт. Теперь могу авторизоваться с клиента из интернета, а вот передавать данные не могу - оно и понятно passive mode же! Казалось бы - проблемы нет. Достаточно не использовать passive mode и всем будет хорошо но...

Вот что я вижу в passive mode:

Код: Выделить всё

[nazarovd@Darvin ~]$ ftp 93.157.236.36 34853
Connected to 93.157.236.36 (93.157.236.36).
220 ProFTPD 1.3.3a Server (PROGRESS FTP) [93.157.236.36]
Name (93.157.236.36:nazarovd): progress_ftp
331 Password required for progress_ftp
Password:
230 User progress_ftp logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> dir
227 Entering Passive Mode (93,157,236,36,252,127).
Вот что при попытке его отключить:

Код: Выделить всё

[nazarovd@Darvin ~]$ ftp 93.157.236.36 34853
Connected to 93.157.236.36 (93.157.236.36).
220 ProFTPD 1.3.3a Server (PROGRESS FTP) [93.157.236.36]
Name (93.157.236.36:nazarovd): progress_ftp
331 Password required for progress_ftp
Password:
230 User progress_ftp logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> active
?Invalid command
ftp> passive
Passive mode off.
ftp> dir
500 Illegal PORT command
ftp: bind: Адрес уже используется
Конфиг proftp:

Код: Выделить всё

ServerName                      "PROGRESS FTP"
ServerType                      standalone
DefaultServer                   on
#ScoreboardFile         /var/run/proftpd/proftpd.scoreboard

# Port 21 is the standard FTP port.
Port                            21

# Use IPv6 support by default.
UseIPv6                         off

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask                           022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances                    30

CommandBufferSize               512

# Set the user and group under which the server will run.
User                            nobody
Group                           nogroup

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite          on

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
  DenyAll
</Limit>

# A basic anonymous configuration, no upload directories.  If you do not
# want anonymous users, simply delete this entire <Anonymous> section.

#########################################################################
#                                                                       #
# Uncomment lines with only one # to allow basic anonymous access       #
#                                                                       #
#########################################################################

<Anonymous ~ftp>
   User                         anon_ftp
   Group                        anon_ftp

  ### We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias                     anonymous anon_ftp

  ### Limit the maximum number of anonymous logins
  MaxClients                    10

  ### We want 'welcome.msg' displayed at login, and '.message' displayed
  ### in each newly chdired directory.
  # DisplayLogin                        welcome.msg
  # DisplayFirstChdir           .message

  ### Limit WRITE everywhere in the anonymous chroot
  # <Limit WRITE>
  #   DenyAll
  # </Limit>
</Anonymous>
Вопрос:
Ковырять нужно клиент, сервер, или я вообще ничего не понял?

Re: Научите нуба ходить на ftp через фаерволл.

Добавлено: 2010-11-03 1:02:05
FreeBSP
http://ru.wikipedia.org/wiki/FTP
справа смотри