Your Ad can be there
+ Post New Thread
Results 1 to 3 of 3

Thread: How to monitor csf/lfd service if is running & restart if down

  1. #1
    Administrator
    Join Date
    Mar 2013
    Posts
    2,724

    How to monitor csf/lfd service if is running & restart if down

    lfd is the config server firewall (csf) daemon. In my case it happened that lfd crashed because of no memory and it was not restarted:

    tail /var/log/lfd.log
    *Error* cannot fork: Cannot allocate memory, at line 3318
    daemon stopped
    In case of a cPanel/WHM server, tell the server to check the lfd service and restart it if needed:
    WHM » Service Configuration »Service Manager and check if you can enable "lfd" here. If its not here, one can do following commands via Linux command line:

    echo "service[lfd]=x,x,x,/etc/init.d/lfd restart,lfd,root" > /etc/chkserv.d/lfd
    echo "lfd:1" >> /etc/chkserv.d/chkservd.conf
    First command will add lfd service to the list of services that should be checked/monitored by WHM
    Second command will enable monitoring of the lfd service

    -----

    custom non-cpanel way of checking & restarting

    I think this may work to check if lfd process is running and if not, it will restart csf+lfd:

    run:
    crontab -e
    paste on new line:
    * * * * * if [ "$(ps ax|grep lfd|grep -v grep|wc -l)" == "0" ];then csf -ra;fi 1>/dev/null
    save

  2. #2
    Junior Member coop31's Avatar
    Join Date
    Apr 2016
    Posts
    3


    Is this useful / helpfull? Yes | No

    Login Failure Daemon (lfd)

    Login Failure Daemon (lfd) is a process that runs all the time and periodically (every X seconds) scans the latest log file entries for login attempts against your server that continually fail within a short period of time. Such attempts are often called "Brute-force attacks" and the daemon process responds very quickly to such patterns and blocks offending IP's quickly. To check why lfd has failed look at the end of /var/log/lfd.log Support for csf+lfd is over here - http://forum.configserver.com

  3. #3


    Is this useful / helpfull? Yes | No
    You have to monitor csf firewall with various linux commands.
    For that it is must to have root access of server. You can check all the csf commands here.

+ Post New Thread

Similar Threads

  1. WTS European VPS | RDP Access | Server Restart | Best Quality at Lowest Rates
    By Thaupavu in forum VPS: Offers & Requests
    Replies: 0
    Last Post: 04-05-2016, 09:01 AM
  2. How to make SSHd service permanently running?
    By Fli in forum Linux Forums
    Replies: 0
    Last Post: 02-18-2016, 08:08 PM
  3. WTS EU VPS | RDP Enabled | Restart Allowed | Stable Networking | 24/7 Support
    By Thaupavu in forum VPS: Offers & Requests
    Replies: 0
    Last Post: 10-01-2015, 08:02 AM
  4. Replies: 0
    Last Post: 10-13-2013, 01:53 PM
  5. [Solved] WTB PHP system: monitoring service to monitor website changes
    By Fli in forum WTS/WTB Programming services
    Replies: 0
    Last Post: 08-28-2013, 02:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
 Protected by : ZB BLOCK  &  StopForumSpam