Repository navigation
A note about FTP Connection Issues
Home · Start Here · Reference Map
- FTP behind stateful firewalls works best in passive (PASV) mode.
- If FTP conntrack helpers are unavailable, you must define an explicit passive port range.
- FTP over TLS can break helper-based tracking, so passive range design becomes critical.
Related guide: Troubleshooting-and-Recovery
FTP uses separate control and data channels. Stateful firewalls typically rely on conntrack helpers to understand and permit related data flows.
On some kernels/environments (especially certain VPS/monolithic setups), FTP helper modules may be missing or restricted, which can break passive transfers unless you open an explicit passive range.
- Configure FTP clients to use PASV mode.
- Define a dedicated passive range in your FTP daemon.
- Open the same range in CSF (
TCP_IN). - Reload CSF and restart FTP service.
Set matching passive ports in daemon config:
# /etc/pure-ftpd.conf
PassivePortRange 30000 35000
Allow same range in CSF:
TCP_IN = "...,30000:35000,..."Apply changes:
csf -ra
systemctl restart pure-ftpd 2>/dev/null || service pure-ftpd restartSet passive ports:
# /etc/proftpd.conf
PassivePorts 30000 35000
Allow same range in CSF and reload:
csf -ra
systemctl restart proftpd 2>/dev/null || service proftpd restartWith FTPS (encrypted control channel), helper-based relation tracking may not be able to inspect control instructions that negotiate data ports.
Result: data channel setup can fail unless you explicitly open and align passive ranges in both CSF and FTP daemon config.
- Test directory listing and file transfer from an external FTP client in PASV mode.
- Confirm passive ports are reachable and mapped correctly.
- Review FTP daemon logs and
/var/log/lfd.logfor blocked flow clues.
- Mismatched ranges between CSF and daemon config.
- Passive range too broad without need.
- Assuming helper modules exist on all kernels/providers.
- Enabling FTPS without passive-range planning.
Last reviewed: 2026-02-25
← Previous: Installation on a Generic Linux Server · Next: Messenger Service
- Security Features Guide
- Cloud & Container Hardening
- Automation & IaC
- IPv6 Deployment & Hardening
- IP Block Lists
- Reference Map
- Introduction
- csf Principles
- lfd Principles
- csf CLI Options
- lfd CLI Options
- Login Tracking
- Regex Custom Cookbook
- Script Email Alerts
- Process Tracking
- Directory Watching
- Advanced Filters
- Multiple Ethernet
- Generic Linux
- FTP Issues
- Messenger Service
- Block Reporting
- Port Flood
- Pre/Post Scripts
- Port Knocking
- Connection Limit
- Port/IP Redirect
- Integrated UI
- RESTRICT_SYSLOG
- Exim SMTP AUTH
- UI Skinning
- InterWorx
- CentOS Web Panel