| 1 |
.\" Title: iptables-apply |
| 2 |
.\" Author: Martin F. Krafft, GW |
| 3 |
.\" Date: May 10, 2010 |
| 4 |
.\" |
| 5 |
.TH IPTABLES\-APPLY 8 "" "iptables 1.8.13" "iptables 1.8.13" |
| 6 |
.SH NAME |
| 7 |
iptables-apply \(em a safer way to update iptables remotely |
| 8 |
.SH SYNOPSIS |
| 9 |
\fBiptables\-apply\fP [\-\fBhV\fP] [\fB-t\fP \fItimeout\fP] [\fB-w\fP \fIsavefile\fP] {[\fIrulesfile]|-c [runcmd]}\fP |
| 10 |
.SH "DESCRIPTION" |
| 11 |
.PP |
| 12 |
iptables\-apply will try to apply a new rulesfile (as output by |
| 13 |
iptables-save, read by iptables-restore) or run a command to configure |
| 14 |
iptables and then prompt the user whether the changes are okay. If the |
| 15 |
new iptables rules cut the existing connection, the user will not be |
| 16 |
able to answer affirmatively. In this case, the script rolls back to |
| 17 |
the previous working iptables rules after the timeout expires. |
| 18 |
.PP |
| 19 |
Successfully applied rules can also be written to savefile and later used |
| 20 |
to roll back to this state. This can be used to implement a store last good |
| 21 |
configuration mechanism when experimenting with an iptables setup script: |
| 22 |
iptables-apply \-w /etc/network/iptables.up.rules \-c /etc/network/iptables.up.run |
| 23 |
.PP |
| 24 |
When called as ip6tables\-apply, the script will use |
| 25 |
ip6tables\-save/\-restore and IPv6 default values instead. Default |
| 26 |
value for rulesfile is '/etc/network/iptables.up.rules'. |
| 27 |
.SH OPTIONS |
| 28 |
.TP |
| 29 |
\fB\-t\fP \fIseconds\fR, \fB\-\-timeout\fP \fIseconds\fR |
| 30 |
Sets the timeout in seconds after which the script will roll back |
| 31 |
to the previous ruleset (default: 10). |
| 32 |
.TP |
| 33 |
\fB\-w\fP \fIsavefile\fR, \fB\-\-write\fP \fIsavefile\fR |
| 34 |
Specify the savefile where successfully applied rules will be written to |
| 35 |
(default if empty string is given: /etc/network/iptables.up.rules). |
| 36 |
.TP |
| 37 |
\fB\-c\fP \fIruncmd\fR, \fB\-\-command\fP \fIruncmd\fR |
| 38 |
Run command runcmd to configure iptables instead of applying a rulesfile |
| 39 |
(default: /etc/network/iptables.up.run). |
| 40 |
.TP |
| 41 |
\fB\-h\fP, \fB\-\-help\fP |
| 42 |
Display usage information. |
| 43 |
.TP |
| 44 |
\fB\-V\fP, \fB\-\-version\fP |
| 45 |
Display version information. |
| 46 |
.SH "SEE ALSO" |
| 47 |
.PP |
| 48 |
\fBiptables-restore\fP(8), \fBiptables-save\fP(8), \fBiptables\fR(8). |
| 49 |
.SH LEGALESE |
| 50 |
.PP |
| 51 |
Original iptables-apply - Copyright 2006 Martin F. Krafft <[email protected]>. |
| 52 |
Version 1.1 - Copyright 2010 GW <[email protected] or http://gw.tnode.com/>. |
| 53 |
.PP |
| 54 |
This manual page was written by Martin F. Krafft <[email protected]> and |
| 55 |
extended by GW <[email protected] or http://gw.tnode.com/>. |
| 56 |
.PP |
| 57 |
Permission is granted to copy, distribute and/or modify this document |
| 58 |
under the terms of the Artistic License 2.0. |