mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
feat(firewalld): add function for backup
This commit is contained in:
parent
095ac3ca8f
commit
c9d265986a
1 changed files with 7 additions and 0 deletions
|
|
@ -15,3 +15,10 @@ function fwl () {
|
||||||
echo 'Direct Rules:'
|
echo 'Direct Rules:'
|
||||||
sudo firewall-cmd --direct --get-all-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/"
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue