STaD Rotating Header Image

McAfee Web Gateway 7

mcafee-logoWeb filtering has come a long way since the days of Bess.  Unfortunately the day when 6 individual proxy servers using DNS based load balancing are long gone.  N2H2 was eventually bought out by Secure Computing and later Secure Computing was bought out by McAfee.  We have moved from Bess to SmartFilter to WebWasher and now the McAfee Web Gateway which is really just a re-branded WebWasher.  On the Surface the Web Gateway says McAfee but deep in the OS it’s all WebWasher.

Inside the McAfee Web Gateway, or MGW,  is a derivative of Red Hat Linux called CG-Linux, or Carrier Grade Linux.  This is a highly customized Linux distribution that has been stripped down to support only the bare necessities to make the boxes efficient as possible.  None the less they run on a dual quad core 2.8Ghz processors with 4GB of RAM and nearly 1Tb of disk space for caching.  Even with these hardware specs SCOCA requires 5 of these servers to run properly.  While the idea of a vitual MGW is a good one, it is not currently a supported platform and that was made very clear to me by McAfee support.

Recently I was invited by McAfee to join their beta program and get a sneak peek at the new McAfee Web Gateway 7.0.  I will be honest, i really didn’t expect a lot out of the new version so I never actually installed it.  I know, i’m not much of a beta tester if I never install it.  Well, this week I finally got around to installing it on a virtual machine and I have to say that I am definitely surprised.  Finally a virtual machine is a supported platform, at least in the beta.  The Core operating system that the server runs is a home grown linux distro called, of all things, McAfee Linux 1.0.  The install went really quickly and was much easier than in version 6.x.  That are using a nice setup script after the initial install that walks you through setting up your IP address as well as changing all of the passwords and doing all of the dirty work that previously had to be done manually from a command line.  This was definitely a welcomed improvement.

Once the install was complete I loaded the GUI in a browser and i was blown away.  The move to version 7 from version 6.X is a huge step.   At initial login I was greeted with a Java load screen which was my first clue that something was definitely different.  I don’t mean they moved things around but it is an entirely different system.  All of the old options are there but this is one of those changes where everyone has to retrained.  This was definitely not what I was hoping to see.

Either way, if you want to take a look around without installing your own I have included the login information below for several demo accounts.  This is strictly a demo box and I will not guarantee it’s functionality nor it’s longevity but I will definitly leave it up for a week or so or until someone finds a way to use it for something nefarious.  Let us know what you think in the comments.

FYI:  This interface is not available outside of the SCOCA network for obvious reasons.

http://208.122.95.5:4711

Username     Password
demo1              demo1
demo2              demo2
demo3              demo3
demo4              demo4
demo5              demo5

SCOCA Web 2010 – New Features and Changes

The new SCOCA web site launched on April 12th, and unlike most posts in this blog, I’m going to give just an overview of the changes and new features that have been implemented, rather then a technological discussion. Look for a couple of posts in the coming weeks on the tech behind the site.

For the information below, click a graphic to see a larger screenshot, or click a text link to be taken to the relevant web page on our site.

Department Merges

EMIS services has now been merged into Student Services. The System support and Development, Network Operations Center, and SCOCATECH Field Technicians are now Information Technology Services.

New Menu System

ScreenShot024

The expanded menu system that appears on most SCOCA web pages should make it much easier to find what you need.

Search Engine powered by Google

ScreenShot026

Our new search engine is powered by a Google server on-site at SCOCA. You can search from most SCOCA web pages or link to search.scoca.org.

Initial searches in the next few weeks may not return optimum results until the server has been tweaked to find all of the new web site pages, and we learn to optimize searches based on the searches that our users perform. Searches should be fully optimized by the start of the 2010-11 school year. Of special note here is that searches cannot be performed on secure pages and documents such as DASL, PB, DFR, etc.

Directions to SCOCA

ScreenShot027

The Directions to SCOCA page has had a major upgrade using Google Maps. You can get directions from any address to our location. Additionally you can download a vCard for use in Outlook, Entourage or other compatible PIMs, that includes address and phone information. If you own a GPS you can download a GPX file to import to your unit. Garmin GPS owners can directly download to their device using the Garmin Communicator plugin.

New Documents Library

ScreenShot028

The new Documents Library has been completely redone, with better features and its own search engine. SCOCA staff is now in the process of learning to use the new system and upload documents. For older documents check links from department pages.

SCOCA Training and Events

The new Training and Events Registration module has been online for a couple of months. Expanded features include a better interface for registration, more info on whom to contact for specific information about an event, and the ability to download a vCalendar file for use in most PIMs:

ScreenShot035

In addition , facility has been provided for attendees to fill out a quick and simple online evaluation for most events.

Staff Directory

ScreenShot036

The Staff Directory includes a new feature that allows you to download a vCard for any SCOCA Staff member for use in your PIM:

ScreenShot034

Regional Links

The Regional Links module has been updated to include links to SCOCA’s non-public entities

RSS Feeds

SCOCA now has 16 RSS Feeds for those that want to stay up to date with the latest information from our site

Gadwin Print Screen

If you or your teachers need a full-featured screen copy application, Gadwin Print Screen is hard to beat. I’ve been using it for years, and find it to be an invaluable tool. Here are some feature highlights:

  • Define your own Hot Key Combination for capturing screens
  • Define a delay before capture
  • Preview your capture
  • Run at Windows startup where it is always available from the System Tray
  • Capture the entire screen, or draw a rectangle around the portion you need
  • Capture the mouse cursor
  • Capture your screen to the Clipboard, Printer, Email, or File
  • Automatically save the screen to .gif, .jpg, .dmp. .png, .tif, or .tga image formats
  • Auto-resize image if desired

Gadwin Print Screen is available as a free version, or a pro version ($24.95) that allows for annotations.

Staff Directory Screenshots

As promised, here are some screenshots from my new staff directory apps, with some commentary. Click a screenshot to view full size.

Administrative Backend

ScreenShot004

Though this may look a bit complicated, the administrative backend was the easiest to setup of the three apps I built for the staff directory. Using the Adobe Dreamweaver Developer Toolbox, the application setup is Wizard-based, once you’ve setup your SQL database query. I’ve found that the ADDT widgets do not scale well for large databases, but the speed is acceptable for databases with a few thousand records.

ScreenShot005

The above screenshot shows the update page for a staff member.

Intranet Staff Directory

ScreenShot001

The staff directory for the Intranet took some time to code due to using new AJAX and XML techniques on the SCOCA web.

First, the staff information is obtained from an XML page. This means that the directory page is not PHP, but a standard HTML page. This has the advantage of using much less overhead when the page displays. The disadvantage is that again, it won’t scale well with a large database.Look for an upcoming post about how this works.

Second, you’ll notice the use of a hover action. When a staff member hovers over an entry in the directory, a small window opens that includes the staff member’s picture, along with office/home phone numbers, and home address.

Before I move to the next screenshot, notice the link in the above screenshot for a staff member to update their information.

ScreenShot002

After clicking the update link, the form to update information appears on the same page as the directory, rather than opening on a new page. This is one of the advantages of using AJAX interactivity.

SCOCA Web Staff Directory

ScreenShot003

This is the version of the staff directory that will be seen by public visitors to the SCOCA web. Again, the data is being obtained from an XML page. The tabbed interface for each department is another use of AJAX.

My goal for our public web is to make applications intuitive to use. Here, the user simply clicks a department tab to view the members of the department. Clicking the staff member’s name will send an email, and the icon beside the name will allow a user to download a vCard for that person.

You may notice that there is no banner or menu system at the top of the page.  Those two items, along with the SCOCA home page, are the last aspects of the site that will be coded.

Out with the old…

DSC_0845

This week I’m starting on one of my big projects for the new SCOCA web, our Training Management System (TMS). TMS is arguably the most complex app I have on our web, especially on the backend for staff and administration management. I have a list of my own changes and new features, changes requested by staff, and changes requested by Administration. I’ve budgeted about four weeks for the project, and I plan to post more about what I’m doing as I get further into the coding. This week I’m outlining my final changes, and getting ready to setup for the new administrative backend.

I originally planned for the new web site to be online by the end of 2008. This will be my fourth version of the site, and the SCOCA web has probably been redone more than any other ITC web site in the state. I’ve traditionally used the redesign to learn and apply a new technology. The first web site I did for SCOCA was to basically make a static site that fits into the profile of a service oriented organization. The second redesign was the first to make use of Dynamic web pages using PHP and MySQL. The 2004 site made use of Flash coupled with XML.

Adding AJAX

I really like the functionality of the Flash-based home page and the Flash menus used on interior pages with the current site, but working with the Flash interface is a real pain, and I also had other problems trying to update anything on the Home page. I also didn’t like leaving my usual Dreamweaver environment and going into Flash, It really slowed things down for me.

For the new web, I spent time last summer learning some of the ins and outs of AJAX (Asynchronous Javascript and XML). I first noticed the use of AJAX on the netflix site, and now it is being utilized as probably the new de facto standard for web page interactivity. I can get most of the functionality of Flash, but with better integration with my PHP and MySQL environments. AJAX is fairly easy to integrate, and I’ll have much more to say on this topic later, with some examples that you can use to spruce up your own site.

Tear Down That Wall

As I began my redesign last September a few things became apparent. First, I really needed to migrate our applications to use our MySQL v5 server, but there are apps that we still use from 2003, and some of those databases are only compatible with our current MySQL v3 server. Second, if you code with Dreamweaver, you know that the default option is to store all of your scripts, images, and CSS files in the same directory as your app. This can make for a lot of unneeded redundancy on the site. The last huge gotcha is that when Adobe purchased Macromedia, they really changed their PHP environment, and although they released a Developer’s Toolbox, it is not compatible with the old Interakt toolbox (which Adobe also purchased). So after studying all of this I came to these conclusions:

  • All apps need to be upgraded for MySQL v5 compatibility
  • All apps need to be upgraded for Dreamweaver CS3 (and beyond) compatibility
  • Javascript, CSS, PHP includes, and Image files need to be centralized

After looking at our current site, I soon realized there was no way I would have the new site ready by December. The biggest slowdown is making everything compatible with Dreamweaver CS3+. For example, my upgrade to the State Districts Directory web app should have only taken 20-30 minutes (after I migrated to MySQL v5), because all I wanted to do was add a simple vCard feature and change the CSS. I ended up having to recode from scratch because of syntax changes from the old tools to the new tools. Another very annoying problem was that there was a bug that kept changing MySQL queries when I used MID, RIGHT, LEFT for zip codes and phone numbers.The project ended up taking three days.

Most users of our site don’t see or care how it works, so they don’t know that almost every page that they see is generated dynamically from a database, and that the information gets there from even more web applications that our staff uses or are generated from CRON scipts for updates.

The new site is going to have to be up and running sometime between June and August. This will give some time for the staff to get used to new functionality and for the site to “settle” before the beginning of the 2009-10 school year.

Importing fixed-length files into MySQL

When I started on the first version of SCOCA’s District File Repository (DFR) a few years ago I needed a way to have an updated list of our school districts and IRN identifiers. Ryan suggested that I use a file titled disbld.seq, a fixed length text file that is updated monthly and sent to ITCs. When I first imported the file for MySQL, I used a Windows desktop application. I also use disbld for  the SCOCA State Districts Directory. a somewhat popular application on our site.

Last week I started to upgrade the Districts Directory application, mainly to automate the conversion of disbld to MySQL on a regular basis. I know some of our schools run PHP and MySQL so I thought I might post a bit on how fixed length files differ from comma-separated files.

If you’ve ever had to import a comma or TAB delimited file into MySQL, you know it’s a fairly painless process. All you really need to do is delineate the field separator (comma or TAB) and let MySQL know if the fields are enclosed with double-quotes or some other character. If you use phpMyAdmin to manage your MySQL server (and you should ) there’s an import option to make the process easier.

Fixed-length files are a bit different because fields aren’t enclosed or separated. Here’s an entry from the disbld file that I work with (scroll horizontally to view the entire entry):


S035451Springfield Intermediate MiddlMahoning  11333 Youngstown Pittsburgh RdNew Middletown   OH4444287243305423624170010104837130100503

Preparing for Import

What you first need to do with a fixed-length file is count how many characters make up a field for each entry. The disbld file breaks down like this:

  • 1 character that defines if the building is a District or School (D or S)
  • 6 characters for the IRN number (disbld uses leading zeroes to make the length equal)
  • 30 characters for District or School name
  • 10 characters for county
  • 30 characters for address
  • 17 characters for city
  • 2 characters for state
  • 9 characters for zip code
  • 10 characters for phone number
  • 23 characters for “misc” – not used in any of my apps

All of the fields except for one can be defined in MySQL as CHAR or VARCHAR field types (depending on length). The special case is the IRN field, and here’s where thinking ahead when you code an application pays off.

IF a user wants to search for a district or school IRN number, he or she wouldn’t use a leading zero for the number, since OHIO IRNs are usually not listed this way. In the above example an individual would type in 35451 in an IRN search, not 035451. So how do we fix this when importing the file? The answer is to make the IRN field an integer (INT) instead of a CHAR field type. When MySQl imports the file, the leading zeroes will be dropped.

Remember, define the MySQL table structure first, and make sure that the length of your fields exactly match what is in the file you are importing.

Import the File into MySQL

The easiest way to import the file is to load it onto the same server where MySQL resides and use MySQL’s LOAD DATA LOCAL INFILE command. You can do this from phpMyAdmin by going to your database and clicking the SQL tab. Here’s the recipe:


load data local infile 'C:\\filedir\disbld.seq' into table disbld_db.disbld fields enclosed by '' terminated by '' lines terminated by n' (`btype`, `irn`, `name`, `county`, `address`, `city`, `state`, `zip`, `phone`, `misc`)

Two things to note are:

  1. fields are terminated and enclosed with two single quotes (indicating that fields are not enclosed or terminated)
  2. you must include the field names of your table when using this command.

Last Task

Finally, you need to add an easy unique indentifier/primary key for each entry in the table. This is usually done by adding an auto-incrementing INT field type with a size of 11. The command below will add the field at the beginning of each entry, and after the addition each entry will have its own ID number. In my case I named the field DISID


ALTER TABLE disbld ADD disid INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST

Below is a screenshot that shows the final import in phpMyAdmin (click for full size):

screenshot002

Working with the vCard standard

One of my main reasons for posting on this blog is to show some of the processes I use and the problems that can occur when coding web applications. A good case in point is when I recoded our staff directory a couple of weeks ago. When I code something for SCOCA it almost always involves three applications: an application for SCOCA public users, an app for staff, and a backend for someone on the staff to administer. I’m going to write a bit about my decision to integrate vCards into the staff directory.

The vCard is a standard that allows exchange of contact information between various PIM (Personal Information Manager) software applications. You’ve probably seen vCards attached to emails or as links on web pages. vCards are now a fairly old standard. Lets take a look at some of its structure (I’ve modified the email address below to prevent bots from getting the real email):


BEGIN:VCARD
VERSION:3.0
CLASS:PUBLIC
PRODID:-//class_vcard from TroyWolf.com//Modification by SCOCA//EN
REV:2009-03-15 22:24:07
FN:Joshua Leeth
N:Leeth;Joshua;;;
TITLE:Network Engineer
ORG:SCOCA
ADR;TYPE=work:PO Box 577;;175 Beavercreek Road;Piketon;Ohio;45661;
EMAIL;TYPE=internet,pref:leeth@scoca.itc.com
TEL;TYPE=work,voice:740-289-5327
URL;TYPE=work:http://www.scoca-k12.org/departments/department.php?did=3

Even if you’re not a coder you can see this is a fairly straightforward structure, although if the vCard was introduced now it would undoubtedly be done with XML, making it more versatile for use in other applications. If you want to look at the structure of any vCard, simply load it into Notepad.

For the public staff directory, I wanted our users to be able to click an icon next to a staff member’s name to download a vCard for their own PIM. Since the staff directory is displayed from a MySQL database, I wanted to create the vCard “on the fly” when users click the icon for the vCard.

Although it can take time to code, dynamically creating vCards, vCalendars, and other types of documents isn’t extremely difficult once you know the MIME-type of a file and some of its structure. For SCOCA’s Training Management System (TMS), one of my backend applications dynamically creates an Excel spreadsheet that tracks all of the training we do at SCOCA, including numbers trained, districts served,who is doing the training etc., and ties this into our goals and strategies for our Continuous Improvement Plan. It took me about two weeks to figure out the proper Excel Structure and SQL queries to get it right for the requirements of SCOCA administration. For the vCard I was fairly sure that someone had probably already done the heavy lifting and created a PHP class that would make the process easier. After a bit of searching I found a vCard class coded by Troy Wolf.

One thing I wanted to try and add to the vCard was a staff photo. I knew that Outlook 2007 supported this feature so I thought it would be a nice addition. Looking through the vCard class file I noticed although a call was made to add a photo for the vCard, the proper structure was missing. I emailed Troy, and he replied that I was the first to discover this bug, and he told me where I should add it into his class.

I already have photos of each staff member stored in a directory on our web server, so my next step was to find how photos get into a vCard.. After a quick Google search, i found this line of code:

PHOTO;VALUE=URL;TYPE=GIF:http://www.abc.com/dir_photos/my_photo.gif

I couldn’t believe it was going to be this easy. It wasn’t.

The code simply wasn’t working, and I couldn’t see any pictures when loading the vCard into Outlook. I spent the rest of the day searching for answers, and of course I found “sort of” the same line of code, but with different syntax and additions. This is the time when coding can get frustrating, as I try to debug or find answers to problems.

The next day I found an alternative to getting the picture through a URL. I would need to convert each photograph to BASE64 and enter the entire structure into the vCard file. I was beginning to suspect that there was nothing wrong with my code, and it was probably that Outlook did not support a photo through a URL.

I didn’t want to code my own app just to convert 50 photos to BASE 64, so I found an online PHP application that would do it for me. All I had to do was enter the URL for each photo. I then created a new field in our staff SQL table and dropped each BASE64 conversion into the field. I imported my test vCard into Outlook, and there was the photo.

Ny final code for the vCard is a mixture of hard-coded information, and data retrieved from the database. Basically, I hard coded SCOCA’s address, and added a vCard note that links to our main web site. In the code excerpt below you can see how I added the hard coded info and the data pulled from MySQL: For each staff member’s web page I  hard coded the URL for the individual’s SCOCA department page, and then dynamically added the department ID at the end, pulled from the database.


query_Recordset1 = sprintf("SELECT * FROM scocastaffdir WHERE id = %s",

$vc->data['first_name'] = $row_Recordset1['firstname'];
$vc->data['last_name'] = $row_Recordset1['lastname'];
$vc->data['title'] = $row_Recordset1['position'];
$vc->data['work_po_box'] = "PO Box 577";
$vc->data['work_address'] = "175 Beavercreek Road";
$vc->data['work_city'] = "Piketon";
$vc->data['work_state'] = "Ohio";
$vc->data['work_postal_code'] = "45661";
$vc->data['office_tel'] = $row_Recordset1['phone'];
$vc->data['email1'] = $row_Recordset1['email'];
$vc->data['url'] = "http://www.scoca-k12.org/departments/department.php?did=".$row_Recordset1['did'];
$vc->data['photo'] = $row_Recordset1['binphoto'];
$vc->data['note'] = "Visit us on the web at http://www.scoca-k12.org";

Below is a screenshot of the vCard from Outlook (click the image to view full size):

ScreenShot001

In a later post I’ll show the end result of the three versions of the Staff calendar that I created.

The SCOCA Wiki Introduction

The SCOCA Wiki, http://wiki.scoca.org, is a tool that has been deployed at SCOCA as a resource for all SCOCA districts to use.  You didn”t know we had a wiki?  Well, it hasn’t been the most publicized of all SCOCA resources but it  has definitely turned out to be a useful one.  I just thought I would take a minute to familiarize everyone with some of the basic features of the site.

The site is currently being used by SCOCA staff as a repository for varying types of documentation and procedural guides.  These are broken down into several sections depending on topic or audience of the article.  You will notice that in the upper right hand corner there is an option to log into the wiki.  You don’t need any special accounts to do this, you can use your existing DSL domain account.  Once logged in you have the power to both create new content and edit existing content.  As an article author you will be able to restrict access to your content or lock others out entirely.  You will find that a portion of the existing content is already locked for various reasons.

One of my favorite features of the wiki is the “My Page” section.  Upon logging in for the first time a wiki entry is created for your account.  You can list contact information along with any other information you would like about yourself.  I like using this as a place to put my own content.  By creating articles under “My Page” I am able to have an online repository of my own notes that can be accessed from anywhere.

The thing about the wiki is that it is always changing.  To keep up with these changes you can look at the “Recent Changes” section to see what’s been going on.  You are given a list of changes that have been made and who made them.  This is a great place to look to see if new content has been added.

Overall the wiki has proven to be a great resource for both SCOCA staff and the school districts that we serve.  If you have not visited the wiki yet I would suggest taking a few minutes to look around.  You might be surprised by the amount of imformation that is available.

Cool Tool – VisualCron

visualcron Windows Task Manager is a decent tool but it can be confusing to manage if you have a lot of CRON jobs. It is also a headache to use if you want to run HTML scripts like I do with PHP. I found VisualCron a few years ago, and I think it’s a great tool. Here’s a few of the features listed from the web site:

VisualCron automates your server and repetitive tasks
No programming skills are needed
VisualCron monitors your server regardless of where you are
You have full control over your server and processes in realtime
You can control VisualCron remotely and secure
Constant development of the product – VisualCron is here to stay
Free support – just mail or call if you need help!
Free future updates – no subscription fees!
Free trial with full functionality for 45 days!
Many licensing options – starting from $77 per server

I use VisualCron to run a PHP script that checks our staff Calendar MySQL database and sends an email to SCOCA staff each morning listing each staff member and his or her schedule for the day. Another VisualCron job is an email sent to Rob Morgensen and Missy Keibler the day before training is scheduled in our lab so they can make any preparations that are needed. All I have to do is list the URL for the PHP script in VC and the scheduled days and times I want it to run.

You can download a fully functional demo, and educational pricing is available. Well worth checking out.

visualcron

http://www.visualcron.com