Erlang Mailing Lists

Author Message

<  Yaws mailing list  ~  Setting a blacklist IP addresses

Guest
Posted: Sun Dec 06, 2009 8:26 pm Reply with quote
Guest
Hi All,
is there a way to set a balcklist of IP addresses, so when one of them
trys to get into a web page will receive a predifined message?
Thank you!
--
Jilani KHALDI
---------------------
http://www.iiiaugusta.com

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
Guest
Posted: Sun Dec 06, 2009 9:23 pm Reply with quote
Guest
Jilani Khaldi wrote:
> Hi All,
> is there a way to set a balcklist of IP addresses, so when one of them
> trys to get into a web page will receive a predifined message?
> Thank you!

Depends on what you mean by "you" above.

If "you" is the http client, you must either hack yaws (easy hack)
or have an appmod manage all content.

If "you" is the person that runs the website, I'd do this with
iptables - something along the lines of:


#!/bin/sh



log() {
if test -x "$LOGGER"; then
logger -p info "$1"
fi
}

LOGGER="/usr/bin/logger"
IPTABLES="/sbin/iptables"

$IPTABLES -p tcp -s $BADIP -j LOG --log-prefix "Dumping bad backet from $BADIP"
$IPTABLES -p tcp -s $BADIP -j DROP



/klacke






------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

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
You can attach files in this forum
You can download files in this forum