2013/2/26 Jan Engelhardt <jengelh@xxxxxxx>: > > On Tuesday 2013-02-26 15:57, Jonh Wendell wrote: >>2013/2/26 Jan Engelhardt <jengelh@xxxxxxx> >> On Tuesday 2013-02-26 12:33, jonh.wendell@xxxxxxxxx wrote: >> >> >From: Jonh Wendell <jonh.wendell@xxxxxxxxxxxxx> >> > >> >Similar to the --table argument, if a --chain (or -C) argument >> >is passed, we limit the output to rules of that chain. >> >>But we have `iptables -S chain` for that, don't we. >> >> >>I'm afraid its output is not suitable for iptables-restore. > > I thought you just wanted to have a single chain shown, for the > purposes of debugging (because nobody can frankly read -L's output). > If however you want to feed it to replace, can you elaborate on your > use case? I would be interested in that. Hi! My particular use case is: I want to flush all iptables rules except those ones from a specific chain. So, I save them with iptables-save -C <chain-name>, flush, and then run iptables-restore on them. I could do it without that -C flag, but I'd have to parse its output to get only the chain I'm interested in. In other words, my use case could be reached with something like 'iptables -F ! <chain-name>'. All in all, I think it's a good addition to iptables-save, it can be useful in other scenarios. Thanks, -- Jonh Wendell http://www.bani.com.br -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html