Skip to content

Troubleshooting › Dependencies

This page provides an overview of common dependency-related errors and issues that may occur during the installation or use of ConfigServer Firewall.


Introduction

By default, when ConfigServer Firewall starts, it automatically checks that the following dependencies are installed on your system:

my @binaries = (
    "IPTABLES",
    "IPTABLES_SAVE",
    "IPTABLES_RESTORE",
    "MODPROBE",
    "SENDMAIL",
    "PS",
    "VMSTAT",
    "LS",
    "MD5SUM",
    "TAR",
    "CHATTR",
    "UNZIP",
    "GUNZIP",
    "DD",
    "TAIL",
    "GREP",
    "HOST"
);


Note: Sendmail Binary

The dependency SENDMAIL will be skipped if you have the setting LF_ALERT_SMTP enabled in your /etc/csf/csf.conf.


If you enable the setting IPV6 in your /etc/csf/csf.conf, the following dependencies will be loaded:

  • IP6TABLES
  • IP6TABLES_SAVE
  • IP6TABLES_RESTORE


If you he enable the setting LF_IPSET in your /etc/csf/csf.conf, the following dependencies will be loaded:

  • IPSET


If you enable the settings IP or IFCONFIG in your /etc/csf/csf.conf, the following dependencies will be loaded:

  • IP
  • IFCONFIG


If you set ST_ENABLE = "1" in your /etc/csf/csf.conf, the following dependencies will be loaded:

  • GD::Graph

    sudo apt-get update && sudo apt-get install -y \
      libgd-dev \
      libgd-graph-perl
    
    sudo yum makecache && sudo yum install -y \
      gd-devel \
      perl-GDGraph
    


If you set CF_ENABLE = "1" in your /etc/csf/csf.conf, the following dependencies will be loaded:

  • LWP::Protocol::https

    sudo apt-get update && sudo apt-get install -y \
      libwww-perl \
      liblwp-protocol-https-perl \
      libnet-ssleay-perl \
      libio-socket-ssl-perl
    
    sudo yum makecache && sudo yum install -y \
      perl-libwww-perl \
      perl-LWP-Protocol-https \
      perl-Net-SSLeay \
      perl-IO-Socket-SSL
    


Most dependencies are automatically installed with the majority of Linux distributions. However, certain packages, such as sendmail, may require manual installation. The exact requirements can vary depending on the type of installation performed for your distribution. For example, a "Minimal" installation of AlmaLinux includes only the core system components and does not install additional dependencies.




Troubleshooting

The following is a list of common errors or issues you may possibility receive while installing or operating CSF. These are to guide you on how to fix these issues.

Perl Dependencies: Using Minimal Distro Releases

If you are running a light-weight distro such as AlmaLinux (Minimal), your distro may include a copy of Perl, but may not have many of the core modules required for a program written in perl to function.

You can run the commands listed on this page to install the required dependencies, or you can install perl-core with one of the following commands:

Use the following to install Perl and its main dependencies on:

  • Debian
  • Ubuntu
  • Mint
  • Pop!
  • Elementary
sudo apt-get update && sudo apt-get install -y \
  perl perl-modules \
  perl-base \
  libwww-perl \
  liblwp-protocol-https

Use the following to install Perl and its main dependencies on:

  • RHEL
  • CentOS
  • AlmaLinux
  • Rocky
  • Fedora
sudo yum makecache && sudo yum install perl \
  perl-core \
  perl-libwww-perl \
  perl-LWP-Protocol-https \
  perl-URI
URLGET set to use LWP but perl module is not installed, reverting to HTTP::Tiny

Problem

When accessing the Web Interface, the following error may appear at the top of the page:

*WARNING* URLGET set to use LWP but perl module is not installed, fallback to using CURL/WGET

CSF Web Interface › Perl GETURL Dependency Error
CSF Web Interface › Perl GETURL Dependency Error


This error triggers when your workstation has not satisfied all of the perl dependencies required for CSF to run.


Solution

Open your workstation's terminal, and run one of the following commands:

sudo apt-get update && sudo apt-get install -y \
  libwww-perl
sudo yum makecache && sudo yum install -y \
  perl-libwww-perl
Can't locate lib.pm in @INC

Problem

Can't locate lib.pm in @INC (you may need to install the lib module)
    (@INC contains:   /usr/local/lib64/perl5/5.32
                      /usr/local/share/perl5/5.32
                      /usr/lib64/perl5/vendor_perl
                      /usr/share/perl5/vendor_perl
                      /usr/lib64/perl5
                      /usr/share/perl5) at /usr/sbin/csf line 30.

BEGIN failed--compilation aborted at /usr/sbin/csf line 30.

CSF Web Interface › Perl lib.pm Error
CSF Web Interface › Perl lib.pm Error


This error typically indicates that you are missing major parts of the perl infastructure.


Solution

Open your workstation's terminal, and run one of the following commands:

sudo apt-get update && sudo apt-get install -y \
  perl-modules-5.32 \
  build-essential \
  autoconf \
  automake \
  libtool \
  linux-headers-$(uname -r)
sudo yum makecache && sudo yum install -y \
  perl \
  perl-core \
  perl-devel \
  perl-lib \
  perl-CPAN \
  gcc \
  make \
  autoconf \
  automake \
  libtool \
  glibc-headers \
  kernel-headers


You can confirm if the packages installed above work by opening your terminal and running the command:

perl -Mlib -e 'print "lib.pm OK\n"'


You will get one of the following two possible outputs:

$ perl -Mlib -e 'print "lib.pm OK\n"'

lib.pm OK
$ perl -Mlib -e 'print "lib.pm OK\n"'

Can't locate lib.pm in @INC (you may need to install the lib module)
    (@INC contains:   /usr/local/lib64/perl5/5.32
                      /usr/local/share/perl5/5.32
                      /usr/lib64/perl5/vendor_perl
                      /usr/share/perl5/vendor_perl
                      /usr/lib64/perl5
                      /usr/share/perl5).

BEGIN failed--compilation aborted.


If you get the output lib.pm OK, the perl module should now be functioning properly.

Can't locate LWP/UserAgent.pm in @INC

Problem

Can't locate LWP/UserAgent.pm in @INC (you may need to install the LWP::UserAgent module)
    (@INC contains:   /usr/local/test/lib
                      /usr/local/cpanel
                      /usr/local/lib64/perl5/5.32
                      /usr/local/share/perl5/5.32
                      /usr/lib64/perl5/vendor_perl
                      /usr/share/perl5/vendor_perl
                      /usr/lib64/perl5
                      /usr/share/perl5) at /usr/local/csf/lib/ConfigServer/CloudFlare.pm line 36.

BEGIN failed--compilation aborted at /usr/local/csf/lib/ConfigServer/CloudFlare.pm line 36.

CSF Web Interface › Perl LWP/UserAgent.pm Error
CSF Web Interface › Perl LWP/UserAgent.pm Error


This error can be triggered from any of the following actions:

  • Accessing CSF Web Interface
    • Using the Cloudflare module.
    • Performing an update to CSF.
  • In terminal when running sudo csf -ra


Solution

Open your workstation's terminal, and run one of the following commands:

sudo apt-get update && sudo apt-get install -y \
  libwww-perl \
  liblwp-protocol-https-perl
sudo yum makecache && sudo yum install -y \
  perl-libwww-perl \
  perl-LWP-Protocol-https


You can confirm if the packages installed above work by opening your terminal and running the command:

perl -MLWP::UserAgent -e 'print "LWP OK\n"'


You will get one of the following two possible outputs:

$ perl -MLWP::UserAgent -e 'print "LWP OK\n"'

LWP OK
$ perl -MLWP::UserAgent -e 'print "LWP OK\n"'

Can't locate LWP/UserAgent.pm in @INC (you may need to install the LWP::UserAgent module)
  (@INC contains:   /usr/local/lib64/perl5/5.32
                    /usr/local/share/perl5/5.32
                    /usr/lib64/perl5/vendor_perl
                    /usr/share/perl5/vendor_perl
                    /usr/lib64/perl5
                    /usr/share/perl5).
  BEGIN failed--compilation aborted.


If you get the output LWP OK, the perl module should now be functioning properly.

Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)

Problem

Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)

Can't locate LWP/Protocol/https.pm in @INC (you may need to install the LWP::Protocol::https module)
    (@INC contains:   /usr/local/lib64/perl5/5.32
                      /usr/local/share/perl5/5.32
                      /usr/lib64/perl5/vendor_perl
                      /usr/share/perl5/vendor_perl
                      /usr/lib64/perl5 /usr/share/perl5).

BEGIN failed--compilation aborted.

CSF Web Interface › Perl LWP::Protocol::https Error
CSF Web Interface › Perl LWP::Protocol::https Error


This error can be triggered from any of the following actions:

  • Accessing CSF Web Interface
    • Using the Cloudflare module.
    • Performing an update to CSF.
  • In terminal when running sudo csf -ra


Solution

Open your workstation's terminal, and run one of the following commands:

sudo apt-get update && sudo apt-get install -y \
  libwww-perl \
  liblwp-protocol-https-perl \
  libnet-ssleay-perl \
  libio-socket-ssl-perl
sudo yum makecache && sudo yum install -y \
  perl-libwww-perl \
  perl-LWP-Protocol-https \
  perl-Net-SSLeay \
  perl-IO-Socket-SSL


You can confirm if the packages installed above work by opening your terminal and running the command:

perl -MLWP::Protocol::https -e 'print "HTTPS OK\n"'


You will get one of the following two possible outputs:

$ perl -MLWP::Protocol::https -e 'print "HTTPS OK\n"'

HTTPS OK
$ perl -MLWP::Protocol::https -e 'print "HTTPS OK\n"'

Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)


If you get the output HTTPS OK, the perl module should now be functioning properly.

Binary location for [SENDMAIL] [/usr/sbin/sendmail] in /etc/csf/csf.conf is either incorrect, is not installed or is not executable

Problem

When starting up CSF, you may receive the following error in your terminal related to SENDMAIL:

*WARNING* Binary location for [SENDMAIL] [/usr/sbin/sendmail] in /etc/csf/csf.conf is either incorrect, is not installed or is not executable


This error triggers when you do not have the binary SENDMAIL installed, and nothing defined for the setting LF_ALERT_SMTP in your /etc/csf/csf.conf.


Solution

Open your workstation's terminal, and run one of the following commands:

sudo apt-get update && sudo apt-get install -y \
  sendmail
sudo yum makecache && sudo yum install -y \
  sendmail sendmail-cf

sudo systemctl enable --now sendmail


Refresh the CSF web interface and the error should be gone.

Browser: Secure Connection Failed

Problem

Some users may attempt to access the CSF web interface, and will be given the following error:

Secure Connection Failed

The connection to the server was reset while the page was loading.
    The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
    Please contact the website owners to inform them of this problem.

CSF Web Interface › Perl Secure Connection Failed Error
CSF Web Interface › Perl Secure Connection Failed Error


This error triggers when you do not have the package perl-Net-SSLeay installed.


Solution

Open your workstation's terminal, and run one of the following commands:

sudo apt-get update && sudo apt-get install -y \
  perl-Net-SSLeay
sudo yum makecache && sudo yum install -y \
  perl-Net-SSLeay


Refresh the CSF web interface and the error should be gone.