1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-03-30 19:23:56 +08:00

feat(firewalld): add function for backup

This commit is contained in:
Hanashiko 2025-05-25 12:58:54 +03:00
parent 095ac3ca8f
commit c9d265986a

View File

@ -15,3 +15,10 @@ function fwl () {
echo 'Direct Rules:'
sudo firewall-cmd --direct --get-all-rules
}
function fwbackup() {
sudo firewall-cmd --runtime-to-permanent
mkdir -p ~/firewall-backup
sudo cp /etc/firewalld/zones/* ~/firewall-backup/
echo "Backup saved to ~/firewall-backup/"
}