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
- Install mod_ifsession.
- Define a Class in your proftpd.conf:
<Class friends> From 1.2.3.4/8 </Class>
- Use Limit to in scope of IfUser in your proftpd.conf:
<IfUser dave> <Limit LOGIN> AllowClass friends DenyAll </Limit> </IfUser>
- Restart proftpd
References
- http://www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-Limit.html
- http://www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-Classes.html
proftpd user-based Access Control