Linux Netfilter discussions
 help / color / mirror / Atom feed
* Help deleting a rule
@ 2009-11-16 21:39 Cameron Smith
  2009-11-16 21:45 ` Mart Frauenlob
  2009-11-17 13:10 ` Paul Evans
  0 siblings, 2 replies; 3+ messages in thread
From: Cameron Smith @ 2009-11-16 21:39 UTC (permalink / raw)
  To: netfilter

Hello,

If I run:
iptables -L -n -v |grep xx.xx.xx.xx

I get:
112  6272 DROP       all  --  eth+   *       xx.xx.xx.xx         0.0.0.0/0

I want to delete this specific rule.
From what is printed above how do I know what line this is to use this command?

iptables -D INPUT x

Where x is the line number?

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

* Re: Help deleting a rule
  2009-11-16 21:39 Help deleting a rule Cameron Smith
@ 2009-11-16 21:45 ` Mart Frauenlob
  2009-11-17 13:10 ` Paul Evans
  1 sibling, 0 replies; 3+ messages in thread
From: Mart Frauenlob @ 2009-11-16 21:45 UTC (permalink / raw)
  To: netfilter

Cameron Smith wrote:
> Hello,
>
> If I run:
> iptables -L -n -v |grep xx.xx.xx.xx
>
> I get:
> 112  6272 DROP       all  --  eth+   *       xx.xx.xx.xx         0.0.0.0/0
>
> I want to delete this specific rule.
> >From what is printed above how do I know what line this is to use this command?
>
> iptables -D INPUT x
>
> Where x is the line number?
>   

iptables -h

look for --line-numbers



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

* Re: Help deleting a rule
  2009-11-16 21:39 Help deleting a rule Cameron Smith
  2009-11-16 21:45 ` Mart Frauenlob
@ 2009-11-17 13:10 ` Paul Evans
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Evans @ 2009-11-17 13:10 UTC (permalink / raw)
  To: Cameron Smith; +Cc: netfilter

[-- Attachment #1: Type: text/plain, Size: 658 bytes --]

On Mon, 16 Nov 2009 13:39:38 -0800
Cameron Smith <velvetpixel@gmail.com> wrote:

> Hello,
> 
> If I run:
> iptables -L -n -v |grep xx.xx.xx.xx
> 
> I get:
> 112  6272 DROP       all  --  eth+   *       xx.xx.xx.xx
> 0.0.0.0/0
> 
> I want to delete this specific rule.
> From what is printed above how do I know what line this is to use
> this command?
> 
> iptables -D INPUT x
> 
> Where x is the line number?

Or you can -D based on the specification of the rule

 iptables -D INPUT -o eth+ -s xx.xx.xx.xx -j DROP

-- 
Paul Evans <paul@mxtelecom.com>
Tel: +44 (0) 845 666 7778
Fax: +44 (0) 870 163 4694
http://www.mxtelecom.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

end of thread, other threads:[~2009-11-17 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-16 21:39 Help deleting a rule Cameron Smith
2009-11-16 21:45 ` Mart Frauenlob
2009-11-17 13:10 ` Paul Evans

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