lyfsy

Cron for CSF blocked IP flush every 1 hour or whatever (Cpan

Jan 22nd, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.36 KB | None | 0 0
  1. Cron for CSF blocked IP flush every 1 hour or whatever (Cpanel)
  2. Trying to flush blocked IP in CSF every 1 hour. Cron code is below:
  3. ++++++++++++++
  4. list of top cheapest host http://Listfreetop.pw
  5.  
  6. Top 200 best traffic exchange sites http://Listfreetop.pw
  7.  
  8. free link exchange sites list http://Listfreetop.pw
  9. list of top ptc sites
  10. list of top ptp sites
  11. Listfreetop.pw
  12. Listfreetop.pw
  13. +++++++++++++++
  14.  
  15.  
  16.  
  17. 0 */1 * * * csf -tf > /dev/null 2>&1
  18. But somehow its not work Anyone give me proper way.
  19.  
  20. Thanks in advance,
  21. BD Web Services Since 2009
  22. cPanel and Plesk | CloudLinux | Node.JS | SSD Server | Daily Remote Backup | North America and Europe | Money Back Guarantee
  23. USA | Canada | Germany
  24. Moved > Hosting Security and Technology.
  25. The command "csf -tf" only flush temporary blocks. If you need to flush permanent blocks, please use command "csf -df".
  26. Supportexpertz, Serving for quality hosting support
  27. Helpdesk & Live chat Support || Server Management
  28. Dedicated server Support || Available 24/7/365
  29. Thank you reply. I added csf -df same thing its not flushing IP. I set 1min and 5mins cron
  30.  
  31. domain driven design pdf
  32. mybitcoinrewards.com
  33. cut4links.com
  34. siteground.co.uk
  35. domain map
  36. host 4 u
  37. pasted.co
  38. members.tubepaki.com
  39.  
  40. 1 * * * * csf -df >/dev/null 2>&1
  41. 5 * * * * csf -df >/dev/null 2>&1
  42.  
  43. no luck. Any other alternate command?
  44. Thanks
  45. BD Web Services Since 2009
  46. cPanel and Plesk | CloudLinux | Node.JS | SSD Server | Daily Remote Backup | North America and Europe | Money Back Guarantee
  47. USA | Canada | Germany
  48. Isn't there a setting where you can disable permanent blocks and use the temporary block function?
  49. == INIZ - Providing Hosting Since 2012
  50. = EU/US/ASIA SSD KVM/OpenVZ VPS Hosting
  51. = Fast Support, DDoS Protection & Much More
  52. == UK Web Hosting - SSD Powered/Daily Backups/DDoS Protection & Much More!
  53. Reply With Quote Reply With Quote 0 Not allowed!
  54. 08-24-2016, 02:54 PM #6 whmcsguru whmcsguru is online now
  55. Just me
  56.  
  57. Join Date
  58. Sep 2002
  59. Location
  60. Top Secret
  61. Posts
  62. 13,479
  63. it's likely that the person you're removing is just getting themselves put back in the list
  64. if you search for the ip address
  65. Code:
  66. csf -g <ipaddress>
  67. This should tell you what level, and why they're there.
  68. if this is a customer, you may want to educate them on usage
  69. If this is one of your own internal ip's, just whitelist it.
  70. Tom Whiting, WHMCS Guru extraordinaire
  71. Linux problems? WHMCS Problems? Give me a shout
  72. Check out my WHMCS Addons
  73. I figure out the problem
  74. Thank you all.
  75. BD Web Services Since 2009
  76. cPanel and Plesk | CloudLinux | Node.JS | SSD Server | Daily Remote Backup | North America and Europe | Money Back Guarantee
  77. USA | Canada | Germany
  78. What is the solution ? I need to flush cfs every morning at 7 AM. How to do ?
  79. Thanks.
  80. I figure out the problem
  81. Thank you all.
  82. Love that on forums. Nothing better than searching for and finding exactly the issue you need help with and someone posts "fixed it".
  83. Quote Originally Posted by kikloo View Post
  84. I need to flush cfs every morning at 7 AM. How to do ?
  85. I'm wondering why you'd want to do this, when CSF will simply push older IPs off the list as more get added once it hits the max you've set. Do you have clients getting caught and don't want to help that stop happening or something?
  86. Show your support for everyone affected by the Australian bush fires, and those fighting them
  87. What is the solution ? I need to flush cfs every morning at 7 AM. How to do ?
  88.  
  89. Thanks.
  90. The easiest approach to doing this is to remove /etc/csf/csf.deny then restart the csf process every day . This will flush those blocks.
  91.  
  92. That being said, as @bear mentioned, you probably don’t need to do this, since CSF automatically flushed old blocks fir new ones
  93. Tom Whiting, WHMCS Guru extraordinaire
  94. Linux problems? WHMCS Problems? Give me a shout
  95. Few legit users get themselves blocked and I have to manually flush the firewall. I just want that in morning it would get flushed once so that people can reach the server for emails etc.
  96. If it's the same users, it would be better to discuss why with them and fix the problem?
  97. Alternately, just place a low number on IPs allowed to be blocked? They'd cycle faster that way, though that reduces the effectiveness of the firewall in general, as would a daily flush.
  98.  
  99. That being said, I'd simply enable the testing mode at the top of the conf file, then check for the cron it's added that resets it every few minutes in /etc/crontab /etc/cron.d/ or in the root crontab (crontab -e). Copy that, put the firewall back the way it was and edit the cron you copied. That should handle it?
  100.  
  101. [edit]
  102. If not, here's 2 more threads that might offer some insight:
  103. https://www.webhostingtalk.com/showthread.php?t=1001025
  104. https://www.webhostingtalk.com/showthread.php?t=909604
  105. Last edited by bear; 10-22-2019 at 08:25 AM.
  106. Show your support for everyone affected by the Australian bush fires, and those fighting them
  107. Few legit users get themselves blocked and I have to manually flush the firewall..
  108. Never flush the firewall because of a few users. Explain what they’re doing wrong and tell them to change things
  109.  
  110. If that doesn’t work, I divide them with a way to get themselves removed from the block . There are a couple of utilities designed for WHMCS and CSF that will help you
  111.  
  112. Flushing blocks daily is just the wrong approach
  113. Tom Whiting, WHMCS Guru extraordinaire
  114. Linux problems? WHMCS Problems? Give me a shout
Advertisement
Add Comment
Please, Sign In to add comment