Proftpd learning note (3) - turn

xiaoxiao2021-03-06  39

The two notes in front, I think everyone should have some understanding of Proftp, is it almost the same as the Apache configuration. I want to configure the serv_u server, then look at the configuration rules of PROFTP, you should be able to configure a powerful Proftp server immediately.

Here we talk about other parameter configurations of Proftp:

MaxHostSperUser 1 "Sorry, each account is allowed to allow for 1" #maxhostsperuser to prevent the FTP account or is more useful.

MaxClientSperUser 1 "Sorry, each account can log in to each client" ## This parameter can prevent multithreaded software from downloading the server

MaxClientSperHost 1 "Sorry, the same client can only log in to" #, such as the FTP server has a lot of accounts, but only one account will be used

Oh, these three MAX parameters are relatively easy to faint, everyone can figure out their meaning :)

WTMPLOG ON # Do you want to record the FTP in the log, if you don't want to set it to the OFF shield off the log log.

TimeOutidle 600 # client IDEL time setting, the default is 600 seconds

DisplayLogin Welcome.msg # Set FTP Login Welcome Information File

The settings about the welcome files include the following parameters

% T current time

% F remaining the hard disk left

% C Currently in the current directory

% R Client's host name

% L Server host name

% U user account name

% M maximum number of connections

% N current server connections

% E FTP server administrator Email

% I Number of files uploaded

% O This quantity downloaded

% T This time upload number of downloaded files

Know these parameters, we can write a friendly welcome language

vi /home/kaoyan/welcome.msg

You are welcome to% U, this is Frank's test FTP server;

Current time is:% t;

This server allows up to% M user connections;

There is currently% N user connections on the server;

Currently your directory is% C;

The hard disk where the directory is located remains% F bytes.

Let PROFTP support now popular FXP transmission mode, it is not supported by default. Just set in the server

AllowForeignAddress on

Passiveports 49152 65534 # port also you can specify yourself

Don't forget to set up to support FXP at the client, otherwise I think I tried it several times, I always thought that the server did not set well, in fact, the client is not set, huh, huh.

How to get root can log in, the default proFTP does not support root login, we can set up the root can also log in to FTP, but I still recommend that everyone is best not to let Root can log in to FTP, set the following

ROOTLOGIN ON

How to prohibit an address access FTP such as a 10.1.1 network segment from 10.1.1 network segment from accessing FTP, can be set up

ORDER DENY, ALOW

Deny from 10.1.1.

ALLOW FROM ALL

Establishment of virtual FTP, generally used for a FTP server has a lot of IP addresses, or FTP with different ports, basic setting syntax is:

For example, we have to do a port is a 5555 FTP server:

ServerName "Frank FTP Server"

Port 5555

...

...

...

...

As for other settings in the virtual host, I have a basically the basics I have previously speaking.

Upload / download ratio settings, I want to use serv_u friends must know this feature, let's make Proftp implement this feature. To achieve the functional attention to compile, add the Ratio module, otherwise the default is not supported, assumes an account FTP1 ftp directory in / home / kaoyan, then we set up the upload / download ratio of FTP1 is 1: 2 (ie upload 1M, You can download 2M)

Touch /Home/kaoyan/ratio.dat

Touch /Home/kaoyan/ratio.tmp

CHMOD -R 666 / HOME / KAOYAN

Set as follows in proftpd.conf

Ratios on

Saveratios on

Ratiofile /Home/kaoyan/ratio.dat

Ratiotempfile /Home/kaoyan/ratio.tmp

Accordingly

Add

Userratio ftp1 0 0 2 1000

# Urserratio "User Account" Fileratio Filequota Byteratio bytequota # fileratio: Based on the file, usually not limited, so 0 # filequota: Pre-setup can download how much file, no limit is 0 # byteratio: Your upload / download Proportion, if the number is 2, indicating 1: 2 # bytequota: Pre-setting how many kbytes file # above setting is 1: 2 ratio, the default only allows download 1M files

OK, restart, FTP1 will be enabled to enable upload / download ratio.

转载请注明原文地址:https://www.9cbs.com/read-57607.html

New Post(0)