my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
484 B

3 years ago
  1. alias fw="sudo firewall-cmd"
  2. alias fwp="sudo firewall-cmd --permanent"
  3. alias fwr="sudo firewall-cmd --reload"
  4. alias fwrp="sudo firewall-cmd --runtime-to-permanent"
  5. function fwl () {
  6. # converts output to zsh array ()
  7. # @f flag split on new line
  8. zones=("${(@f)$(sudo firewall-cmd --get-active-zones | grep -v 'interfaces\|sources')}")
  9. for i in $zones; do
  10. sudo firewall-cmd --zone $i --list-all
  11. done
  12. echo 'Direct Rules:'
  13. sudo firewall-cmd --direct --get-all-rules
  14. }