Skip to content

Instantly share code, notes, and snippets.

@gh0st026
Last active October 15, 2018 09:22
Show Gist options
  • Save gh0st026/8021ccdc1e148bb89e3f1baae50878b0 to your computer and use it in GitHub Desktop.
Save gh0st026/8021ccdc1e148bb89e3f1baae50878b0 to your computer and use it in GitHub Desktop.
Basic Commands for migrating iptables rules
# View iptables rules
sudo iptables -S
# Export iptables Rules
sudo iptables-save > iptables-export
# Import iptables rules
sudo iptables-restore < iptables-export
# Persist rules on reboot on ubuntu
sudo invoke-rc.d iptables-persistent save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment