I have an iptables rule and I have to write a script that gets the numbers of packets and bytes target for that rule. I know that that command
iptables -L -v -x shows that info, but I don't know how to extract it with a script.
It will be just a single rule in forward chain. Can somebody help me with this script? I have to show the answer on the console.