Here's what I use. You pass the IP address as a parameter and it unblocks
access. It does not edit the deny.hosts file, however.
Happy Thanksgiving!
===========================================================
[EMAIL PROTECTED] denyhosts]# cat unblock_script.sh
#!/bin/sh
echo -n `date '+%F %T - '` >> /var/log/denyhosts.log
# See if the address is being blocked...
if [[ `/sbin/iptables -L -n | grep $1 | wc -l` == 0 ]]
then
echo "$2 NOT unblocking $1 since it is not blocked" >>
/var/log/denyhosts.log
else
/sbin/iptables -D INPUT -s $1 -j DROP
/sbin/iptables -D FORWARD -s $1 -j DROP
echo "$2 unblocking $1" >> /var/log/denyhosts.log
fi
>>> George Cebulka <[EMAIL PROTECTED]> 11/25/2008 11:25 AM >>>
Hello All,
We are running denyhosts on one of our timesharing machines here at
the university where I work. From time to time, we are getting a false
positive and access is getting blocked. Does anybody have a script that
I can put under sudo control that will make the changes on the fly to
unblock an IP?
Or could somebody tell me what I would need to do write my own..
Thanks,
--
George Cebulka
Senior System Engineer
University of Pittsburgh
Network Operations Center
[EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Denyhosts-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/denyhosts-user
E-MAIL CONFIDENTIALITY NOTICE: This communication and any associated
file(s) may contain privileged, confidential or proprietary information
or be protected from disclosure under law ("Confidential Information").
Any use or disclosure of this Confidential Information, or taking any
action in reliance thereon, by any individual/entity other than the
intended recipient(s) is strictly prohibited. This Confidential
Information is intended solely for the use of the
individual(s) addressed. If you are not an intended recipient, you have
received this Confidential Information in error and have an obligation
to promptly inform the sender and permanently destroy, in its entirety,
this Confidential Information (and all copies thereof). E-mail is
handled in the strictest of confidence by Allied National, however,
unless sent encrypted, it is not a secure communication method and may
have been intercepted, edited or altered during transmission and
therefore is not guaranteed.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Denyhosts-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/denyhosts-user