tomatopi Tux's lil' helper
Joined: 18 Sep 2005 Posts: 130 Location: Ottawa
|
Posted: Wed Feb 08, 2006 3:17 pm Post subject: ADSL/PPPoE and OpenSwan with Snort |
|
|
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 |
|