I think you mean this one:
#!/bin/sh
#
# (C) 2009,2013 Mika Ilmaranta <[email protected]>
# Copyright © 2009-2010 Tuomo Soini <[email protected]>
#
# License: GPLv2
#
#
# event handling script for use with shorewall multi-isp setup
# To be able to utilize this script you must have shorewall >= 4.4.23.3
#
STATE=${1}
NAME=${2}
CHECKIP=${3}
DEVICE=${4}
WARN_EMAIL=${5}
REPLIED=${6}
WAITING=${7}
TIMEOUT=${8}
REPLY_LATE=${9}
CONS_RCVD=${10}
CONS_WAIT=${11}
CONS_MISS=${12}
AVG_RTT=${13}
SRCIP=${14}
PREVSTATE=${15}
TIMESTAMP=${16}
DATE=$(/bin/date --date=@${TIMESTAMP})
if [ ${STATE} = up ]; then
state=0
action=enable
else
state=1
action=disable
fi
VARDIR=$(/sbin/shorewall show vardir)
echo $state > ${VARDIR:-/var/lib/shorewall}/${DEVICE}.status
sh ${VARDIR:-/var/lib/shorewall}/firewall ${action} ${DEVICE} \
>> /var/log/lsm 2>&1 \
|| sh ${VARDIR:-/var/lib/shorewall}/firewall restart >> /var/log/lsm
2>&1
/sbin/shorewall show routing >> /var/log/lsm
exit 0;
#EOF
On Mon, Mar 30, 2015 at 12:57 PM, Nico Pagliaro <[email protected]> wrote:
> a) Yes, it´s executable
> ll /etc/lsm/script
> -rwxrwxrwx. 1 root root 1724 Mar 25 14:19 /etc/lsm/script
>
> and this is where I call it in lsm.conf
> .
> .
> defaults {
> name=defaults
> checkip=127.0.0.1
> eventscript=/etc/lsm/script
> .
> .
>
> b) I use the script that is in this link
> http://www.shorewall.net/MultiISP.html#lsm
> I am using shorewal 4.6.7
> Where do I get the correct script?
>
> Thanks
>
>
> On Mon, Mar 30, 2015 at 12:41 PM, Tom Eastep <[email protected]>
> wrote:
>
>> On 3/30/2015 8:31 AM, Nico Pagliaro wrote:
>> > Mar 30 11:42:26 fw2 lsm[8481]: name = ANTEL, replied = 100, waiting = 0,
>> > timeout = 0, late reply = 0, cons rcvd = 100, cons wait = 0, cons miss =
>> ...
>> > Mar 30 11:44:32 fw2 lsm[10588]: cur->timeout_ms = "2000"
>> > Mar 30 11:44:32 fw2 lsm[10588]: cur->warn_email = "root"
>> > Mar 30 11:44:32 fw2 lsm[10588]: cur->check_arp = "0"
>> > Mar 30 11:44:32 fw2 lsm[10588]: cur->device = ""
>> > Mar 30 11:44:32 fw2 lsm[10588]: cur->ttl = "2"
>> > Mar 30 11:44:32 fw2 lsm[10588]: cur->status = "2"
>> >
>>
>> Two things:
>>
>> a) It doesn't look like /etc/lsm/script is being run. It *is*
>> executable, right? And it is the script named in the 'eventscript'
>> setting in /etc/lsm/lsm.conf, right?
>>
>> b) Unless you are running an older version of Shorewall (prior to
>> 4.4.23), you are using the wrong script. The correct script for current
>> Shorewall versions uses the 'enable' and 'disable' commands to change
>> the Shorewall configuration.
>>
>> -Tom
>> --
>> Tom Eastep \ When I die, I want to go like my Grandfather who
>> Shoreline, \ died peacefully in his sleep. Not screaming like
>> Washington, USA \ all of the passengers in his car
>> http://shorewall.net \________________________________________________
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website,
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub
>> for all
>> things parallel software development, from weekly thought leadership
>> blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Shorewall-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/shorewall-users
>>
>>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users