Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean rules from builtin chain with flush error. #292

Open
crazy-canux opened this issue Nov 27, 2019 · 3 comments
Open

clean rules from builtin chain with flush error. #292

crazy-canux opened this issue Nov 27, 2019 · 3 comments

Comments

@crazy-canux
Copy link

this is not working.

 for chain in self.table.chains:
        if chain.is_builtin():
              chain.flush()
@ldx
Copy link
Owner

ldx commented Nov 27, 2019

Can you elaborate? Any error messages you get?

@crazy-canux
Copy link
Author

No error.
Looks everything works fine.
but the all rules still exist.

@jllorente
Copy link
Collaborator

jllorente commented Jan 30, 2021

Hi @crazy-canux ,
Is it possible that you have added your rules with an iptables version that uses nf_tables ?
I have come across this issue with recent versions of iptables package and the solution has been to use iptables-legacy instead :)

# iptables --version
iptables v1.8.2 (nf_tables)
# iptables-legacy --version
iptables v1.8.2 (legacy)

Please paste the results of these 4 commands:

# iptables --version
# iptables-legacy --version
# iptables-save
# iptables-legacy-save

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants