Learn about Centmin Mod LEMP Stack today
Become a Member

Stable Branch fix PUREFTPD_DISABLED CSF port/PORTFLOOD handling + duplicate-port ac…

Discussion in 'Centmin Mod Github Commits' started by eva2000, May 31, 2026 at 2:24 PM.

  1. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    12:09 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    fix PUREFTPD_DISABLED CSF port/PORTFLOOD handling + duplicate-port accumulation in 132.00stable

    Make CSF firewall FTP port handling honor PUREFTPD_DISABLED and stop
    duplicate non-FTP ports accumulating in csf.conf TCP_IN/TCP6_IN.

    Changes:
    - tools/fix-csf-ftp-ports.sh: rewrite as an idempotent per-line normalizer for
    TCP_IN/TCP6_IN; self-source custom_config.inc; only add the pure-ftpd passive
    range 30001:50011 when pure-ftpd is not disabled, and only remove it (and stock
    port 21, when no FTP daemon is present) when pure-ftpd is disabled and not
    running; back up and reload CSF only when a line actually changes; also clear
    the FTP PORTFLOOD rule when disabled
    - inc/csfinstall.inc: only append 30001:50011 to TCP_IN/TCP6_IN at install when
    pure-ftpd is not disabled (misc ports always added)
    - inc/cpcheck.inc: pureftpdupdates() reads PUREFTPD_DISABLED from persisted config
    and returns early when disabled
    - inc/centminfinish.inc: remove the FTP PORTFLOOD rule when disabling pure-ftpd
    - inc/pureftpd.inc: only set the FTP PORTFLOOD rule when pure-ftpd is not disabled
    - inc/nginx_addvhost.inc, inc/wpsetup.inc, inc/wpsetup-fastcgi-cache.inc: skip
    pureftpinstall when pure-ftpd is disabled so adding a vhost no longer re-enables
    the service
    - addons/acmetool.sh: omit the nv -u argument when pure-ftpd is disabled and adjust
    vhost setup status messages accordingly

    Continue reading...

    132.00stable branch