Tales of an IT Nobody

devbox:~$ iptables -A OUTPUT -j DROP

iptables list – a helpful ~/.bashrc alias May 10, 2015

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!

Categories: servers

Leave a Reply

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