[ic] Interchange and IPs

Mike Heins mike at perusion.com
Tue Oct 13 12:58:22 UTC 2009


Quoting Raymond Cheng (rayonnet at hotmail.com):
> 
> 
> 
> ----------------------------------------
> > From: chip_wood at comcast.net
> > Date: Tue, 13 Oct 2009 02:08:12 -0700
> > To: interchange-users at icdevgroup.org
> > Subject: [ic] Interchange and IPs
> >
> > A friend of mine runs a website using Interchange and unfortunately we
> > would like to ban a few IP addresses from accessing the website. I am
> > not familiar with Interchange other than the few functions I use for
> > moderating a forum. Is it possible to ban IP addresses using
> > Interchange or should I look into programs specifically made to do this?
> >
>  
> try iptables. it is a firewall with tons of features. Thank you.
>  

Yes indeed.

Here is a little shell script pair named lockout/allowin. The
lockout script:

#!/bin/sh 

# usage: lockout <ip-address-or-block>

for i in $*
do
    /sbin/iptables -I INPUT -s $i -j DROP
done

### end lockout ###

The allowin script:

#!/bin/sh 

# usage: allowin <ip-address-or-block>

for i in $*
do
    /sbin/iptables -D INPUT -s $i -j DROP
done

### end allowin ###

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.328.4479  <mike at perusion.com>

Research is what I'm doing when I don't know what I'm doing.
-- Wernher Von Braun



More information about the interchange-users mailing list