容器技术交流

 找回密码
 立即注册
查看: 4038|回复: 5

有关 pure-ftpd m0n0wall pasv 530 设置问题

[复制链接]
发表于 2011-7-24 12:59:57 | 显示全部楼层 |阅读模式
大家好,请大家来看看 怎么设置 LUM的 pasv 模式设置比较好


通过 ssh 登陆找到 usr/local/pureftpd/pure-ftpd.conf 但是对这个不是很熟悉。。大家来帮忙看看


出现问题 530 内网 ftp 正常 ,估计跟防火墙设置有关 ,在serv-u ftp 有相关的 PASV 外网IP 和 port 设置


在linux pure-ftpd 上不知道 怎么设置比较合理


求教
 楼主| 发表于 2011-7-24 13:11:15 | 显示全部楼层
本帖最后由 tenson7 于 2011-7-24 15:53 编辑

响应:  220---------- Welcome to Pure-FTPd [privsep] ----------
响应:  220-You are user number 1 of 50 allowed.
响应:  220-Local time is now 23:06. Server port: 21.
响应:  220-This is a private system - No anonymous login
响应:  220-IPv6 connections are also welcome on this server.
响应:  220 You will be disconnected after 15 minutes of inactivity.
命令:  USER hunterfree
响应:  331 User hunterfree OK. Password required
命令:  PASS ******
响应:  230 OK. Current restricted directory is /
状态:  连接成功
状态:  正在取得目录列表...
命令:  PWD
响应:  257 "/" is your current location
命令:  PASV
响应:  227 Entering Passive Mode (10,0,0,247,107,151)
命令:  TYPE A
响应:  200 TYPE is now ASCII
命令:  LIST
错误:  无法打开传输通道。原因:由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
错误:  无法取得目录列表
命令:  TYPE I

补上 pure-ftpd.conf 内容
# Maximum bandwidth for *all* users (including anonymous) in KB/s
# Use AnonymousBandwidth *or* UserBandwidth, both makes no sense.

# UserBandwidth             8



# File creation mask. <umask for files>:<umask for dirs> .
# 177:077 if you feel paranoid.

Umask                       002:002



# Minimum UID for an authenticated user to log in.

MinUID                      100



# Allow FXP transfers for authenticated users.

AllowUserFXP                no



# Allow anonymous FXP for anonymous and non-anonymous users.

AllowAnonymousFXP           no



# Users can't delete/write files beginning with a dot ('.')
# even if they own them. If TrustedGID is enabled, this group
# will have access to dot-files, though.

ProhibitDotFilesWrite       no



# Prohibit *reading* of files beginning with a dot (.history, .ssh...)

ProhibitDotFilesRead        no



# Never overwrite files. When a file whoose name already exist is uploaded,
# it get automatically renamed to file.1, file.2, file.3, ...

AutoRename                  no



# Disallow anonymous users to upload new files (no = upload is allowed)

AnonymousCantUpload         no



# Only connections to this specific IP address are allowed to be
# non-anonymous. You can use this directive to open several public IPs for
# anonymous FTP, and keep a private firewalled IP for remote administration.
# You can also only allow a non-routable local IP (like 10.x.x.x) to
# authenticate, and keep a public anon-only FTP server on another IP.

#TrustedIP                  10.1.1.1



# If you want to add the PID to every logged line, uncomment the following
# line.

#LogPID                     yes



# Create an additional log file with transfers logged in a Apache-like format :
# fw.c9x.org - jedi [13/Dec/1975:19:36:39] "GET /ftp/linux.tar.bz2" 200 21809338
# This log file can then be processed by www traffic analyzers.

# AltLog                     clf:/var/log/pureftpd.log



# Create an additional log file with transfers logged in a format optimized
# for statistic reports.

AltLog                     stats:/var/log/pureftpd.log



# Create an additional log file with transfers logged in the standard W3C
# format (compatible with most commercial log analyzers)

# AltLog                     w3c:/var/log/pureftpd.log



# Disallow the CHMOD command. Users can't change perms of their files.

#NoChmod                     yes



# Allow users to resume and upload files, but *NOT* to delete them.

#KeepAllFiles                yes



# Automatically create home directories if they are missing

CreateHomeDir               yes



# Enable virtual quotas. The first number is the max number of files.
# The second number is the max size of megabytes.
# So 1000:10 limits every user to 1000 files and 10 Mb.

#Quota                       1000:10



# If your pure-ftpd has been compiled with standalone support, you can change
# the location of the pid file. The default is /var/run/pure-ftpd.pid

PIDFile                     /var/run/pure-ftpd.pid



# If your pure-ftpd has been compiled with pure-uploadscript support,
# this will make pure-ftpd write info about new uploads to
# /var/run/pure-ftpd.upload.pipe so pure-uploadscript can read it and
# spawn a script to handle the upload.

#CallUploadScript yes



# This option is useful with servers where anonymous upload is
# allowed. As /var/ftp is in /var, it save some space and protect
# the log files. When the partition is more that X percent full,
# new uploads are disallowed.

MaxDiskUsage               99



# Set to 'yes' if you don't want your users to rename files.

#NoRename                  yes



# Be 'customer proof' : workaround against common customer mistakes like
# 'chmod 0 public_html', that are valid, but that could cause ignorant
# customers to lock their files, and then keep your technical support busy
# with silly issues. If you're sure all your users have some basic Unix
# knowledge, this feature is useless. If you're a hosting service, enable it.

CustomerProof              yes



# Per-user concurrency limits. It will only work if the FTP server has
# been compiled with --with-peruserlimits (and this is the case on
# most binary distributions) .
# The format is : <max sessions per user>:<max anonymous sessions>
# For instance, 3:20 means that the same authenticated user can have 3 active
# sessions max. And there are 20 anonymous sessions max.

# PerUserLimits            3:20



# When a file is uploaded and there is already a previous version of the file
# with the same name, the old file will neither get removed nor truncated.
# Upload will take place in a temporary file and once the upload is complete,
# the switch to the new version will be atomic. For instance, when a large PHP
# script is being uploaded, the web server will still serve the old version and
# immediatly switch to the new one as soon as the full file will have been
# transfered. This option is incompatible with virtual quotas.

# NoTruncate               yes



# This option can accept three values :
# 0 : disable SSL/TLS encryption layer (default).
# 1 : accept both traditional and encrypted sessions.
# 2 : refuse connections that don't use SSL/TLS security mechanisms,
#     including anonymous sessions.
# Do _not_ uncomment this blindly. Be sure that :
# 1) Your server has been compiled with SSL/TLS support (--with-tls),
# 2) A valid certificate is in place,
# 3) Only compatible clients will log in.

# TLS                      1



# Listen only to IPv4 addresses in standalone mode (ie. disable IPv6)
# By default, both IPv4 and IPv6 are enabled.

# IPV4Only                 yes



# Listen only to IPv6 addresses in standalone mode (ie. disable IPv4)
# By default, both IPv4 and IPv6 are enabled.

# IPV6Only                 yes

# UTF-8 support for file names (RFC 2640)
# Define charset of the server filesystem and optionnally the default charset
# for remote clients if they don't use UTF-8.
# Works only if pure-ftpd has been compiled with --with-rfc2640

# FileSystemCharset     big5
# ClientCharset         big5


 楼主| 发表于 2011-7-24 15:07:11 | 显示全部楼层
227 Entering Passive Mode (10,0,0,247,107,151) 返回 外网 IP 那里有办法修改!? 指教
发表于 2011-7-26 03:26:39 | 显示全部楼层
LZ在FTP软件上设置一些列表命令就可以了.具体是那一个不记得了.
 楼主| 发表于 2012-1-14 21:38:18 | 显示全部楼层
还是比较少人 搞得懂!!!哎哎
 楼主| 发表于 2012-3-29 08:14:15 | 显示全部楼层
最后 我在NAT 设置 20000~30000 网关修改成我的路由系统防火墙网关 成功外网FTP
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|URLOS ( 粤ICP备18087780号 )

GMT+8, 2025-5-15 17:34 , Processed in 0.030488 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表