Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running Debian Wheezy, with ISPConfig 3, plus ModSecurity and I would like to restrict access to ftp to specific IP(s) globally (not to specific ftp users only), that can be either or one I would manually add later. I would also like to completely disable ftp access from the web, but allow only from ftp-client software (if that is possible).

The idea of closing firewall ports is not what I want. I know I can do this setting some firewall rule though, but that is not what I currently need. I have managed to do this for example on phpmyadmin inside it's .conf file, but unfortunately I cannot find any configuration to alter for pure-ftpd in my system.

Restricting web-ftp access maybe possible by adding some rule in apache2 conf, but I am not sure how to write such a rule.

Thanks to everyone that can help cheers

share|improve this question

PureFTPD doesn't use .conf files by default, instead you specify options or switches at launch. You can however get it to parse a file, information on the PureFTPD site here;

There's a sample conf file in the Github repo;

I think you want to use the


command in the config, more info here;

So you'd do something like;

<Limit LOGIN>
Order Allow,Deny
Allow from, [etc]
Deny from all

That would deny all clients except those in the allow list.

share|improve this answer
thanks for your reply and information, the limit LOGIN though will deny login, what I want to do is return forbidden to ANY connection except the IP(s) specified, not only logins. Thanks. – durduvakis Nov 4 '13 at 16:13
I would have thought a Firewall would be your only option after looking at the PureFTPd documentation - perhaps UFW? ( – sgtbeano Nov 4 '13 at 16:15
thanks for your help, ispconfig3 uses bastille and additionally I use mod_security and maybe in any of the 2 I can set some rule to do this if there is no other solution through a configuration file. I am currently checking the github conf file for such a thing. – durduvakis Nov 4 '13 at 16:21
creating a /etc/pure-ftpd.conf is very interesting but unfortunately my system does not have or in order to run those commands described in the README.Configuration-File you gave me. – durduvakis Nov 4 '13 at 16:31
Just clone them from the Github repo and then use them – sgtbeano Nov 4 '13 at 16:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.