---
title: "linux vsftpd PASV 模式失败, 尝试 PORT  模式?"
author: "csstome"
date: "2011-05-08T14:27:00Z"
tags: []
slug: "linux-vsftpd-pasv-port"
draft: false
lastmod: "2011-10-28T08:47:58Z"
id: 1219528
url: "https://csstome.iteye.com/blog/1219528"
---

今天在linux上开了个ftp账号

使用FlashFxp登陆时老时提示：

\[右] 数据 Socket 错误: 连接超时

\[右] 列表错误

\[右] PASV 模式失败, 尝试 PORT 模式。

后来发现我的vsftpd采用的是被动模式链接

## Vsftp的PASV mode（被动模式传送)和Port模式 介绍可以查看（[http://linux.net527.cn/fuwuqiyingyong/Ftpfuwuqi/38774.html](http://linux.net527.cn/fuwuqiyingyong/Ftpfuwuqi/38774.html)

## ）

看了下 vsftpd.conf

pasv\_enable=YES

pasv\_min\_port=30000

pasv\_max\_port=30999

找到原因 防火墙的 30000：30999没开

解决办法：

添加防火墙规则

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 30000:30999 -j ACCEPT

重启 防火墙

service iptables restart

一切OK