Enable speed limiting for different network segments using vsftpd

Source: Internet
Author: User
Vsftpd has a vsftpd FTP server with different speed limits for different network segments. now, you need to set the speed limit when accessing the company's intranet. The speed limit of vsftpd is configured by anon_max_rate and local_max_rate to upload anonymous users and authorized users respectively... vsftpd has a vsftpd FTP server with different speed limits for different network segments. now, you need to set the speed limit when accessing the company's intranet. The speed limit of vsftpd is configured by anon_max_rate and local_max_rate for anonymous users and authorized users respectively, but this is for all clients, you need to use the tcp_wrapper function through man vsftpd. conf, and then find the tcp_wrapper option. the obtained explanation is as follows: www.2cto.com If enabled, and vsftpd was compiled with tcp_wrappers support, incoming connections will be fed through tcp_wrappers access control. furthermore, there is a mechanism for per-IP based configuration. if tcp_wrappers sets the VSFTP D_LOAD_CONF environ-ment variable, then the vsftpd session will try and load the vsftpd configuration file specified in this variable. default: NO indicates that if tcp_wrapper is enabled, different configuration files can be loaded for sessions from different IP addresses. Therefore, it can meet our requirements. the configuration steps are as follows: www.2cto.com software environment: CentOS5.7 + vsftpd2.0.51, edit/etc/vsftpd. conf, add: tcp_wrapper = YES2, edit/etc/hosts. allow, add: vsftpd: 192. 168. *. *: setenv VSFTPD_LOAD_CONF/etc/vsftpd/local. class vsftpd: ALL: setenv VSFTPD_LOAD_CONF/etc/vsftpd/internet. class attention sequence 3. create and edit/etc/vsftpd/local. class, added: anon_max_rate = 0 # Anonymous logon user local_max_rate = 0 # authorized logon user set to 0 represents no speed limit 4. create and edit/etc/vsftpd/internet. class, add content: Anon_max_rate = 300000 # The speed of anonymous users is about 500000 KB/s local_max_rate = # The speed of authorized users is about kb/s to restart the vsftpd service. in this way, the speed of the network segment 192.168.0.0 is not limited, speed limit of other network segments.
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.