[thelist] CFMX: IP Address Ban/Prevent

Joshua Olson joshua at waetech.com
Wed Feb 25 07:24:29 CST 2004

> -----Original Message-----
> From: Russ
> Sent: Tuesday, February 24, 2004 10:55 PM
> Thanks again for the assistance with the IP.  I've gotten a bit smarter
> and now what I do is simply display or not display the form elements
> that users can interract with based upon an IP address in the list.

If the users are typical, this should be enough to stop them.  If they are
advanced, then you might want to put the restriction on the processing page
as well to prevent them from making their own form.

> One of the things that's started to happen is that a certain IP address
> at the D class level (I hope I'm stating that correctly), and I'm
> wondering if there's a catch-all to basically say to block:
> 192.168.1.*

Close, it's a class C actually.

Since cgi.remote_addr contains the remote ip address, you could do something
like this:

<cfif Find("192.168.1.", cgi.remote_addr)>
  <!--- They are from the restricted Class-C --->

Good luck,

Joshua Olson
Web Application Engineer
WAE Tech Inc.

More information about the thelist mailing list