Problem

You want to make proftpd to allow access for certain FTP users only from certain IP addresses.

Analysis

One possibility is to use mod_ifsession.

Solution

  1. Install mod_ifsession.
  2. Define a Class in your proftpd.conf:
    <Class friends>
      From 1.2.3.4/8
    </Class>
  3. Use Limit to in scope of IfUser in your proftpd.conf:
    <IfUser dave>
        <Limit LOGIN>
          AllowClass friends
          DenyAll
        </Limit>
      </IfUser>
  4. Restart proftpd

References

  1. http://www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-Limit.html
  2. http://www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-Classes.html
proftpd user-based Access Control

Leave a Reply

Your email address will not be published. Required fields are marked *