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

Re: -- Snort --



Le dim 05/05/2002 à 02:24, Stef a écrit :
> Bonsoir,

Bonjour,

> J'en profite pour demander si la variable HOME_NET doit être impérativement 
> définie avec la valeur de l'ip su r laquelle on est connecté à l'internet 
> (je crains moins des tentatives d'attaques depuis mon réseau interne).
> Si oui, un problème se posera au mieux toutes les 36 heures lorsque mon 
> provider me déconectera et que ma linux relancera la connection et que 
> j'aurai une nouvelle ip (je n'ai jamais fait de script sophistiqué et je ne 
> suis pas capable à l'heure actuelle de faire un script qui va lire mon ip 
> sur ppp0 grâce au résultat de la commande ifconfig et de relancer snort 
> avec ces nouveaux parametres...)

Sur ma vieille patate, il y a tout ce qu'il faut pour lancer snort à la
connexion, mais j'ai certainement modifié le script de ip-up.d/ (ces
scripts reçoivent les paramètres de la connexion établie, RTFM) :

chips@b52:~$ cat /etc/debian_version 
2.2

chips@b52:~$ COLUMNS=80 dpkg -l snort
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  snort          1.5.1-11       flexible packet sniffer/logger that detects 

chips@b52:~$ cat /etc/snort/snort.conf
# This file is used for options that are changed by Debian to leave
# the original lib files untouched.
# You have to use "dpkg-reconfigure snort" to change them.

DEBIAN_SNORT_STARTUP=dialup
DEBIAN_SNORT_HOME_NET=""
DEBIAN_SNORT_OPTIONS=" -p -A full -d -e"
DEBIAN_SNORT_STATS_RCPT="root"
DEBIAN_SNORT_STATS_TRESHOLD="1"

# EOF

chips@b52:~$ cat /etc/ppp/ip-up.d/snort 
#!/bin/sh -e

CONFIG=/etc/snort/snort.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

start-stop-daemon --start --quiet --exec /usr/sbin/snort -- \
	-D \
	-S "HOME_NET=$PPP_LOCAL/32" \
	-h "$PPP_LOCAL/32" \
	-c /etc/snort/snort-lib \
	-l /var/log/snort/ \
	-s \
	$DEBIAN_SNORT_OPTIONS \
	-i $PPP_IFACE \
	>/dev/null

exit 0

HTH.

-- 
Christophe «CHiPs» PETIT <chips@chips.fr.eu.org> http://chips.free.fr/
Linux-Nantes: partagez votre savoir http://www.linux-nantes.fr.eu.org/
Debian: When Code Matters More Than Commercials http://www.debian.org/  
[Le mariage est un dîner qui commence par le dessert. Jules Sandeau]


--
To UNSUBSCRIBE, email to debian-user-french-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: