summaryrefslogtreecommitdiffstats
path: root/remote/check_server_traffic.sh
blob: a9f0abfb138f70e7e2edfa33631eda9fd808bbab (plain)
1
2
3
4
5
6
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"