Skip to content

Instantly share code, notes, and snippets.

@nleiva
Last active July 9, 2020 13:42
Show Gist options
  • Save nleiva/736d652a4a51c16639f2ee6e671f573e to your computer and use it in GitHub Desktop.
Save nleiva/736d652a4a51c16639f2ee6e671f573e to your computer and use it in GitHub Desktop.
tasks:
- name: Save current iptables rules
shell: iptables-save > /tmp/iptables-rules-backup.txt
- name: Schedule iptables-restore to execute in 20 minutes as root
at:
command: iptables-restore < /tmp/iptables-rules-backup.txt
count: 20
units: minutes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment