1

Simple question: i want to load two modules

/usr/sbin/modprobe ip_nat_ftp 
/usr/sbin/modprobe ip_conntrack_ftp

I can put those lines in rc.local or use /etc/sysconfig/iptables-config But at reboot firewalld overwrite my choices and doesn't load modules Question : how to instructe firewalld to load those two modules?

0

1 Answer 1

3

Centos 7 uses systemd, so files named *.conf in /etc/modules-load.d/ can be used to configure which kernel modules are loaded at boot.

e.g.

echo ip_nat_ftp > /etc/modules-load.d/iptables.conf
echo ip_conntrack_ftp >> /etc/modules-load.d/iptables.conf

You can specify any options for those modules or blacklist unwanted modules using the usual /etc/modprobe.d/*.conf method.

See man 5 modules-load.d, man 5 modprobe.d and man 8 systemd-modules-load.service for more details.


PS: in debian and derivatives, you can just list them one-per-line in /etc/modules. /etc/modprobe.d/*.conf is also used to specify module options and blacklisting.

1
  • I like this solution,i try after a reload of firewall zone
    – elbarna
    Nov 1, 2015 at 1:29

Not the answer you're looking for? Browse other questions tagged .