Deleting a rule created with IPTables

Discussion in 'Linux Networking' started by Steven Jones, Nov 18, 2005.

  1. Steven Jones

    Steven Jones Guest

    An IPtables rule was created in one of my boxes using the following

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

    How can it be deleted? No matter what I do, iptables -L keeps reporting
    this rule as still available.
    Steven Jones, Nov 18, 2005
    1. Advertisements

  2. Steven Jones

    Robert Guest

    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.



    Smile... it increases your face value!
    Robert, Nov 19, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.