Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Покотиленко Костик" <casper@meteor.dp.ua>
To: "TinyApps.Org" <miles@tinyapps.org>
Cc: netfilter@lists.netfilter.org
Subject: Re: Question about /etc/iptables.down.rules
Date: Mon, 27 Aug 2007 10:52:11 +0300	[thread overview]
Message-ID: <1188201131.13621.3.camel@localhost.localdomain> (raw)
In-Reply-To: <1224801D-F4F1-40D1-8C8C-94C14C3C38EC@tinyapps.org>

В Вск, 26/08/2007 в 15:51 -1000, TinyApps.Org пишет:
> I have a very simple set of iptables rules:
> 
> # iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
> # iptables -A INPUT -p tcp -i eth0 --dport ssh -j ACCEPT
> # iptables -I INPUT -i lo -j ACCEPT
> # iptables -A INPUT -j DROP
> 
> which has been saved to /etc/iptables.up.rules .
> 
> I have also modified /etc/network/interfaces to use the ruleset:
> 
>             iface eth0 inet static
>                     address x.x.x.x
>                     [.. interface configuration ..]
>                     pre-up iptables-restore < /etc/iptables.up.rules
> 
> I understand that it is best to setup a set of rules to be applied
> when the network interface is down, saving it to:
> 
>   /etc/iptables.down.rules
> 
> and applying in /etc/network/interfaces via:
> 
> post-down iptables-restore < /etc/iptables.down.rules
> 
> What should this set of rules look like? The exact opposite
> of /etc/iptables.up.rules ? Or just a simple flush command?
> Or something else altogether?

You can do a simple flush, but this is not required, since all rules
will be overwritten by iptables-restore when you bring network interface
up next time.

-- 
Покотиленко Костик <casper@meteor.dp.ua>



  reply	other threads:[~2007-08-27  7:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27  1:51 Question about /etc/iptables.down.rules TinyApps.Org
2007-08-27  7:52 ` Покотиленко Костик [this message]
2007-08-27  8:01   ` TinyApps.Org
2007-08-27  8:42     ` Покотиленко Костик

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1188201131.13621.3.camel@localhost.localdomain \
    --to=casper@meteor.dp.ua \
    --cc=miles@tinyapps.org \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox