Article 5MVBD How to undo iptables flush in Debian?

How to undo iptables flush in Debian?

by
boughtonp
from LinuxQuestions.org on (#5MVBD)
On Debian Testing, I just accidentally cleared my iptables rules with "iptables -F" but I have not run "iptables save" so that shouldn't be permanent, right?

Relevant search results are saying "just restart the service", but I don't have a service.

I also can't locate any iptables-related files in /etc (beyond symlinks in /etc/alternatives pointing at /usr/sbin/iptables-nft; I've also checked for nft/nftables service and config but not found anything.)

I do have the output of "iptables -L" saved, so worst case I guess I can just re-enter every rule one-by-one by hand, but there's enough that I don't want to do that if it can be avoided.

There is an "iptables-restore" command, but I can't determine what format it expects the data to be in, nor whether it will put things back to how they were or if it's solely for migrating to nftables.

latest?d=yIl2AUoC8zA latest?i=5pK5XxF0oq0:Vi6Z8x3AHes:F7zBnMy latest?i=5pK5XxF0oq0:Vi6Z8x3AHes:V_sGLiP latest?d=qj6IDK7rITs latest?i=5pK5XxF0oq0:Vi6Z8x3AHes:gIN9vFw5pK5XxF0oq0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments