Page 1 of 1

Missing init.d start/stop scipts for csf & lfd

Posted: 07 Jan 2016, 17:55
by Wilfy
Hello All,

I have just completed my second installation of csf and this time I have a problem; The installation looks like it went ok however the /etc/init.d csf/lfd start/stop scripts are not present, any (constructive) suggestions please?
Installation log below...

Code: Select all

root@srv:~/csf/csf# sh install.sh

Selecting installer...

Running csf generic installer

Installing generic csf and lfd

Check we're running as root

Checking Perl modules...mode of 'os.pl' retained as 0700 (rwx------)
Configuration modified for Debian/Ubuntu/Gentoo settings /etc/csf/csf.conf
ok

mkdir: created directory '/etc/csf'
mkdir: created directory '/var/lib/csf'
mkdir: created directory '/var/lib/csf/backup'
mkdir: created directory '/var/lib/csf/Geo'
mkdir: created directory '/var/lib/csf/ui'
mkdir: created directory '/var/lib/csf/stats'
mkdir: created directory '/var/lib/csf/lock'
mkdir: created directory '/var/lib/csf/webmin'
mkdir: created directory '/var/lib/csf/zone'
mkdir: created directory '/usr/local/csf'
mkdir: created directory '/usr/local/csf/bin'
mkdir: created directory '/usr/local/csf/lib'
mkdir: created directory '/usr/local/csf/tpl'
'csf.generic.conf' -> '/etc/csf/csf.conf'
'csf.allow' -> '/etc/csf/./csf.allow'
'csf.deny' -> '/etc/csf/./csf.deny'
'csf.redirect' -> '/etc/csf/./csf.redirect'
'csf.resellers' -> '/etc/csf/./csf.resellers'
'csf.dirwatch' -> '/etc/csf/./csf.dirwatch'
'csf.syslogs' -> '/etc/csf/./csf.syslogs'
'csf.logfiles' -> '/etc/csf/./csf.logfiles'
'csf.logignore' -> '/etc/csf/./csf.logignore'
'csf.blocklists' -> '/etc/csf/./csf.blocklists'
'csf.ignore' -> '/etc/csf/./csf.ignore'
'csf.generic.pignore' -> '/etc/csf/csf.pignore'
'csf.rignore' -> '/etc/csf/./csf.rignore'
'csf.fignore' -> '/etc/csf/./csf.fignore'
'csf.signore' -> '/etc/csf/./csf.signore'
'csf.suignore' -> '/etc/csf/./csf.suignore'
'csf.uidignore' -> '/etc/csf/./csf.uidignore'
'csf.mignore' -> '/etc/csf/./csf.mignore'
'csf.sips' -> '/etc/csf/./csf.sips'
'csf.dyndns' -> '/etc/csf/./csf.dyndns'
'csf.syslogusers' -> '/etc/csf/./csf.syslogusers'
'csf.smtpauth' -> '/etc/csf/./csf.smtpauth'
'csf.rblconf' -> '/etc/csf/./csf.rblconf'
'alert.txt' -> '/usr/local/csf/tpl/./alert.txt'
'reselleralert.txt' -> '/usr/local/csf/tpl/./reselleralert.txt'
'logalert.txt' -> '/usr/local/csf/tpl/./logalert.txt'
'logfloodalert.txt' -> '/usr/local/csf/tpl/./logfloodalert.txt'
'syslogalert.txt' -> '/usr/local/csf/tpl/./syslogalert.txt'
'integrityalert.txt' -> '/usr/local/csf/tpl/./integrityalert.txt'
'exploitalert.txt' -> '/usr/local/csf/tpl/./exploitalert.txt'
'queuealert.txt' -> '/usr/local/csf/tpl/./queuealert.txt'
'tracking.txt' -> '/usr/local/csf/tpl/./tracking.txt'
'connectiontracking.txt' -> '/usr/local/csf/tpl/./connectiontracking.txt'
'processtracking.txt' -> '/usr/local/csf/tpl/./processtracking.txt'
'accounttracking.txt' -> '/usr/local/csf/tpl/./accounttracking.txt'
'usertracking.txt' -> '/usr/local/csf/tpl/./usertracking.txt'
'sshalert.txt' -> '/usr/local/csf/tpl/./sshalert.txt'
'webminalert.txt' -> '/usr/local/csf/tpl/./webminalert.txt'
'sualert.txt' -> '/usr/local/csf/tpl/./sualert.txt'
'consolealert.txt' -> '/usr/local/csf/tpl/./consolealert.txt'
'uialert.txt' -> '/usr/local/csf/tpl/./uialert.txt'
'cpanelalert.txt' -> '/usr/local/csf/tpl/./cpanelalert.txt'
'scriptalert.txt' -> '/usr/local/csf/tpl/./scriptalert.txt'
'relayalert.txt' -> '/usr/local/csf/tpl/./relayalert.txt'
'filealert.txt' -> '/usr/local/csf/tpl/./filealert.txt'
'watchalert.txt' -> '/usr/local/csf/tpl/./watchalert.txt'
'loadalert.txt' -> '/usr/local/csf/tpl/./loadalert.txt'
'resalert.txt' -> '/usr/local/csf/tpl/./resalert.txt'
'portscan.txt' -> '/usr/local/csf/tpl/./portscan.txt'
'uidscan.txt' -> '/usr/local/csf/tpl/./uidscan.txt'
'permblock.txt' -> '/usr/local/csf/tpl/./permblock.txt'
'netblock.txt' -> '/usr/local/csf/tpl/./netblock.txt'
'portknocking.txt' -> '/usr/local/csf/tpl/./portknocking.txt'
'forkbombalert.txt' -> '/usr/local/csf/tpl/./forkbombalert.txt'
'x-arf.txt' -> '/usr/local/csf/tpl/./x-arf.txt'
'regex.custom.pm' -> '/usr/local/csf/bin/./regex.custom.pm'
'pt_deleted_action.pl' -> '/usr/local/csf/bin/./pt_deleted_action.pl'
'messenger' -> '/etc/csf/./messenger'
'messenger/csf_small.png' -> '/etc/csf/./messenger/csf_small.png'
'messenger/index.html' -> '/etc/csf/./messenger/index.html'
'messenger/index.text' -> '/etc/csf/./messenger/index.text'
'ui' -> '/etc/csf/./ui'
'ui/server.crt' -> '/etc/csf/./ui/server.crt'
'ui/ui.allow' -> '/etc/csf/./ui/ui.allow'
'ui/ui.ban' -> '/etc/csf/./ui/ui.ban'
'ui/images' -> '/etc/csf/./ui/images'
'ui/images/cxs.png' -> '/etc/csf/./ui/images/cxs.png'
'ui/images/ip.png' -> '/etc/csf/./ui/images/ip.png'
'ui/images/viewdelivery.png' -> '/etc/csf/./ui/images/viewdelivery.png'
'ui/images/icon.gif' -> '/etc/csf/./ui/images/icon.gif'
'ui/images/plus.png' -> '/etc/csf/./ui/images/plus.png'
'ui/images/cxs-loader.gif' -> '/etc/csf/./ui/images/cxs-loader.gif'
'ui/images/perm.png' -> '/etc/csf/./ui/images/perm.png'
'ui/images/deliver.png' -> '/etc/csf/./ui/images/deliver.png'
'ui/images/csf_small.png' -> '/etc/csf/./ui/images/csf_small.png'
'ui/images/minus.png' -> '/etc/csf/./ui/images/minus.png'
'ui/images/LICENSE.txt' -> '/etc/csf/./ui/images/LICENSE.txt'
'ui/images/delete.png' -> '/etc/csf/./ui/images/delete.png'
'ui/images/cxs_small.png' -> '/etc/csf/./ui/images/cxs_small.png'
'ui/images/csf-loader.gif' -> '/etc/csf/./ui/images/csf-loader.gif'
'ui/images/cse_small.png' -> '/etc/csf/./ui/images/cse_small.png'
'ui/server.key' -> '/etc/csf/./ui/server.key'
'lfd.logrotate' -> '/etc/logrotate.d/lfd'
'csfcron.sh' -> '/etc/cron.d/csf-cron'
'lfdcron.sh' -> '/etc/cron.d/lfd-cron'
'csf.pl' -> '/usr/sbin/csf'
'lfd.pl' -> '/usr/sbin/lfd'
'/etc/csf/csf.pl' -> '/usr/sbin/csf'
'/etc/csf/lfd.pl' -> '/usr/sbin/lfd'
'/etc/csf/csfui.pl' -> '/usr/local/csf/bin/csfui.pl'
'/etc/csf/csftest.pl' -> '/usr/local/csf/bin/csftest.pl'
'/etc/csf/pt_deleted_action.pl' -> '/usr/local/csf/bin/pt_deleted_action.pl'
'/etc/csf/remove_apf_bfd.sh' -> '/usr/local/csf/bin/remove_apf_bfd.sh'
'/etc/csf/uninstall.sh' -> '/usr/local/csf/bin/uninstall.sh'
'/etc/csf/regex.custom.pm' -> '/usr/local/csf/bin/regex.custom.pm'
'/etc/csf/webmin' -> '/usr/local/csf/lib/webmin'
'/etc/csf/alerts' -> '/usr/local/csf/tpl'
'uninstall.generic.sh' -> '/usr/local/csf/bin/uninstall.sh'
'csfui.pl' -> '/usr/local/csf/bin/csfui.pl'
'csfuir.pl' -> '/usr/local/csf/bin/csfuir.pl'
'cseui.pl' -> '/usr/local/csf/bin/cseui.pl'
'csftest.pl' -> '/usr/local/csf/bin/csftest.pl'
'regex.pm' -> '/usr/local/csf/bin/regex.pm'
'remove_apf_bfd.sh' -> '/usr/local/csf/bin/remove_apf_bfd.sh'
'readme.txt' -> '/etc/csf/readme.txt'
'sanity.txt' -> '/usr/local/csf/lib/sanity.txt'
'csf.rbls' -> '/usr/local/csf/lib/csf.rbls'
'restricted.txt' -> '/usr/local/csf/lib/restricted.txt'
'changelog.txt' -> '/etc/csf/changelog.txt'
'install.txt' -> '/etc/csf/install.txt'
'version.txt' -> '/etc/csf/version.txt'
'license.txt' -> '/etc/csf/license.txt'
'webmin' -> '/usr/local/csf/lib/webmin'
'webmin/csf' -> '/usr/local/csf/lib/webmin/csf'
'webmin/csf/index.cgi' -> '/usr/local/csf/lib/webmin/csf/index.cgi'
'webmin/csf/images' -> '/usr/local/csf/lib/webmin/csf/images'
'webmin/csf/images/ip.png' -> '/usr/local/csf/lib/webmin/csf/images/ip.png'
'webmin/csf/images/loader.gif' -> '/usr/local/csf/lib/webmin/csf/images/loader.gif'
'webmin/csf/images/icon.gif' -> '/usr/local/csf/lib/webmin/csf/images/icon.gif'
'webmin/csf/images/plus.png' -> '/usr/local/csf/lib/webmin/csf/images/plus.png'
'webmin/csf/images/perm.png' -> '/usr/local/csf/lib/webmin/csf/images/perm.png'
'webmin/csf/images/csf_small.png' -> '/usr/local/csf/lib/webmin/csf/images/csf_small.png'
'webmin/csf/images/minus.png' -> '/usr/local/csf/lib/webmin/csf/images/minus.png'
'webmin/csf/images/LICENSE.txt' -> '/usr/local/csf/lib/webmin/csf/images/LICENSE.txt'
'webmin/csf/images/delete.png' -> '/usr/local/csf/lib/webmin/csf/images/delete.png'
'webmin/csf/images/csf-loader.gif' -> '/usr/local/csf/lib/webmin/csf/images/csf-loader.gif'
'webmin/csf/module.info' -> '/usr/local/csf/lib/webmin/csf/module.info'
'ConfigServer' -> '/usr/local/csf/lib/ConfigServer'
'ConfigServer/Service.pm' -> '/usr/local/csf/lib/ConfigServer/Service.pm'
'ConfigServer/AbuseIP.pm' -> '/usr/local/csf/lib/ConfigServer/AbuseIP.pm'
'ConfigServer/CheckIP.pm' -> '/usr/local/csf/lib/ConfigServer/CheckIP.pm'
'ConfigServer/ServerCheck.pm' -> '/usr/local/csf/lib/ConfigServer/ServerCheck.pm'
'ConfigServer/GetIPs.pm' -> '/usr/local/csf/lib/ConfigServer/GetIPs.pm'
'ConfigServer/ServerStats.pm' -> '/usr/local/csf/lib/ConfigServer/ServerStats.pm'
'ConfigServer/Config.pm' -> '/usr/local/csf/lib/ConfigServer/Config.pm'
'ConfigServer/RBLCheck.pm' -> '/usr/local/csf/lib/ConfigServer/RBLCheck.pm'
'ConfigServer/Sendmail.pm' -> '/usr/local/csf/lib/ConfigServer/Sendmail.pm'
'ConfigServer/Ports.pm' -> '/usr/local/csf/lib/ConfigServer/Ports.pm'
'ConfigServer/URLGet.pm' -> '/usr/local/csf/lib/ConfigServer/URLGet.pm'
'ConfigServer/LookUpIP.pm' -> '/usr/local/csf/lib/ConfigServer/LookUpIP.pm'
'ConfigServer/Sanity.pm' -> '/usr/local/csf/lib/ConfigServer/Sanity.pm'
'ConfigServer/RBLLookup.pm' -> '/usr/local/csf/lib/ConfigServer/RBLLookup.pm'
'ConfigServer/Slurp.pm' -> '/usr/local/csf/lib/ConfigServer/Slurp.pm'
'Net' -> '/usr/local/csf/lib/Net'
'Net/CIDR' -> '/usr/local/csf/lib/Net/CIDR'
'Net/CIDR/Lite.pm' -> '/usr/local/csf/lib/Net/CIDR/Lite.pm'
'Net/IP' -> '/usr/local/csf/lib/Net/IP'
'Net/IP/IP.pm' -> '/usr/local/csf/lib/Net/IP/IP.pm'
'Net/IP.pm' -> '/usr/local/csf/lib/Net/IP.pm'
'Geo' -> '/usr/local/csf/lib/Geo'
'Geo/IP' -> '/usr/local/csf/lib/Geo/IP'
'Geo/IP/Record.pod' -> '/usr/local/csf/lib/Geo/IP/Record.pod'
'Geo/IP/Record.pm' -> '/usr/local/csf/lib/Geo/IP/Record.pm'
'Geo/Mirror.pm' -> '/usr/local/csf/lib/Geo/Mirror.pm'
'Geo/IP.pm' -> '/usr/local/csf/lib/Geo/IP.pm'
'Crypt' -> '/usr/local/csf/lib/Crypt'
'Crypt/Blowfish_PP.pm' -> '/usr/local/csf/lib/Crypt/Blowfish_PP.pm'
'Crypt/CBC.pm' -> '/usr/local/csf/lib/Crypt/CBC.pm'
'HTTP' -> '/usr/local/csf/lib/HTTP'
'HTTP/Tiny.pm' -> '/usr/local/csf/lib/HTTP/Tiny.pm'
'version/version' -> '/usr/local/csf/lib/version'
'version/version/vpp.pm' -> '/usr/local/csf/lib/version/vpp.pm'
'version/version/regex.pm' -> '/usr/local/csf/lib/version/regex.pm'
'version/version.pm' -> '/usr/local/csf/lib/version.pm'
'csf.div' -> '/usr/local/csf/lib/csf.div'
'csfajaxtail.js' -> '/usr/local/csf/lib/csfajaxtail.js'
'ui/images/cxs.png' -> '/etc/csf/ui/./images/cxs.png'
'ui/images/ip.png' -> '/etc/csf/ui/./images/ip.png'
'ui/images/viewdelivery.png' -> '/etc/csf/ui/./images/viewdelivery.png'
'ui/images/icon.gif' -> '/etc/csf/ui/./images/icon.gif'
'ui/images/plus.png' -> '/etc/csf/ui/./images/plus.png'
'ui/images/cxs-loader.gif' -> '/etc/csf/ui/./images/cxs-loader.gif'
'ui/images/perm.png' -> '/etc/csf/ui/./images/perm.png'
'ui/images/deliver.png' -> '/etc/csf/ui/./images/deliver.png'
'ui/images/csf_small.png' -> '/etc/csf/ui/./images/csf_small.png'
'ui/images/minus.png' -> '/etc/csf/ui/./images/minus.png'
'ui/images/LICENSE.txt' -> '/etc/csf/ui/./images/LICENSE.txt'
'ui/images/delete.png' -> '/etc/csf/ui/./images/delete.png'
'ui/images/cxs_small.png' -> '/etc/csf/ui/./images/cxs_small.png'
'ui/images/csf-loader.gif' -> '/etc/csf/ui/./images/csf-loader.gif'
'ui/images/cse_small.png' -> '/etc/csf/ui/./images/cse_small.png'
'profiles' -> '/usr/local/csf/profiles'
'profiles/block_all_temp.conf' -> '/usr/local/csf/profiles/block_all_temp.conf'
'profiles/disable_alerts.conf' -> '/usr/local/csf/profiles/disable_alerts.conf'
'profiles/protection_low.conf' -> '/usr/local/csf/profiles/protection_low.conf'
'profiles/protection_medium.conf' -> '/usr/local/csf/profiles/protection_medium.conf'
'profiles/protection_high.conf' -> '/usr/local/csf/profiles/protection_high.conf'
'profiles/block_all_perm.conf' -> '/usr/local/csf/profiles/block_all_perm.conf'
'csf.conf' -> '/usr/local/csf/profiles/reset_to_defaults.conf'
'csf.1.txt' -> '/usr/local/man/man1/csf.1'
'csf.help' -> '/usr/local/csf/lib/csf.help'
chmod: cannot access '/var/log/lfd.log*': No such file or directory
mode of '/usr/local/csf/bin/cseui.pl' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/csftest.pl' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/csfui.pl' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/csfuir.pl' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/pt_deleted_action.pl' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/remove_apf_bfd.sh' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/uninstall.sh' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/regex.custom.pm' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/regex.pm' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/etc/csf/csf.pl' retained as 0700 (rwx------)
mode of '/etc/csf/csftest.pl' retained as 0700 (rwx------)
mode of '/etc/csf/csfui.pl' retained as 0700 (rwx------)
mode of '/etc/csf/lfd.pl' retained as 0700 (rwx------)
mode of '/etc/csf/pt_deleted_action.pl' retained as 0700 (rwx------)
chmod: cannot access '/etc/csf/*.cgi': No such file or directory
failed to change mode of '/etc/csf/*.cgi' from 0000 (---------) to 0000 (---------)
mode of '/etc/csf/remove_apf_bfd.sh' retained as 0700 (rwx------)
mode of '/etc/csf/uninstall.sh' retained as 0700 (rwx------)
chmod: cannot access '/etc/csf/*.php': No such file or directory
failed to change mode of '/etc/csf/*.php' from 0000 (---------) to 0000 (---------)
chmod: cannot access '/etc/csf/*.py': No such file or directory
failed to change mode of '/etc/csf/*.py' from 0000 (---------) to 0000 (---------)
mode of '/etc/csf/webmin/csf/index.cgi' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/etc/cron.d/lfd-cron' changed from 0755 (rwxr-xr-x) to 0644 (rw-r--r--)
mode of '/etc/cron.d/csf-cron' changed from 0755 (rwxr-xr-x) to 0644 (rw-r--r--)
mode of 'auto.generic.pl' retained as 0700 (rwx------)
'/etc/csf/csf.conf' -> '/var/lib/csf/backup/1452164427_pre_v8_08_upgrade'

TCP ports currently listening for incoming connections:
22,80

UDP ports currently listening for incoming connections:


Note: The port details above are for information only, csf hasn't been auto-configured.

Don't forget to:
1. Configure the following options in the csf configuration to suite your server: TCP_*, UDP_*
2. Restart csf and lfd
3. Set TESTING to 0 once you're happy with the firewall, lfd will not run until you do so

Adding current SSH session IP address to the csf whitelist in csf.allow:
Adding 82.68.17.238 to csf.allow only while in TESTING mode (not iptables ACCEPT)
*WARNING* TESTING mode is enabled - do not forget to disable it in the configuration
'lfd.service' -> '/usr/lib/systemd/system/lfd.service'
'csf.service' -> '/usr/lib/systemd/system/csf.service'
Created symlink from /etc/systemd/system/multi-user.target.wants/csf.service to /usr/lib/systemd/system/csf.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/lfd.service to /usr/lib/systemd/system/lfd.service.
Failed to stop firewalld.service: Unit firewalld.service not loaded.
'/etc/csf/csfwebmin.tgz' -> '/usr/local/csf/csfwebmin.tgz'

Installation Completed

root@srv:~/csf/csf#  perl /etc/csf/csftest.pl
Testing ip_tables/iptable_filter...OK
Testing ipt_LOG...OK
Testing ipt_multiport/xt_multiport...OK
Testing ipt_REJECT...OK
Testing ipt_state/xt_state...OK
Testing ipt_limit/xt_limit...OK
Testing ipt_recent...OK
Testing xt_connlimit...OK
Testing ipt_owner/xt_owner...OK
Testing iptable_nat/ipt_REDIRECT...OK
Testing iptable_nat/ipt_DNAT...OK

RESULT: csf should function on this server

Re: Missing init.d start/stop scipts for csf & lfd

Posted: 07 Jan 2016, 18:09
by ForumAdmin
What OS are you running? If the OS is configured to use systemd then there will not be any entries for the legacy /etc/init.d/

Re: Missing init.d start/stop scipts for csf & lfd

Posted: 07 Jan 2016, 23:09
by Wilfy
I am using Debian 8 Jessie.

How embarrassing.

Thank you and sorry to waste your time, I am off with my tail between my legs to do some reading (FX: Blush).