CSF getting modprobe errors

When restarting CSF you get errors similar to below:

FATAL: Could not load /lib/modules/4.15.17-2-pve/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/4.15.17-2-pve/modules.dep: No such file or directory
ACCEPT all opt -- in !lo out * 0.0.0.0/0 -> 0.0.0.0/0 ctstate RELATED,ESTABLISHED
FATAL: Could not load /lib/modules/4.15.17-2-pve/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/4.15.17-2-pve/modules.dep: No such file or directory

After running yum update it still does the same.

Running cstest.pl you get the below:

Testing ip_tables/iptable_filter...OK
Testing ipt_LOG...OK
Testing ipt_multiport/xt_multiport...FAILED [FATAL Error: FATAL: Could not load /lib/modules/4.15.17-2-pve/modules.dep: No such file or directory] - Required for csf to function
Testing ipt_REJECT...OK
Testing ipt_state/xt_state...OK
Testing ipt_limit/xt_limit...OK
Testing ipt_recent...OK
Testing xt_connlimit...FAILED [Error: iptables: Protocol wrong type for socket.] - Required for CONNLIMIT feature
Testing ipt_owner/xt_owner...FAILED [Error: FATAL: Could not load /lib/modules/4.15.17-2-pve/modules.dep: No such file or directory] - Required for SMTP_BLOCK and UID/GID blocking features
Testing iptable_nat/ipt_REDIRECT...OK
Testing iptable_nat/ipt_DNAT...OK

Host has all of it loaded but errors still persist.

This means that IPtables is still on an older version.

Reinstall or upgrade it using the following:

# compile iptables from source and install to /usr/local
mkdir -p /tmp/iptables
wget "http://www.netfilter.org/projects/iptables/files/iptables-1.4.21.tar.bz2" -qO- | tar --strip-components=1 -C /tmp/iptables -xvj
cd /tmp/iptables
./configure
make
make install

# set alternatives
sudo alternatives --install /sbin/iptables iptables.x86_64 /usr/local/sbin/iptables 100 \
--slave /bin/iptables-xml bin-iptables-xml.x86_64 /usr/local/bin/iptables-xml \
--slave /sbin/iptables-multi sbin-iptables-multi.x86_64 /usr/local/sbin/iptables-multi \
--slave /sbin/iptables-restore sbin-iptables-restore.x86_64 /usr/local/sbin/iptables-restore \
--slave /sbin/iptables-save sbin-iptables-save.x86_64 /usr/local/sbin/iptables-save \
--slave /usr/share/man/man8/iptables-restore.8.gz man-iptables-restore.x86_64 /usr/local/share/man/man8/iptables-restore.8.gz \
--slave /usr/share/man/man8/iptables-save.8.gz man-iptables-save.x86_64 /usr/share/man/man8/iptables-save.8.gz \
--slave /usr/share/man/man8/iptables-xml.8.gz man-iptables-xml.x86_64 /usr/share/man/man8/iptables-xml.8.gz \
--slave /usr/share/man/man8/iptables.8.gz man-iptables.x86_64 /usr/share/man/man8/iptables.8.gz

sudo alternatives --set iptables.x86_64 /usr/local/sbin/iptables

sudo alternatives --install /sbin/ip6tables ip6tables.x86_64 /usr/local/sbin/ip6tables 100 \
--slave /sbin/ip6tables-multi sbin-ip6tables-multi.x86_64 /usr/local/sbin/ip6tables-multi \
--slave /sbin/ip6tables-restore sbin-ip6tables-restore.x86_64 /usr/localsbin/ip6tables-restore \
--slave /sbin/ip6tables-save sbin-ip6tables-save.x86_64 /usr/local/sbin/ip6tables-save \
--slave /usr/share/man/man8/ip6tables-restore.8.gz man-ip6tables-restore.x86_64 /usr/local/share/man/man8/ip6tables-restore.8.gz \
--slave /usr/share/man/man8/ip6tables-save.8.gz man-ip6tables-save.x86_64 /usr/local/share/man/man8/ip6tables-save.8.gz \
--slave /usr/share/man/man8/ip6tables.8.gz man-ip6tables.x86_64 /usr/local/share/man/man8/ip6tables.8.gz

sudo alternatives --set ip6tables.x86_64 /usr/local/sbin/ip6tables

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Migrating/Restoring large cPanel domain from shared hosting account to your VPS server

cPanel facilitates you to restore full domain including email accounts, MySQL databases, database...

Basic Linux Commands

Below is a brief guide for basic usage of a Linux shell (command line). Once you've mastered the...

Basic iptables usage

Iptables is a program that allows you to configure Linux's built-in firewall. By default, no...

Installing CSF (ConfigServer Firewall) on a server

This guide will walk you through installing CSF on a VPS/Dedicated server. Preparing the server...

How to SSH into your VPS

After receiving your VPS login details, the first thing you'll want to do is log in to the VPS....