From: Ramin Alidousti <ramin@cannon.eng.us.uu.net>
To: Christian Seberino <seberino@spawar.navy.mil>
Cc: Ed Street <blacknet@simplyaquatics.com>, netfilter@lists.samba.org
Subject: Re: iptables -F & iptables -X good enough *for all* tables/chains?
Date: Mon, 24 Jun 2002 16:27:12 -0400 [thread overview]
Message-ID: <20020624202712.GG26150@cannon.eng.us.uu.net> (raw)
In-Reply-To: <20020624125713.A3624@spawar.navy.mil>
If you don't specify the '-t' then it will be '-t filter' by default.
Follow the following, it should give you the insight you need:
root@localhost# iptables -N test
root@localhost# iptables -A test -j DNAT --to 10.100.100.100
iptables: Invalid argument
root@localhost# iptables -A test -t nat -j DNAT --to 10.100.100.100
iptables: No chain/target/match by that name
root@localhost# iptables -X test
root@localhost# iptables -N test -t nat
root@localhost# iptables -A test -j DNAT --to 10.100.100.100
iptables: No chain/target/match by that name
root@localhost# iptables -A test -t net -j DNAT --to 10.100.100.100
root@localhost#
Ramin
On Mon, Jun 24, 2002 at 12:57:13PM -0700, Christian Seberino wrote:
> Ed
>
> Thanks for the reply. I can accept that -F is necessary
> *for every single table separately*.
>
> User defined chains are *not* tied to specific tables
> as far as I can tell. Is there any value in doing
>
> iptables -t nat -X
> iptables -t mangle -X
> iptables -t filter -X
>
> rather than just iptables -X???
>
> Linux Firewalls book has the three line method instead if iptables -X.
>
> Chris
>
>
> On Mon, Jun 24, 2002 at 02:47:50PM -0400, Ed Street wrote:
> > Hello,
> >
> > Well first off the regular expression of Iptables -F will NOT flush the
> > specific tables i.e. nat/manglefilter. However, if you are NOT using
> > those tables it's pointless to -F as there's nothing there. In general
> > it's a good idea and a good habit to get into using.
> >
> > To test your theory you need some rules in any of those three tables.
> > Do the iptables -F and then run iptables -t nat -L -n you will see the
> > rules are still there.
> >
> > Ed
> >
> > -----Original Message-----
> > From: netfilter-admin@lists.samba.org
> > [mailto:netfilter-admin@lists.samba.org] On Behalf Of Christian Seberino
> > Sent: Monday, June 24, 2002 2:41 PM
> > To: netfilter@lists.samba.org
> > Subject: iptables -F & iptables -X good enough *for all* tables/chains?
> >
> > iptables -F
> > iptables -X
> >
> > These simple 2 lines seem good enough to
> > nuke *all* rules and *all* user defined chains.....
> >
> > Yet, in print (like Linux Firewalls book) I often
> > see people wanting to apply -F and -X to
> > *every single table one by one*
> >
> > (e.g. iptables -t nat -F
> > iptables -t filter -F
> > iptables -t mangle -F
> > etc.)
> >
> > Am I missing something? My simple 2 lines above
> > seem good enough to do the trick.
> >
> > Chris
> > --
> > _______________________________________
> >
> > Dr. Christian Seberino
> > SPAWAR Systems Center San Diego
> > Code 2363
> > 53560 Hull Street
> > San Diego, CA 92152-5001
> > U.S.A.
> >
> > Phone: (619) 553-7940
> > Fax: (619) 553-2836
> > Email: seberino@spawar.navy.mil
> > _______________________________________
> >
>
> --
> _______________________________________
>
> Dr. Christian Seberino
> SPAWAR Systems Center San Diego
> Code 2363
> 53560 Hull Street
> San Diego, CA 92152-5001
> U.S.A.
>
> Phone: (619) 553-7940
> Fax: (619) 553-2836
> Email: seberino@spawar.navy.mil
> _______________________________________
next prev parent reply other threads:[~2002-06-24 20:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-24 18:41 iptables -F & iptables -X good enough *for all* tables/chains? Christian Seberino
2002-06-24 18:45 ` Default DROP policy for mangle and nat in iptables necessary/wise? Christian Seberino
2002-06-24 19:02 ` Ed Street
2002-06-24 23:36 ` Christian Seberino
2002-06-25 0:11 ` Ramin Alidousti
2002-06-24 18:47 ` iptables -F & iptables -X good enough *for all* tables/chains? Ed Street
2002-06-24 19:57 ` Christian Seberino
2002-06-24 20:27 ` Ramin Alidousti [this message]
2002-06-24 20:34 ` Antony Stone
2002-06-24 21:20 ` Patrick Schaaf
2002-06-24 21:19 ` Ramin Alidousti
2002-06-25 6:04 ` Patrick Schaaf
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=20020624202712.GG26150@cannon.eng.us.uu.net \
--to=ramin@cannon.eng.us.uu.net \
--cc=blacknet@simplyaquatics.com \
--cc=netfilter@lists.samba.org \
--cc=seberino@spawar.navy.mil \
/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