3 # (C) 2009 Mika Ilmaranta <ilmis@nullnet.fi>
4 # (C) 2009 Tom Eastep <teastep@shorewall.net>
25 if [ -f /usr
/share
/shorewall-lite
/lib.base
]; then
26 VARDIR
=/etc
/shorewall-lite
/state
27 STATEDIR
=/etc
/shorewall-lite
29 VARDIR
=/var
/lib
/shorewall
30 STATEDIR
=/etc
/shorewall
33 [ -f ${STATEDIR}/vardir
] && .
${STATEDIR}/vardir
35 cat <<EOM | ssmtp ${WARN_EMAIL}
36 Subject: "LSM: ${NAME} ${STATE}, DEV ${DEVICE}"
40 Your connection ${NAME} has changed it's state to ${STATE} at ${DATE}.
42 Following parameters were passed:
48 warn_email = ${WARN_EMAIL}
52 replied = ${REPLIED} packets replied
53 waiting = ${WAITING} packets waiting for reply
54 timeout = ${TIMEOUT} packets that have timed out (= packet loss)
55 reply_late = ${REPLY_LATE} packets that received a reply after timeout
56 cons_rcvd = ${CONS_RCVD} consecutively received replies in sequence
57 cons_wait = ${CONS_WAIT} consecutive packets waiting for reply
58 cons_miss = ${CONS_MISS} consecutive packets that have timed out
59 avg_rtt = ${AVG_RTT} average rtt, notice that waiting and timed out packets have rtt = 0 when calculating this
65 if [ ${STATE} = up
]; then
66 echo 0 > ${VARDIR}/${DEVICE}.status
# Uncomment this line if you are running Shorewall 4.4.x or earlier
67 ${VARDIR}/firewall
enable ${DEVICE}
69 echo 1 > ${VARDIR}/${DEVICE}.status
# Uncomment this line if you are running Shorewall 4.4.x or earlier
70 ${VARDIR}/firewall disable
${DEVICE}
73 /sbin
/shorewall-lite show routing
> /var
/log
/lsm