Coolest Guides on the Planet

coolest guides on the planet

Coolest Guides On The Planet

  • Home
  • macOS
  • WebDev
  • All Posts
  • Contact

FTP/TLS or FTP/SSL not working on VPS with CSF Firewall

September 7, 2011 2 Comments

CSF is a great opensource firewall to use instead of raw IP tables and it includes a WHM add on module for cPanel servers, but getting FTP/TLS or FTP/SSL to run successfully needs a couple of tweaks.

FTP works fine over Port 21 but is not considered that secure.

To get FTP/TLS SSL working you need to open up some more higher numbered ports so FTP can connect, in WHM go to CSF>Firewall Configuration> and allow TCP_In 30000:50000 and TCP_Out 30000:50000 – restart the firewall.

ftp-csf-allow-ports-open

Then you need to edit your ftp server to use these passive ports, so it’s either pure or pro, edit the conf file:

/etc/pure-ftpd.conf

Uncomment the line below:

# Port range for passive connections replies. - for firewalling.
PassivePortRange          30000 50000

Restart the FTP Server and all should be ok, make sure that the port range in both the TCP_IN and range in the ftp config are the same.

If the FTP service is still not right it may be that some iptable modules need to be loaded, these are what are iptables are needed for CSF to function:

  • ip_tables
  • ipt_state
  • ipt_multiport
  • iptable_filter
  • ipt_limit
  • ipt_LOG
  • ipt_REJECT
  • ipt_conntrack
  • ip_conntrack
  • ip_conntrack_ftp
  • iptable_mangle

You can check what IP Table modules are loaded in the command line with:

cat /proc/net/ip_tables_matches
One of the issues with some shared hosting including VPS packages is that not all these modules are loaded such as ‘conntrack’, if this is the case for you then you are stuck with insecure FTP over 21 or you could use SFTP over 22.
Refs – CSF & Parallels Virtuozzo

Cats: WebRoot

Tags

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls

Donate a Beer to the Coolest Guides

Get Beaver Builder Now!

Discuss

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls
Get DesktopServer

Lynda

Lynda.com Online Training Videos

TreeHouse

smlinks

Learn WordPress
osx-modify-shell-path

How to Add to the Shell Path in macOS Big Sur and Catalina using Terminal

October 19, 2019

virtual-hosts osx 10.10 yosemite

Set up Virtual Hosts on macOS Catalina 10.15 in Apache

October 19, 2019

Installing Homebrew on macOS Catalina 10.15, Package Manager for Linux Apps

October 18, 2019

Where is the bash shell in macos Catalina?

October 12, 2019

Refine your search

  • All
  • Modules
  • Themes
  • Documentation
  • Forums & Issues
  • Groups

RSS ars technica

  • Spotify seizes the day after Apple is forced to allow external payments
  • Apple and Meta furious at EU over fines totaling €700 million
  • After market tumult, Trump exempts smartphones from massive new tariffs
  • Apple silent as Trump promises “impossible” US-made iPhones
  • Apple enables RCS messaging for Google Fi subscribers at last

RSS mac surfer

  • Tot is new text editor for Mac, iPhone, and iPad focused on constraints and ease of use
  • TiPbITS: Google Drive Sorting Can Hide New Documents
  • How to take a screenshot on a MacBook Pro
  • How To Create Simple Animation With Mac Keynote
  • Last Week on My Mac: Virus pandemics

Donate

Copyright © 2025· Neil Gee - All Rights Reserved - Hosted by Runcloud

Copyright © 2025 · gee on Genesis Framework · WordPress · Log in