Gentoo Archives: gentoo-user

From: Jarry <mr.jarry@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] modifying iptables: how can I prevent locking me out?
Date: Mon, 24 Jan 2011 18:52:05
Message-Id: 4D3DC94F.4020904@gmail.com
1 Hi,
2
3 I have to change rather complex iptables rules on server
4 and I do not want to lock me out as this server is about
5 50 miles away. So how should I do it?
6
7 I can back up the old rules by running:
8 /etc/init.d/iptables save
9 and it will be saved to /var/lib/iptables/rules-save
10 (some strange format starting with number like [536:119208])
11
12 I prepared a script with new (modified) iptables-rules,
13 which I will run in bash. But in case I screw something,
14 how could I force netfilter to load old saved rules,
15 if I for whatever reason do not connect to server (ssh)?
16
17 Or can I load new iptables-rules for certain time, and
18 then force netfilter to load back the old rules again?
19
20 Jarry
21
22 --
23 _______________________________________________________________
24 This mailbox accepts e-mails only from selected mailing-lists!
25 Everything else is considered to be spam and therefore deleted.

Replies

Subject Author
Re: [gentoo-user] modifying iptables: how can I prevent locking me out? Mark Knecht <markknecht@×××××.com>
Re: [gentoo-user] modifying iptables: how can I prevent locking me out? "J. Roeleveld" <joost@××××××××.org>