do'h

On Fri, Mar 09, 2007 at 10:25:34AM -0600, Allen Rueter wrote:
> Un black list an address
> 
#!/bin/bash
# Usage: argv1= ip-address-to-remove
cd /usr/share/denyhosts

/etc/init.d/denyhosts stop

# rotate your log file, or it will just add them back unless you
# put them in allowed-hosts

for f in `grep -wl $1 data/* |egrep -v '(^allowed-hosts|\.bak$)'` 
  do echo $f 
    mv  $f ${f}.bak
    grep -v $1 ${f}.bak > $f
 done

/etc/init.d/denyhosts start
> -- 
> 
> Allen P. Rueter              314/935-6429 
> Camp Box 1045 Bryan Rm 509     ___ ___ ___
> Washington University         / __|_ _/ __|
> One Brookings Dr.            | (__ | |\__ \
> St. Louis MO  63130           \____|_|____/
> 
> 



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Denyhosts-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/denyhosts-user

Reply via email to