Page 1 of 1

Listing order of Temporary IP entries

Posted: 18 Feb 2014, 11:08
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?

Re: Listing order of Temporary IP entries

Posted: 18 Feb 2014, 19:31
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.

Re: Listing order of Temporary IP entries

Posted: 19 Feb 2014, 20:39
by Sergio
Thanks Ilia, nice addition to the forum.

Sergio

Re: Listing order of Temporary IP entries

Posted: 20 Feb 2014, 09:16
by Ilia
Thank you! I think now it's part of 6.45! :)