Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7604849
  • 博文数量: 1769
  • 博客积分: 18684
  • 博客等级: 上将
  • 技术积分: 16352
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-02 10:28
个人简介

啥也没写

文章分类

全部博文(1769)

文章存档

2024年(15)

2023年(44)

2022年(39)

2021年(46)

2020年(43)

2019年(27)

2018年(44)

2017年(50)

2016年(47)

2015年(15)

2014年(21)

2013年(43)

2012年(143)

2011年(228)

2010年(263)

2009年(384)

2008年(246)

2007年(30)

2006年(38)

2005年(2)

2004年(1)

分类: LINUX

2009-08-14 13:04:42

VsftpA quick and easy way to setup a chroot Vsftpd with non-system users.

Here you’ll can:
1. Configure vsftpd to use ftp virtual users.
2. Administer your ftp virtual users through some bash scripts.

# Installation.
yum -y install vsftpd db4-untils

# Configuration.

#——————————————————————–
# Server.
#——————————————————————–
Just after install vsftpd package, run one of the following scripts to configure your ftp server

# Do a basic ftp virtual user configuration without TLS. Here USER and PASS go readable over the wire.
vsftpd_virtual_config.sh

# Do a basic ftp virtual user configuration with TLS. Here USER and PASS go unreadable over the wire.
vsftpd_virtual_config_withTLS.sh

If you are offering ftp service across Internet you probably want to try the vsftpd_virtual_config_withTLS.sh script. Don’t you ?

#——————————————————————–
# Users
#——————————————————————–
Once your vsftpd is configured you can use the following scripts to administer the ftp virtual users:

# Add a new ftp virtual user ( requires vsftpd_virtualuser_config.tpl ).
vsftpd_virtualuser_add.sh

# Update ftp virtual user information.
vsftpd_virtualuser_update.sh

# Remove ftp virtual user (CAUTION!: and all its related data).
vsftpd_virtualuser_remove.sh

# Retrieve ftp virtual user information.
vsftpd_virtualuser_info.sh

Additionally, you can prevent an ftp virtual user from login to the vsftpd by denying its account. You can do this when you create a new ftp virtual user or when you update an existent one.
#——————————————————————–
# Firewall.
#——————————————————————–
# In order for this configuration to work, you’ll need to open, in the server side, the ftp command port:

-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 21 -j ACCEPT

# And if you can’t transfer data with default configuration rules, then the ftp data transfer range of ports should be opened, in the server side, too:

-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 64000:65535 -j ACCEPT

脚本地址: 

 

阅读(702) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2009-08-16 09:22:55

http://luntandizhi.com/