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.
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.