Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ADSL/PPPoE and OpenSwan with Snort
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
tomatopi
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2005
Posts: 130
Location: Ottawa

PostPosted: Wed Feb 08, 2006 3:17 pm    Post subject: ADSL/PPPoE and OpenSwan with Snort Reply with quote

I use OpenSwan/IPSec for VPN and Snort for intrusion detection on my ADSL connection. However, I notice that if the ADSL link goes down and comes back up ppp0 is destroyed and then re-created. This breaks both the VPN connection and crashes Snort. I put the following lines at the end of my /etc/ppp/if-up file:

Code:

/etc/init.d/ipsec restart
pid_length=`pidof -x snort | awk '{print length($0)}'`
if [ "$pid_length" != "0" ]
then
        /etc/init.d/snort restart
else
        /etc/init.d/snort zap
        /etc/init.d/snort start
fi


That seems to work, but I was wondering if there is a better or more elegant solution. I added the if/else because sometimes snort would be able shutdown cleanly, but sometimes snort would die and I needed a zap to get it to restart.

Thanks

Peter
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum