Listing order of Temporary IP entries

Post Reply
Ilia
Junior Member
Posts: 98
Joined: 09 Feb 2013, 08:47

Listing order of Temporary IP entries

Post by Ilia »

It would be absolutely great to be able to set ASC or DESC order of the IP that are at Temporary IP entries.

For me, it makes more sence, when I go to Temporary IP entries to see newly blocked IPs not the old ones. Now in order to see new IP address you would have to scroll to the very bottom.

I think the IPs should be sorted DESC based on TTL, so when you go to Temporary IP entries, you see newly blocked IPs.

Does it make sense?
Ilia
Junior Member
Posts: 98
Joined: 09 Feb 2013, 08:47

Re: Listing order of Temporary IP entries

Post by Ilia »

In case the future readers would find this idea interesting and it would not be implemented, you can easily make reversed order by sorting the array of csf.tempban entries.

In order to do it, you should edit /usr/local/csf/bin/csfui.pl file.

Find:

Code: Select all

foreach my $line (@deny) {
and place right above this line, the following:

Code: Select all

@deny = reverse sort @deny;
After that, when you go to Temporary IP entries, the IP addresses that was temporarily blocked last, will be on the top of the list and not at the bottom.
Sergio
Junior Member
Posts: 1712
Joined: 12 Dec 2006, 14:56

Re: Listing order of Temporary IP entries

Post by Sergio »

Thanks Ilia, nice addition to the forum.

Sergio
Ilia
Junior Member
Posts: 98
Joined: 09 Feb 2013, 08:47

Re: Listing order of Temporary IP entries

Post by Ilia »

Thank you! I think now it's part of 6.45! :)
Post Reply