• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Restrict FTP access by IP ?

J

Jaxelos

Guest
Can I restrict the FTP access by IP in Plesk ?

I have some users that I think are sharing the account and I want to limit the FTP access for a specific class C range.

Is it possible how ?
 
Per the ProFTPd docs at:

http://www.proftpd.org/localsite/Userguide/linked/x1021.html
Code:
#
# Simple .ftpaccess file to control which IPs
# can access this directory structure
#
<Limit>
	Allow 212.32.5.0/26
	Allow 158.152.0.0/16
	DenyAll
</Limit>
#
# end
#
This is like creating an .htaccess file, same principles in any case. You would not do this from the Plesk Control Panel.
 
Ok , I got the ideea , but I think this will limit the FTP access to ALL domains hosted on the server and not only to one ? right ?

I want to limit FTP access for a specific user who owns the domain mydomain.ltd .
 
So create the .ftpaccess file and put it into that domain's docroot directory.

The server treats a directory that contains a .ftpaccess file exactly as if the configuration directives in that file had been placed in a <Directory> section in the main proftpd.conf file. For example, if there is a /home/users/bob directory on your system, and in that directory there was a .ftpaccess file that contained:

DirFakeUser on ~
DirFakeGroup on ~
Umask 0077

it would be treated exactly as if:

<Directory /home/users/bob>
DirFakeUser on ~
DirFakeGroup on ~
Umask 0077
</Directory>

was written into proftpd.conf.
This example is quoted from their site, not that it applies to your direct question, just another example for the explanation above it.... For more info, please see the following site:

ProFTPD Developer's Guide
 
Hmm .. yes , should work.

You seem always to have the answer jamesyeeoc.
Thank you.

I haven't used linux since 4-5 years ago and most of my knowledge got lost or simply never been there. Time came for me to get it started again. Reason = Need :)
 
That's like FreeBSD and myself. Haven't used it in many years, and now there is a resurgence of it here in the Plesk arena and I feel a bit lost.... :)
 
Back
Top