LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-07-2004, 11:42 AM   #1
chil326
Member
 
Registered: Jul 2004
Location: Paris, France
Distribution: mandriva LE 2005
Posts: 86

Rep: Reputation: 15
snort crashes when i'm away


Hello everybody
i have problems with snort.
what happens is the following i guess :
when i'm away, i keep my linux box on. the problem seems to be that my ISP gives me a dynamic ip adress.
i suppose that the change of ip adress makes snort crashes. Or the other possibility is simply my box is compromised
what do you think?
what can i do to make snort survive to ip adress changes? if it is the reason it crashes and how to know the reason without any doubt ?
Thank you very much

/*----------------*/
i just checked the logs and here is what i found :

Sep 7 16:43:03 localhost snort: pcap_loop: recvfrom: Network is down
Sep 7 16:43:03 localhost snort: Snort exiting

and

Sep 7 16:43:36 localhost pppd[3206]: Using interface ppp0
Sep 7 16:43:36 localhost pppd[3206]: Connect: ppp0 <--> 8.35
Sep 7 16:43:40 localhost pppd[3206]: Couldn't set pass-filter in kernel: Invalid argument
Sep 7 16:43:40 localhost pppd[3206]: local IP address ###.###.###.### /* i masked the adress but it appears in clear in the log*/
Sep 7 16:43:40 localhost pppd[3206]: remote IP address 212.129.9.84
Sep 7 16:43:40 localhost pppd[3206]: primary DNS address 213.36.80.1
Sep 7 16:43:40 localhost pppd[3206]: secondary DNS address 213.36.80.1
############################################################

So, it seems that the change of ip adress really makes snort crash! how to resolve this problem??
Thanks

Last edited by chil326; 09-07-2004 at 12:01 PM.
 
Old 09-07-2004, 03:45 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Well, the only times I've ever used ppp0 was dial-up acnts, and most ISPs have a time limit on those, especially if you are not actively using it ie going out onto the 'net....
 
Old 09-07-2004, 04:34 PM   #3
sh1ft
Member
 
Registered: Feb 2004
Location: Ottawa, Ontario, Can
Distribution: Slackware, ubuntu
Posts: 391

Rep: Reputation: 32
If you are running snort on ppp0 then disconnect or the connection times out, snort while no longer be able to moniter that interface and will therefore stop. Just add the snort initialization line to the end of whatever script you use to connect so snort starts up automatically everytime you connect and you'll be all set.
 
Old 09-07-2004, 09:06 PM   #4
littleking
Member
 
Registered: Jun 2003
Location: New Albany, OH
Posts: 190

Rep: Reputation: 30
it misses you?
 
Old 09-08-2004, 01:22 AM   #5
chil326
Member
 
Registered: Jul 2004
Location: Paris, France
Distribution: mandriva LE 2005
Posts: 86

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by littleking
it misses you?
i don't think snort misses me, because as soons as i am away, this lazy thing doesn't want to do his job anymore...
so i conclude snort needs authority, he needs a boss to manage him

in france we have a sentence that i translate : " whent the cat is away, mouses dance"

Last edited by chil326; 09-08-2004 at 01:27 AM.
 
Old 09-08-2004, 06:26 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
In English:
"
While the cat's away,
The mice will play
"
because it rhymes
 
Old 09-08-2004, 01:51 PM   #7
chil326
Member
 
Registered: Jul 2004
Location: Paris, France
Distribution: mandriva LE 2005
Posts: 86

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by sh1ft
If you are running snort on ppp0 then disconnect or the connection times out, snort while no longer be able to moniter that interface and will therefore stop. Just add the snort initialization line to the end of whatever script you use to connect so snort starts up automatically everytime you connect and you'll be all set.
yes, i can add the snort re-initialization , but where?
that's my problem...: ) if i trust the logs, this is the daemon pppd who handles the stuff
but it is a binary... and it just looks very difficult to change pppd
thanks

Last edited by chil326; 09-08-2004 at 01:54 PM.
 
Old 09-08-2004, 02:53 PM   #8
SOpsMattW
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Rep: Reputation: 0
write a script that checks for the snort process and schedule it in cron to run every minute(?)..

<code>

#bash script to check for the snort process

if ! pgrep snort
then
#snort is not running
<put snort command here>

fi
</code>

then add the following line to /etc/crontab

*/1 * * * * root /path/to/the/above/script


This will run the above script every minute (as root so apply appropriate file permissions, this could be used to own your box if world writable!!). The script looks for any process with snort in the name. make it more specific if you have another process with snort in the name.
 
Old 09-08-2004, 03:24 PM   #9
sh1ft
Member
 
Registered: Feb 2004
Location: Ottawa, Ontario, Can
Distribution: Slackware, ubuntu
Posts: 391

Rep: Reputation: 32
or you could just write a wrapper script called connect or something and put it in /usr/sbin/:
Code:
#!/bin/sh
/path/to/ppd/
snort -D -c /etc/snort/snort.conf
(whatever your snort line is)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when starting up snort: bash:!/bin/sh/usr/local/bin/snort :Eent not found cynthia_thomas Linux - Software 1 11-11-2005 02:59 PM
snort failed: snort: symbol lookup error: undefined symbol: usmAES192PrivProtocol Emmanuel_uk Linux - Security 1 07-10-2005 10:29 AM
Help with Snort????? graystarr Linux - Security 4 04-19-2005 03:23 PM
Konqueror crashes, SuseWatcher crashes!!! bruno buys Linux - Newbie 9 10-07-2003 10:44 AM
snort snort.conf help crealkiller175 Linux - Software 1 03-08-2003 05:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration