TechSpot

deleting rules on chains

By Adeyinka
Oct 10, 2003
  1. Hi,

    I would appreciate a response concerning this problem on my firewall machine

    I found out that some rules are already set on chains
    I flushed the chains, set my new rules and reboot the machine.

    typing iptables -L brought out the rules and userdefined chains I had already deleted.
    I have to cat /etc/sysconfig/iptables|iptable-restore before I can get my set rules.

    If I type iptables -L
    I will get my set rules, rebooting the m/c and typing
    iptables -L
    brings up the flushed rules again.
    I just noticed that if I do not reboot, I have my rules. But if do I have the old rules
    If i "cat /etc/sysconfig/iptables|iptable-restore
    I have my new rules
    However, if i type
    iptables -L
    without "cat /etc/sysconfig/iptables|iptable-restore
    I will end up with the old rule
    unless I firsts cat /etc/sysconfig/iptables|iptable-restore
    I would not be getting my new rules

    I feel this can bring up problem !

    Do I need to do re installation?
    or what are your sugg.

    :cool: :grinthumb
     
  2. MattG

    MattG TS Rookie Posts: 147

    You can flush the chains, and delete all rules by using

    iptables -F

    if you just wanna delete INPUT chain, use iptables -F INPUT
    or

    iptables -F FORWARD

    etc..

    That will get rid of all rules under that chain.
     
Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.