aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh/scripts/02_network.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cron-sh/scripts/02_network.sh')
-rwxr-xr-xcron-sh/scripts/02_network.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/cron-sh/scripts/02_network.sh b/cron-sh/scripts/02_network.sh
index b52f914..7e41d48 100755
--- a/cron-sh/scripts/02_network.sh
+++ b/cron-sh/scripts/02_network.sh
@@ -24,30 +24,30 @@ if [[ -f ${FIREWALL_TODAY} ]]; then
mv -f ${FIREWALL_TODAY} ${FIREWALL_YESTERDAY}
fi
-if [[ ${CHECK_OPEN_PORT} == yes ]]; then
+if check_is_enabled "${CHECK_OPEN_PORT}" ; then
netstat -pvlA inet,inet6 2> /dev/null > ${OPEN_PORT_TODAY};
Filter ${OPEN_PORT_TODAY} CHECK_OPEN_PORT
Count ${INFOS} ${OPEN_PORT_TODAY} "Total of open network ports"
fi
-if [[ ${CHECK_FIREWALL} == yes ]]; then
+if check_is_enabled "${CHECK_FIREWALL}" ; then
iptables -S 2>/dev/null > ${FIREWALL_TODAY}
Filter ${FIREWALL_TODAY} CHECK_FIREWALL
Count ${INFOS} ${FIREWALL_TODAY} "Total of configured firewall rules"
fi
### Changed open port
-if [[ ${CHECK_OPEN_PORT} == yes ]]; then
+if check_is_enabled "${CHECK_OPEN_PORT}" ; then
Diffcheck ${OPEN_PORT_TODAY} ${OPEN_PORT_YESTERDAY} ${OPEN_PORT_DIFF} "network listening ports"
fi
### Changed firewall
-if [[ ${CHECK_FIREWALL} == yes ]]; then
+if check_is_enabled "${CHECK_FIREWALL}" ; then
Diffcheck ${FIREWALL_TODAY} ${FIREWALL_YESTERDAY} ${FIREWALL_DIFF} "firewall rules"
fi
### Dump a list of open port.
-if [[ ${CHECK_OPEN_PORT} == yes ]]; then
+if check_is_enabled "${CHECK_OPEN_PORT}" ; then
if [[ -s ${OPEN_PORT_TODAY} ]]; then
printf "\nThese are the ports listening on your machine :\n" >> ${SECURITY}
cat ${OPEN_PORT_TODAY} >> ${SECURITY}
@@ -55,7 +55,7 @@ if [[ ${CHECK_OPEN_PORT} == yes ]]; then
fi
### Check if network is in promisc mode
-if [[ ${CHECK_PROMISC} == yes ]]; then
+if check_is_enabled "${CHECK_PROMISC}" ; then
export SECURITY
/usr/share/msec/promisc_check.sh
fi