iptables list – a helpful ~/.bashrc alias

I grow tired of asking iptables to give me my line numbers for insert/deletes, and sometimes, I just want it to “cut to the chase” and give me numbers.

Toss this into your ~/.bashrc for making life easier:

then run source ~/.bashrc  to reload.

Output sample:

Voila! Now you’ve got counters (helpful for debugging btw), numeric IP’s and line numbers at your fingertips!

Leave a Reply

Your email address will not be published. Required fields are marked *