LINUX: IPTABLES Command To Save/Backup And Restore Iptables Rules
For backing up iptables rules
sudo iptables-save > /tmp/iptables-rules.txt
For Restoring the iptables rules, below are commands.
# Overwrite the current rules
sudo iptables-restore < /tmp/iptables-rules.txt
# Add the new rules keeping the existing ones
sudo iptables-restore -n < /tmp/iptables-rules.txt
No comments:
Post a Comment