Is it possible to remove IP that belongs to blocked list in CIDR range?

Post Reply
MaXi32
Junior Member
Posts: 11
Joined: 13 Aug 2019, 03:26

Is it possible to remove IP that belongs to blocked list in CIDR range?

Post by MaXi32 »

To demonstrate this question,

Let's say I have this 3 IPs:

1.1.1.1, 1.1.1.2 and 1.1.1.3

Now I want to block each of this IP individually using csf. So,

csf -d 1.1.1.1
csf -d 1.1.1.2
csf -d 1.1.1.3

Success, now all of them are blocked in /etc/csf/csf.deny

But then if I want to block 3 of them using CIDR /24 notation. So I did this:

csf -d 1.1.1.0/24

Success, but CSF did not remove the previous 3 IPs and this looks redundant to me. Also when removing csf -dr 1.1.1.0/24, it did not remove all IPs belong to the network 1.1.1.0

Is there a hidden function that CSF can handle this or do I need to manually delete the entries after using CIDR block? :confused:
MaXi32
Junior Member
Posts: 11
Joined: 13 Aug 2019, 03:26

Re: Is it possible to remove IP that belongs to blocked list in CIDR range?

Post by MaXi32 »

Anyone willing to answer this? Do I have to create my own script to remove this duplicated entries ?
MaXi32
Junior Member
Posts: 11
Joined: 13 Aug 2019, 03:26

Re: Is it possible to remove IP that belongs to blocked list in CIDR range?

Post by MaXi32 »

It's sad to see that all of my posts that I asked (if u look at the history, nobody is answering) except me giving my own answer. Shed some light on this please.
MaXi32
Junior Member
Posts: 11
Joined: 13 Aug 2019, 03:26

Re: Is it possible to remove IP that belongs to blocked list in CIDR range?

Post by MaXi32 »

Answering my own question again after searched about this on the internet csf not able to do this on its own and I have to manually wrote script about this. Successfully wrote this script.
growers
Junior Member
Posts: 3
Joined: 26 May 2020, 01:58

Re: Is it possible to remove IP that belongs to blocked list in CIDR range?

Post by growers »

I am looking forward to see how you do it.
Post Reply