How to make modprobe nf_conntrack_ftp persist a reboot on CentOS 7 and firewalld?

I’m stumped. I’ve seen the related questions about editing /etc/sysconfig/iptables-config, but I’m running CentOS 7 (and webmin/virtualmin), which uses firewalld instead of iptables.

How do I get modprobe nf_conntrack_ftp to persist after a reboot? I tried setting up a cron on reboot to issue the command, but that didn’t work (and is probably the wrong way to go about it anyway).

Right now after every reboot I have to login and type in the command manually in order to get FTP connections to work correctly.


Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

In /etc/modules-load.d, add a file {filename}.conf. That file should have the following contents:


Do the following for more info:

man modules-load.d

Here’s the doc for RHEL7:

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply