.\" Man page generated from reStructuredText. . .TH "CDIST-TYPE__IPTABLES_RULE" "7" "Jun 23, 2019" "5.1.2" "cdist" . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH NAME .sp cdist\-type__iptables_rule \- Deploy iptable rulesets .SH DESCRIPTION .sp This cdist type allows you to manage iptable rules in a distribution independent manner. .SH REQUIRED PARAMETERS .INDENT 0.0 .TP .B rule The rule to apply. Essentially an iptables command line without iptables in front of it. .UNINDENT .SH OPTIONAL PARAMETERS .INDENT 0.0 .TP .B state \(aqpresent\(aq or \(aqabsent\(aq, defaults to \(aqpresent\(aq .UNINDENT .SH EXAMPLES .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C # Deploy some policies __iptables_rule policy\-in \-\-rule "\-P INPUT DROP" __iptables_rule policy\-out \-\-rule "\-P OUTPUT ACCEPT" __iptables_rule policy\-fwd \-\-rule "\-P FORWARD DROP" # The usual established rule __iptables_rule established \-\-rule "\-A INPUT \-m state \-\-state RELATED,ESTABLISHED \-j ACCEPT" # Some service rules __iptables_rule http \-\-rule "\-A INPUT \-p tcp \-\-dport 80 \-j ACCEPT" __iptables_rule ssh \-\-rule "\-A INPUT \-p tcp \-\-dport 22 \-j ACCEPT" __iptables_rule https \-\-rule "\-A INPUT \-p tcp \-\-dport 443 \-j ACCEPT" # Ensure some rules are not present anymore __iptables_rule munin \-\-rule "\-A INPUT \-p tcp \-\-dport 4949 \-j ACCEPT" \e \-\-state absent .ft P .fi .UNINDENT .UNINDENT .SH SEE ALSO .sp \fBcdist\-type__iptables_apply\fP(7), \fBiptables\fP(8) .SH AUTHORS .sp Nico Schottelius <\fI\%nico\-cdist\-\-@\-\-schottelius.org\fP> .SH COPYING .sp Copyright (C) 2013 Nico Schottelius. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. .SH COPYRIGHT ungleich GmbH 2019 .\" Generated by docutils manpage writer. .