Linux Netfilter discussions
 help / color / mirror / Atom feed
* Re: how to delete a piece of rule in iptables?
  2002-12-18 12:30 how to delete a piece of rule in iptables? bobo
@ 2002-12-18 11:18 ` Marcello Scacchetti
  2002-12-18 13:52 ` ITM CS Ruslan O. Nesterov
  1 sibling, 0 replies; 4+ messages in thread
From: Marcello Scacchetti @ 2002-12-18 11:18 UTC (permalink / raw)
  To: bobo; +Cc: netfilter@lists.netfilter.org, bobowd@sohu.com

Hi,
you can use iptables -D or -X or -F. -D to delete a single rule, -X do
detele a chain and -F to flush all rules from a chain.
Refer to man 8 iptables for details and examples.

Marcello

Il mer, 2002-12-18 alle 13:30, bobo ha scritto:
>              i have insert some rules to iptables firewall.now,i would 
> like to delete it  .
> but i only know to use iptalbes -L to empty them.
> but it lead to delete all the rules in it.
> how to do ??
> 
-- 
Marcello Scacchetti <marcello.scacchetti@nextrem.it>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* how to delete a piece of rule in iptables?
@ 2002-12-18 12:30 bobo
  2002-12-18 11:18 ` Marcello Scacchetti
  2002-12-18 13:52 ` ITM CS Ruslan O. Nesterov
  0 siblings, 2 replies; 4+ messages in thread
From: bobo @ 2002-12-18 12:30 UTC (permalink / raw)
  To: netfilter@lists.netfilter.org; +Cc: bobowd@sohu.com

             i have insert some rules to iptables firewall.now,i would 
like to delete it  .
but i only know to use iptalbes -L to empty them.
but it lead to delete all the rules in it.
how to do ??




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to delete a piece of rule in iptables?
  2002-12-18 12:30 how to delete a piece of rule in iptables? bobo
  2002-12-18 11:18 ` Marcello Scacchetti
@ 2002-12-18 13:52 ` ITM CS Ruslan O. Nesterov
  2002-12-19  5:25   ` Narendra Prabhu. B
  1 sibling, 1 reply; 4+ messages in thread
From: ITM CS Ruslan O. Nesterov @ 2002-12-18 13:52 UTC (permalink / raw)
  To: netfilter @ lists . netfilter . org

Hello bobo,

Wednesday, December 18, 2002, 3:30:18 PM, you wrote:

b>              i have insert some rules to iptables firewall.now,i would 
b> like to delete it  .
b> but i only know to use iptalbes -L to empty them.
b> but it lead to delete all the rules in it.
b> how to do ??


Try to use
iptables -D INPUT 1
this will delete rule 1 in input chain

-- 
Best regards,
 ITM                            mailto:ruslan@complexsystem.ru




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: how to delete a piece of rule in iptables?
  2002-12-18 13:52 ` ITM CS Ruslan O. Nesterov
@ 2002-12-19  5:25   ` Narendra Prabhu. B
  0 siblings, 0 replies; 4+ messages in thread
From: Narendra Prabhu. B @ 2002-12-19  5:25 UTC (permalink / raw)
  To: ITM CS Ruslan O. Nesterov; +Cc: netfilter @ lists . netfilter . org


Hello,

There is a option --line-numbers, which can be used with -L in iptables.
Knowing the line/rule numbers ... u can later delete the specific rule.

Commands :

      #iptables -nL --line-numbers ---> this will show you the rulenumbers

      #iptables -D <chain-name> <rule-number>

Bye,
Narendra.


In the middle of difficulty..... lies Opportunity. (Albert Einstein)
--------------------------------------------------------------------
Narendra Prabhu. B             Free Software at its product-ive best.
DeepRoot Linux                             http://www.deeproot.co.in
                ---- Server Appliances ----
             ---- Linux Support and Services ----
-------------------------------------------------------------------

On Wed, 18 Dec 2002, ITM CS Ruslan O. Nesterov wrote:

> Hello bobo,
>
> Wednesday, December 18, 2002, 3:30:18 PM, you wrote:
>
> b>              i have insert some rules to iptables firewall.now,i would
> b> like to delete it  .
> b> but i only know to use iptalbes -L to empty them.
> b> but it lead to delete all the rules in it.
> b> how to do ??
>
>
> Try to use
> iptables -D INPUT 1
> this will delete rule 1 in input chain
>
> --
> Best regards,
>  ITM                            mailto:ruslan@complexsystem.ru




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-12-19  5:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-18 12:30 how to delete a piece of rule in iptables? bobo
2002-12-18 11:18 ` Marcello Scacchetti
2002-12-18 13:52 ` ITM CS Ruslan O. Nesterov
2002-12-19  5:25   ` Narendra Prabhu. B

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox