From 20237243709f768539a01c404df781269cd7a9f5 Mon Sep 17 00:00:00 2001 From: Gregory Colpart Date: Wed, 25 Sep 2019 15:10:47 +0200 Subject: [PATCH] Add dump iptables / pf --- zzz_evobackup | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zzz_evobackup b/zzz_evobackup index e2a20a0..d0225f0 100755 --- a/zzz_evobackup +++ b/zzz_evobackup @@ -261,6 +261,10 @@ if [ "${LOCAL_TASKS}" = "1" ]; then fdisk -l "/dev/${disk}" > "${LOCAL_BACKUP_DIR}/partitions-${disk}" done cat ${LOCAL_BACKUP_DIR}/partitions-* > ${LOCAL_BACKUP_DIR}/partitions + + ## Dump iptables + test -x /sbin/iptables && /sbin/iptables -L -n -v > ${LOCAL_BACKUP_DIR}/iptables.txt && /sbin/iptables -t filter -L -n -v >> ${LOCAL_BACKUP_DIR}/iptables.txt + else ## Dump network connections with netstat netstat -finet -atn > ${LOCAL_BACKUP_DIR}/netstat.out @@ -270,6 +274,10 @@ if [ "${LOCAL_TASKS}" = "1" ]; then ## Dump MBR / table partitions ##disklabel sd0 > ${LOCAL_BACKUP_DIR}/partitions + + ## Dump pf infos + pfctl -sa |> ${LOCAL_BACKUP_DIR}/pfctl-sa.txt + fi ## Dump rights