I used iptables -F
on my machine, and what can I do to recover the iptables into the default without rebooting my machine?
I restarted the iptables service and it failed, and I can't find iptables under /etc/sysconfig/iptables
The iptables-restore command is used to restore the iptables rule-set that was saved with the iptables-save command. It takes all the input from standard input and can't load from files as of writing this, unfortunately. This is the command syntax for iptables-restore:
iptables-restore [-c] [-n]
iptables-restore < /path/to/file
. Alternatively, use the iptables-apply
command.
grep -r "*filter" /etc/*
to find the files (generated by iptables-save)
Your system is probably using firewalld
, so you'll probably want to run systemctl restart firewalld
.