RegEx IP Address Validation

RegEx IP Address Validation

I recently had a project at work where I had to add in some strict IP Address validation and restrictions. We are being required to prevent end users from entering certain IP addresses or ranges. This is a perfect task for Regular Expressions. I am not an expert in RegEx, but I can get out basic RegEx expressions. The first thing I did was search around the net to see if there were expressions already done for IP addresses. There are, but not entirely what I needed. The best I could find were expressions to validate the IP address to ensure it is valid. I didn't find anything to test for certain ranges of IP Addresses. Since I can hack at RegEx a bit I took the expression I found to validate the IP address and made modifications to do the tests I needed. These are the Regular Expressions I hacked up to do the validation and restrictions.

We were required to block these IP addresses or ranges.

view plain print about
10.0.0.0
2127.0.0.1
3255.255.255.255
410.0.0.0 - 10.255.255.255
5172.16.0.0 - 172.31.255.255
6192.168.0.0 - 192.168.255.255

[More]

Homebrewed ColdFusion Monitor at Twin Cities CFUG

Sitting at Chris & Rob's Chicago's Taste Authority in St. Paul, MN sipping a Goose Island 312 wheat beer, eating a couple of Chicago dogs and preparing my presentation for Homebrewed ColdFusion Monitoring.  I am happy to say the Twin Cities ColdFusion User Group (http://www.colderfusion.com) has asked me to talk about the ColdFusion Monitoring tools I've written and use at work. I've just accepted their invitation to present and I hope to see you there.

I will be updating these tools for ColdFusion 9 and I hope to have a basic standalone app ready to go by the time I give my presentation.  (The version I wrote for work is custom for our servers and not portable.)

The Twin Cities CFUG meets the first Wednesday of every month. This meeting will be on November 4th at 6:30 pm with pizza and socializing at 6:00pm.

See you there!
 

ColdFusion 9 on Snow Leopard

Recently I posted about upgrading my Mac Book Pro to Snow Leopard and then getting my already installed ColdFusion 8 running again. I basically had to reconnect CF8 to Apache and reconfigure my Apache settings since the Snow Leopard upgrade wiped them out.

Many people had problems or could not even install CF8 on Snow Leopard. The installer didn't even run for many people.  Since then Adobe has released ColdFusion 9.  It's shiny and new and oh so fast.  So at last weeks Twin Cities CFUG (http://www.colderfusion.com) I uninstalled CF8 and installed CF9.

It was pretty straight forward with no issues other than me entering the wrong web root path (doh!).  I downloaded the OSX 64 bit version and ran the installer.

I chose to install the Developer Edition and I chose to use the J2EE installation method.  I also opted not to install the component to connect CF9 to OpenOffice.  I use OpenOffice all the time, but I absolutely refuse to install desktop software on production servers.  I don't plan to use any of those features.  Sorry Adobe, you're just going to have to find a better way to implement creation and reading of office documents.

That's all really. Enjoy ColdFusion 9 on Snow Leopard