Vsftpd + tcp_wrappers Control Host and user access
Source: Internet
Author: User
Vsftpd + tcp_wrappers Controls host and user access-Linux Enterprise Application-Linux server application information. The following is a detailed description. Vsftpd in RHEL4 already supports tcp_wrappers during compilation, so you can use tcp_wrappers to implement host access control.
Before the experiment, let's talk about the execution sequence of tcp-wrappers:
Run hosts first. allow, if hosts. if there is a list in allow, access from hosts in the list is allowed; otherwise, the hosts will be searched down. deny, if hosts. if there is a list in deny, access to the machines in the list is denied. If there is no list in allow or deny, access to the host is allowed.
In real life, host. allow can also set the "deny" function. Therefore, you can only use/etc/hosts. allow to control access to the host.
(1) host access control
Configure the vsftpd service on the host (192.168.1.102) so that hosts in the 192.168.1.0/24 network segment can access the FTP service except 192.168.1.100.
The solution is quite simple. edit/etc/hosts. allow
Vsftpd: 192.168.1.100: DENY
Vsftpd: 192.168.1.
Restart vsftpd to achieve the purpose of the experiment. In this experiment, you can make the experiment more complex for tcp_wrappers.
(2) User Access Control
Vsftpd provides flexible user access control. In specific implementation, vsftpd user access control is divided into two types: the first type is the traditional user list/etc/vsftpd/ftpusers, I regard it as a system list (forbidden by the system). The second type is the improved user list file/etc/vsftpd/user_list. I regard it as the list I want to prohibit.
To implement the second type of list control, you must have
Userlist_enable = YES
Userlist_deny = YES // This entry exists by default, that is, you do not need to add the system or the default value is YES.
Userlist_file =/etc/vsftpd/usrer_list
Through the above simple experiments, the powerful control capability of vsftpd can be achieved.
More exciting, please follow my space http://273015666.qzone.qq.com
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service