Networking Forums

Networking Forums > Computer Networking > Linux Networking > Deleting a rule created with IPTables

Reply
Thread Tools Display Modes

Deleting a rule created with IPTables

 
 
Steven Jones
Guest
Posts: n/a

 
      11-18-2005, 08:21 PM
An IPtables rule was created in one of my boxes using the following
command:

/usr/sbin/iptables -t nat -D PREROUTING 1 -i eth0 -p udp --dport
4088:4090 -j DNAT --to-dest 192.168.0.4

How can it be deleted? No matter what I do, iptables -L keeps reporting
this rule as still available.

 
Reply With Quote
 
 
 
 
Robert
Guest
Posts: n/a

 
      11-19-2005, 12:27 AM
On Fri, 18 Nov 2005 21:21:12 +0000, Steven Jones wrote:

> An IPtables rule was created in one of my boxes using the following
> command:
>
> /usr/sbin/iptables -t nat -D PREROUTING 1 -i eth0 -p udp --dport
> 4088:4090 -j DNAT --to-dest 192.168.0.4
>
> How can it be deleted? No matter what I do, iptables -L keeps reporting
> this rule as still available.


First do iptables -L and find out what line # it is that you want to
delete. Remember all chain rules start with the number 1. Then

iptables -D nat <rule #>

This will delete that line. After you are sure that is what you wanted to
delete save the new rule set.

I'm not sure how you load your rules so you are going to have to make sure
how you load them is fixed too.


--

Regards
Robert

Smile... it increases your face value!


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables rule Bonno Bloksma Linux Networking 6 03-06-2010 10:48 PM
iptables: rule with RETURN target just after a rule with ACCEPT target Neroku Linux Networking 0 04-25-2007 08:13 AM
iptables: rule with RETURN target after a rule with the ACCEPT target Neroku Linux Networking 0 04-24-2007 08:43 PM
Iptables rule ID drg Linux Networking 3 02-22-2006 02:24 AM
Deleting rule by pref? Alfred Landrum Linux Networking 0 07-10-2003 04:37 PM



1 2 3 4 5 6 7 8 9 10 11