Re: [Proftpd-user] ftpdctl ban user is not permanent

David Mathog <[email protected]>
Newsgroups gmane.network.proftpd.user
Message-ID <[email protected]>
On 2019-10-31 12:08, David Mathog wrote:
> cat >/etc/systemd/system/proftpd_ban.service <<'EOD'
> [Unit]
> Description=Ban certain users from connecting to proftpd
> After=proftpd.target
> StartLimitIntervalSec=0[Service]
> 
> [Service]
> Type=simple
> Restart=always
> RestartSec=1
> User=root
> ExecStart=/usr/local/bin/proftpd_bans.sh
> 
> [Install]
> WantedBy=multi-user.target
> EOD

Oops.  Also add

    RemainAfterExit=true

at the end of the [Service] group.  Otherwise systemctl thinks this 
service has exited once the bans are set
and keeps re-starting it at ~1 minute intervals.

The ban did a great job of clearing out logs of the probes against 
usernames from my log files, but then systemctl replaced them with its 
own messages until I figured out why it kept re-running the ban script.

Regards,

David Mathog
[email protected]
Manager, Sequence Analysis Facility, Biology Division, Caltech


_______________________________________________
ProFTPD Users List   <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.