Page 1 of 1

CSF & Ipset Integration Question

Posted: 08 Oct 2021, 19:08
by bigd2000
How are the IP's/ranges loaded into Ipset? Are they simply added to the csf.deny and csf processes them into Ipset or other method? Is there a way to easily bulk add deny IP's?

I have an existing ipset how do I add that to the deny?

All I've seen essentially is make sure it's installed and change the conf to 1.


Thanks!

Re: CSF & Ipset Integration Question

Posted: 17 Oct 2021, 15:16
by Sergio
"How are the IP's/ranges loaded into Ipset?"
It is automatically, you just add the IPs into CSF.DENY

The easy method to add and deny IPs is to create your own IP BLACK LIST in your server, then add the list in CSF option:
LFD BLOCKLIST

Re: CSF & Ipset Integration Question

Posted: 22 Oct 2021, 21:09
by bigd2000
Great, thanks! Does CSF need to be restarted after changes to the blacklist or the addition of one in the blacklist option?

Re: CSF & Ipset Integration Question

Posted: 22 Oct 2021, 21:49
by Sergio
bigd2000 wrote: 22 Oct 2021, 21:09 Great, thanks! Does CSF need to be restarted after changes to the blacklist or the addition of one in the blacklist option?
Yes, you have to use LFD Restart option in CSF.

If you create your own black list, you have to specify when CSF is going to read the list, in the readme header of LFD BLACKLIST you can see how it needs to be configured.

In my case, I have a black list of IPs that I block among my servers and in each server I specify a different hour for CSF to get that list.

Re: CSF & Ipset Integration Question

Posted: 23 Oct 2021, 19:20
by bigd2000
Thanks! Can you add a local list such as /path/to/the/blacklist.txt or must it be via an URL?

Re: CSF & Ipset Integration Question

Posted: 24 Oct 2021, 00:17
by Sergio
It should be an URL, the best way is to look at examples that are already in there.

Also, if you are saving the list in one of your domains, my advice is to add in your .htaccess an allow/deny entry for that file.
So, only the IP that you allow will have access to that file.

Re: CSF & Ipset Integration Question

Posted: 26 Oct 2021, 20:28
by bigd2000
Right, thanks!