ProFTPD 选项:如何调试

ProFTPD 选项:如何调试

在 Red Hat Enterprise Linux Server 版本 7.6 (Maipo) 中,我想使用模块 mod_ban 来设置 ClientConnectRate 事件。服务启动方式如下:systemctl start proftpd

服务配置如下:

[root@lclftpcrb001blq ~]# cat /usr/lib/systemd/system/proftpd.service
[Unit]
Description = ProFTPD FTP Server
After = network.target nss-lookup.target local-fs.target remote-fs.target

[Service]
Type = forking
PIDFile = /run/proftpd/proftpd.pid
Environment = PROFTPD_OPTIONS=
EnvironmentFile = -/etc/sysconfig/proftpd
ExecStart = /usr/sbin/proftpd $PROFTPD_OPTIONS
ExecReload = /bin/kill -HUP $MAINPID

[Install]
WantedBy = multi-user.target

因此,除了在 /etc/proftpd.conf 中配置此代码之外:

<IfDefine DYNAMIC_BAN_LISTS>
  BanEngine     on
  BanLog        /var/log/proftpd/ban.log
  BanTable      /var/run/proftpd/ban.tab
  BanOnEvent  ClientConnectRate   10/00:10:00 00:15:00 "Stop connecting frequently"
  BanMessage                    "Host %a has been banned"
  BanControlsACLs               all allow user ftpadm
</IfDefine>

我也有 /etc/sysconfig/proftpd:

PROFTPD_OPTIONS="-DDYNAMIC_BAN_LISTS"

尽管配置如此,但当我启动服务时,调试告诉我:

proftpd[29035]: <IfDefine>: skipping 'DYNAMIC_BAN_LISTS' section at line 85

据我了解,如果 DYNAMIC_BAN_LISTS 存在于 /etc/sysconfig/proftpd 中,则会加载 IfDefine 块。所以我唯一能想到的是,由于某种原因,它没有从 /etc/sysconfig/proftpd 中检索选项...

我该如何检查这一点?

谢谢!

相关内容