summaryrefslogtreecommitdiffstats
path: root/archive/scriptlib/check_server_traffic.sh
diff options
context:
space:
mode:
Diffstat (limited to 'archive/scriptlib/check_server_traffic.sh')
-rwxr-xr-xarchive/scriptlib/check_server_traffic.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/archive/scriptlib/check_server_traffic.sh b/archive/scriptlib/check_server_traffic.sh
new file mode 100755
index 0000000..a9f0abf
--- /dev/null
+++ b/archive/scriptlib/check_server_traffic.sh
@@ -0,0 +1,7 @@
+#! /bin/bash
+
+all_in=`iptables -L traffic_in -n -v -x | grep -E "0\.0\.0\.0/0[[:space:]]+0\.0\.0\.0/0" | awk 'END { print $2}'`
+all_out=`iptables -L traffic_out -n -v -x | grep -E "0\.0\.0\.0/0[[:space:]]+0\.0\.0\.0/0" | awk 'END { print $2}'`
+all_forward=`iptables -L traffic_forward -n -v -x | grep -E "0\.0\.0\.0/0[[:space:]]+0\.0\.0\.0/0" | awk 'END { print $2}'`
+
+echo "$all_in $all_out $all_forward"