How to enable csf or lfd on server boot

Post Reply
developer7654
Junior Member
Posts: 4
Joined: 08 Aug 2014, 16:25

How to enable csf or lfd on server boot

Post by developer7654 »

I just wonder if there is a way to ensure that csf is enabled at server startup. I am asking this because I noticed today that when my server, due to a scheduled restart, was restarted, lfd did not start and it remained so until several hours later when I came to knwo about the problem after I checked my mails and had to restart csf manually.

I found this in

Code: Select all

/var/log/lfd.log 

Code: Select all

Mar 10 03:50:35 server lfd[3632]: iptables appears to have been flushed - running *csf startup*...
Mar 10 03:50:46 server lfd[3632]: csf startup completed
Mar 10 03:50:46 server lfd[3632]: RESTRICT_SYSLOG: *Error* No matching unix sockets found
Mar 10 03:50:51 server lfd[3632]: *Error* You have an unresolved error when starting csf. You need to restart csf successfully before restarting lfd (see /etc/csf/csf.error). *lfd $
Mar 10 03:50:51 server lfd[3632]: daemon stopped
Any ideas would be much appreciated.

P.S. The strange thing is I could not find /etc/csf/csf.error file.
developer7654
Junior Member
Posts: 4
Joined: 08 Aug 2014, 16:25

Re: How to enable csf or lfd on server boot

Post by developer7654 »

And when I add

Code: Select all

/etc/csf/csf.error
through touch command again lfd will be down.
tfmfg
Junior Member
Posts: 4
Joined: 10 Mar 2015, 10:39

Re: How to enable csf or lfd on server boot

Post by tfmfg »

That's normal behavior.

lfd is supposed to not start when the file /etc/csf/csf.error exists, it's so you check what the problem is before the firewall starts again which depending on the error might be problematic.

You just need to read what's inside /etc/csf/csf.error when it appears BEFORE manually starting the firewall.
developer7654
Junior Member
Posts: 4
Joined: 08 Aug 2014, 16:25

Re: How to enable csf or lfd on server boot

Post by developer7654 »

@tfmfg. Thanks for replying. Unfortunately, I did not read the error log before re-enabling lfd. So, any ideas what might have caused the mentioned behavior? I just cannot get what "RESTRICT_SYSLOG: *Error* No matching unix sockets found" part mean in the lfd.log.
Post Reply