All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: remove duplicate rules
@ 2005-11-28 17:15 Derick Anderson
  2005-11-28 23:50 ` /dev/rob0
  0 siblings, 1 reply; 6+ messages in thread
From: Derick Anderson @ 2005-11-28 17:15 UTC (permalink / raw)
  To: netfilter

 

> -----Original Message-----
> From: netfilter-bounces@lists.netfilter.org 
> [mailto:netfilter-bounces@lists.netfilter.org] On Behalf Of 
> Oleg A. Arkhangelsky
> Sent: Saturday, November 26, 2005 7:55 AM
> To: netfilter@lists.netfilter.org
> Subject: Re: remove duplicate rules
> 
> Hello amit,
> 
> Saturday, November 26, 2005, 3:39:14 PM, you wrote:
> 
> ap> same iptables.  I want to stop this , if the same rule exists the 
> ap> iptables should give some error or should add the same 
> rule again .
> ap> Please help me .
> 
>     I think you should manually check the existence of possible
>     duplicate before adding rule. Also you can do somethig like:
> 
>     iptables -D INPUT -d 192.168.0.2/32 -i eth1 -j DROP
>     iptables -A INPUT -d 192.168.0.2/32 -i eth1 -j DROP
> 
>     Then you will never get duplicates.
>     But the first way is more correct.
> 
> --
> Best regards,
>  Oleg
> 

Just don't use that method remotely.

Derick Anderson


^ permalink raw reply	[flat|nested] 6+ messages in thread
* remove duplicate rules
@ 2005-11-26 12:39 amit pasari
  2005-11-26 12:55 ` Oleg A. Arkhangelsky
  0 siblings, 1 reply; 6+ messages in thread
From: amit pasari @ 2005-11-26 12:39 UTC (permalink / raw)
  To: netfilter

hello,
i have been using iptables for quite sometime , Now my problem is , if by 
make i add multiple type of same rule in iptables it accepts N number of 
entries . So can any body tell me how to aviod that or can i check the same 
rule exists before Appending it into the table.
Eg : iptables -A INPUT -d 192.168.0.2/32 -i eth1 -j DROP
i have add the above rules 10 times 20 times but the system never says the 
above rule exist . Can anybody tell me how can i check or aviod .

My issue is not the performance point !! Actually i am running some scripts 
with add rules when user login and which delete some rules when they log 
out .  But some times this scripts mal performs and the entries doesn't get 
deleted  OR added . and the user again logs in it add one more rule to the 
same iptables.  I want to stop this , if the same rule exists the iptables 
should give some error or should add the same rule again .
Please help me .


thanks in advance .

amit





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

end of thread, other threads:[~2005-11-29 19:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-28 17:15 remove duplicate rules Derick Anderson
2005-11-28 23:50 ` /dev/rob0
2005-11-29 19:28   ` Steven M Campbell
  -- strict thread matches above, loose matches on Subject: below --
2005-11-26 12:39 amit pasari
2005-11-26 12:55 ` Oleg A. Arkhangelsky
2005-11-28 13:19   ` John A. Sullivan III

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.