Below is a ready-to-use script. Review and adapt variables to your environment.
#!/usr/bin/env bash iptables-save > /root/iptables-$(date +%F).rules # Restore: iptables-restore < /root/iptables-YYYY-MM-DD.rules
← Back to SQL