[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ip-up und ip-down funktionieren nicht richtig



Am Donnerstag, 7. November 2002 16:43 schrieb Christoph Kampe:
> Hi,
>
> On  06.Nov 22.09, Gerhard Gaussling wrote:
> > Am Mittwoch, 6. November 2002 21:49 schrieb Gerhard Gaussling:
> > > Nach poff -a bleibt ppp0 aktiv. Er ist nur mit kill -9 pid zu
> > > killen.
>
> Das hier:
> > database: Closing mysql connection to database "snort"
> > Snort received signal 3, exiting
> > /etc/ppp/ip-up.d/0snort: line 24: -D: command not found
>
> kommt hier her:
> > aus /etc/pppp/ip-up.d/0snort:
> > #!/bin/sh -e
> >
> >         -D \
>
> warum steht das da so alleine?

Weil ich den Rest nicht mailen wollte:
#!/bin/sh -e
CONFIG=/etc/snort/snort.debian.conf

test -f /usr/sbin/snort || exit 0

test -f $CONFIG && . $CONFIG

test "$DEBIAN_SNORT_STARTUP" = "dialup" || exit 0

# to find the lib files
cd /etc/snort

/sbin/start-stop-daemon --start --pidfile 
/var/run/snort/snort_$PPP_IFACE.pid  --exec /usr/sbin/snort -- \

        -D \
        -S "HOME_NET=$PPP_LOCAL/32" \
        #-h localhost
        -h "$PPP_LOCAL/32" \
        -c /etc/snort/snort.conf \
        -l /var/log/snort/ \
        -b \
        CAL
        -d \
        -u snort \
        -g snort \
        -i $PPP_IFACE \
        $DEBIAN_SNORT_OPTIONS \
        >/dev/null

exit 0

Das -D steht für den daemon-mode, in den ich snort nicht bekomme:
 man snort | grep -1 -e -D

       -D     Run   Snort   in   daemon   mode.    Alerts    are    
sent    to
              /var/log/snort/alert unless otherwise specified.


> ausserdem hattest du wohl noch ein par Variablen in
> /etc/ppp/ip-up vergessen:
> [...]
> run-parts /etc/ppp/ip-up.d

Nein, bei mir steht da:

# The  environment is cleared before executing this script
# so the path must be reset
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
export PATH
# These variables are for the use of the scripts run by run-parts
PPP_IFACE="$1"
PPP_TTY="$2"
PPP_SPEED="$3"
PPP_LOCAL="$4"
PPP_REMOTE="$5"
PPP_IPPARAM="$6"
export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
[... dann die ganzen echos für das debug-logging... und dann:]
run-parts /etc/ppp/ip-up.d 2>&1 | tee >> 
/var/log/ip-up.run-parts.log

> Zu dem abstürzenden und nur mit kill -9 zu entfernenden pppd kann
> ich leider nix sagen :-(

Ich habe den Verdacht, es könnte an dem promiscuous mode liegen, da 
snort nicht beendet wird.

Ich weiß nicht, was da alles schief läuft.
Jedenfalls, wenn ich auf der konsole echo $DEBIAN_SNORT_STARTUP 
eingebe kommt da auch nichts, wie schon bei $PPP_IFACE.

ciao

gerhard



Reply to: