When the docker-demon starts it adds a couple of rules to iptables.
When all rules are deleted via iptables -F
i have to stop and restart the docker demon to r
If you're running Ubuntu on the host, you can use the iptables-save
utility to save the iptables rules to a file after you start the docker daemon. Then, once you flush the old rules, you can simply restore the original docker rules using iptables-restore
& the saved rules file.
If you don't want to restore all the old iptables rules, you can alter the saved rules file to keep only the ones you need.
If you're running another operating system, you might find a similar alternative.