SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Technology Stocks : LINUX -- Ignore unavailable to you. Want to Upgrade?


To: Andy Thomas who wrote (2346)10/21/2000 6:31:01 PM
From: Thomas A Watson  Respond to of 2615
 
A few weeks back I noticed that someone was sniffing at my system. I did a google on security and download a couple of packages. I decided I liked portsentry and I started running it on my gateway. Anyway I noticed one day that portsentry had died and would not restart as listening ports were locked out.

So I restarted the gateway and got everything square and started using portsentry again.

I also decided to wtite a little script that test every 60 seconds that portsentry is alive. One of the little tricks I used is the use of wc -l to use the text out of a process as 0 for false and > 0 for true.

This is the simple script.
#! /bin/tcsh
@ i = 1
while ( $i )
set DATE = `date`
if (`ps aux |grep portsentry |wc -l`) then
echo $DATE portsentry is ACTIVE
else
echo portsentry is DEAD DEAD DEAD
endif
sleep 60
end
Note: if the process tested for is started with a long path the actual process name may be truncated.

Tom Watson tosiwmee