Blame iptables/iptables-xml.1.in

Packit 7b22a4
.TH IPTABLES-XML 1 "" "@PACKAGE_STRING@" "@PACKAGE_STRING@"
Packit 7b22a4
.\"
Packit 7b22a4
.\" Man page written by Sam Liddicott <azez@ufomechanic.net>
Packit 7b22a4
.\" It is based on the iptables-save man page.
Packit 7b22a4
.\"
Packit 7b22a4
.\"	This program is free software; you can redistribute it and/or modify
Packit 7b22a4
.\"	it under the terms of the GNU General Public License as published by
Packit 7b22a4
.\"	the Free Software Foundation; either version 2 of the License, or
Packit 7b22a4
.\"	(at your option) any later version.
Packit 7b22a4
.\"
Packit 7b22a4
.\"	This program is distributed in the hope that it will be useful,
Packit 7b22a4
.\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 7b22a4
.\"	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 7b22a4
.\"	GNU General Public License for more details.
Packit 7b22a4
.\"
Packit 7b22a4
.\"	You should have received a copy of the GNU General Public License
Packit 7b22a4
.\"	along with this program; if not, write to the Free Software
Packit 7b22a4
.\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Packit 7b22a4
.\"
Packit 7b22a4
.\"
Packit 7b22a4
.SH NAME
Packit 7b22a4
iptables-xml \(em Convert iptables-save format to XML
Packit 7b22a4
.SH SYNOPSIS
Packit 7b22a4
\fBiptables\-xml\fP [\fB\-c\fP] [\fB\-v\fP]
Packit 7b22a4
.SH DESCRIPTION
Packit 7b22a4
.PP
Packit 7b22a4
.B iptables-xml
Packit 7b22a4
is used to convert the output of iptables-save into an easily manipulatable
Packit 7b22a4
XML format to STDOUT.  Use I/O-redirection provided by your shell to write to 
Packit 7b22a4
a file.
Packit 7b22a4
.TP
Packit 7b22a4
\fB\-c\fR, \fB\-\-combine\fR
Packit 7b22a4
combine consecutive rules with the same matches but different targets. iptables
Packit 7b22a4
does not currently support more than one target per match, so this simulates 
Packit 7b22a4
that by collecting the targets from consecutive iptables rules into one action
Packit 7b22a4
tag, but only when the rule matches are identical. Terminating actions like
Packit 7b22a4
RETURN, DROP, ACCEPT and QUEUE are not combined with subsequent targets.
Packit 7b22a4
.TP
Packit 7b22a4
\fB\-v\fR, \fB\-\-verbose\fR
Packit 7b22a4
Output xml comments containing the iptables line from which the XML is derived
Packit 7b22a4
Packit 7b22a4
.PP
Packit 7b22a4
iptables-xml does a mechanistic conversion to a very expressive xml
Packit 7b22a4
format; the only semantic considerations are for \-g and \-j targets in
Packit 7b22a4
order to discriminate between <call> <goto> and <nane-of-target> as it
Packit 7b22a4
helps xml processing scripts if they can tell the difference between a
Packit 7b22a4
target like SNAT and another chain.
Packit 7b22a4
Packit 7b22a4
Some sample output is:
Packit 7b22a4
Packit 7b22a4
<iptables-rules>
Packit 7b22a4
  
Packit 7b22a4
    
Packit 7b22a4
byte-count="7137573">
Packit 7b22a4
      <rule>
Packit 7b22a4
       <conditions>
Packit 7b22a4
        <match>
Packit 7b22a4
          

tcp

Packit 7b22a4
        </match>
Packit 7b22a4
        <tcp>
Packit 7b22a4
          <sport>8443</sport>
Packit 7b22a4
        </tcp>
Packit 7b22a4
       </conditions>
Packit 7b22a4
       <actions>
Packit 7b22a4
        <call>
Packit 7b22a4
          <check_ip/>
Packit 7b22a4
        </call>
Packit 7b22a4
        <ACCEPT/>
Packit 7b22a4
       </actions>
Packit 7b22a4
      </rule>
Packit 7b22a4
    </chain>
Packit 7b22a4
  
Packit 7b22a4
</iptables-rules>
Packit 7b22a4
Packit 7b22a4
.PP
Packit 7b22a4
Conversion from XML to iptables-save format may be done using the 
Packit 7b22a4
iptables.xslt script and xsltproc, or a custom program using
Packit 7b22a4
libxsltproc or similar; in this fashion:
Packit 7b22a4
Packit 7b22a4
xsltproc iptables.xslt my-iptables.xml | iptables-restore
Packit 7b22a4
Packit 7b22a4
.SH BUGS
Packit 7b22a4
None known as of iptables-1.3.7 release
Packit 7b22a4
.SH AUTHOR
Packit 7b22a4
Sam Liddicott <azez@ufomechanic.net>
Packit 7b22a4
.SH SEE ALSO
Packit 7b22a4
\fBiptables\-save\fP(8), \fBiptables\-restore\fP(8), \fBiptables\fP(8)