sharingsunshine
asked on
Iptables Centos 6 - Sort Numerically
I need to know what ip numbers I have blocked with iptables. I know I can display a list but I need that list of ip numbers to be in ascending sequence so I can easily determine if I have that ip blocked or not.
Thanks,
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
exactly what I needed, Thanks
The problem with that solution is you said "IPs that are blocked". It shows all IPs regardless of the permissions -- including subnets that are permitted.
ASKER
Hi Jan,
Thanks for your concern. I can live with that fact. I am getting lists of hackers from a wp plugin. Also, I have a script that finds hackers who are subscribing to our newsletter. I just wanted a list of IP's that I had already added. To keep from duplicating my efforts.
Also, I don't grant any permissions through iptables. I use Amazon's console for that.
Thanks for your concern. I can live with that fact. I am getting lists of hackers from a wp plugin. Also, I have a script that finds hackers who are subscribing to our newsletter. I just wanted a list of IP's that I had already added. To keep from duplicating my efforts.
Also, I don't grant any permissions through iptables. I use Amazon's console for that.
If you want to see source addresses in numerical order, then I would recommend re-writing the list so that they appear in the proper ascending order.
When adding rules in the future, look at the line numbers and insert your new rule appropriately.