A while back I was watching over the shoulder of a Linux guru and he issued a command that listed all the iptables rules in the format of the append commands you would need to issue in order to build them, but despite all my googling and man page searching I can't figure out what he did.
For example if the output from
iptables -nL INPUT was:
Chain INPUT (policy DROP) num target prot opt source destination 1 ACCEPT tcp -- 0.0.0.0/0 192.168.0.1 tcp dpt:80
The output from the command I'm looking for would be something like:
1 -A INPUT -i eth0 -p tcp --dport 80 -d 192.168.0.1 -j ACCEPT
I seem to remember that it was just another option passed into the standard
iptables -L command, but I could be wrong. Does anyone know of a command to accomplish this?