1 .TH IPTABLES-XML 1 "" "@PACKAGE_STRING@" "@PACKAGE_STRING@"
3 .\" Man page written by Sam Liddicott <azez@ufomechanic.net>
4 .\" It is based on the iptables-save man page.
6 .\" This program is free software; you can redistribute it and/or modify
7 .\" it under the terms of the GNU General Public License as published by
8 .\" the Free Software Foundation; either version 2 of the License, or
9 .\" (at your option) any later version.
11 .\" This program is distributed in the hope that it will be useful,
12 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 .\" GNU General Public License for more details.
16 .\" You should have received a copy of the GNU General Public License
17 .\" along with this program; if not, write to the Free Software
18 .\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 iptables-xml \(em Convert iptables-save format to XML
24 \fBiptables\-xml\fP [\fB\-c\fP] [\fB\-v\fP]
28 is used to convert the output of iptables-save into an easily manipulatable
29 XML format to STDOUT. Use I/O-redirection provided by your shell to write to
32 \fB\-c\fR, \fB\-\-combine\fR
33 combine consecutive rules with the same matches but different targets. iptables
34 does not currently support more than one target per match, so this simulates
35 that by collecting the targets from consecutive iptables rules into one action
36 tag, but only when the rule matches are identical. Terminating actions like
37 RETURN, DROP, ACCEPT and QUEUE are not combined with subsequent targets.
39 \fB\-v\fR, \fB\-\-verbose\fR
40 Output xml comments containing the iptables line from which the XML is derived
43 iptables-xml does a mechanistic conversion to a very expressive xml
44 format; the only semantic considerations are for \-g and \-j targets in
45 order to discriminate between <call> <goto> and <nane-of-target> as it
46 helps xml processing scripts if they can tell the difference between a
47 target like SNAT and another chain.
49 Some sample output is:
53 <chain name="PREROUTING" policy="ACCEPT" packet-count="63436"
76 Conversion from XML to iptables-save format may be done using the
77 iptables.xslt script and xsltproc, or a custom program using
78 libxsltproc or similar; in this fashion:
80 xsltproc iptables.xslt my-iptables.xml | iptables-restore
83 None known as of iptables-1.3.7 release
85 Sam Liddicott <azez@ufomechanic.net>
87 \fBiptables\-save\fP(8), \fBiptables\-restore\fP(8), \fBiptables\fP(8)