Crumpled Thoughts

February 15th, 2007

Wish Me Luck

Posted by Chris in Technology, Life, Sysadmin

I’m driving up to Portland, Oregon tomorrow to do an install for work on Friday. Oliver Russell & Associates is doing a major technology upgrade and we’re rolling out over eight terrabytes of storage in new servers at the Boise and Portland offices. This project has kind of been my baby, and the Portland piece is the final part. We’re implementing some cool new replication technology and linking the sites via a point to point T1. Exciting Stuff :) . Friday I get to set up the server in Portland and configure the Cisco routers between the sites. I’m hoping I don’t hit any major storms on the drive… I’ll be picking up some chains just in case before I head out of town. The forcast is a bit borderline… my route is the little red squiggle in the upper left.

Weather

October 31st, 2006

Cable Modem Woes

Posted by Chris in Technology, Sysadmin, Rant

A couple of months ago I started having some serious issues with my cable modem. The modem would randomly disconnect and reconnect throughout the day. I called my ISP, and they would tell me everything seemed fine. Then sent a guy to the house who redid some of the connectors on the outside of the house, but it did not help at all.

In a fit of frustration, after it had done this ten times in a 30 minute period, I ran off to Walmart and bought a new modem. Things seemed to be better for a couple weeks, then it started again. When the cable company was of little help, I found that Motorola modems provide some data through a web interface at http://192.168.100.1. I started plotting graphs of Power Level, and Signal/Noise ratio using rrdtool. I was hoping to find a correlation between the disconnects and these values. Today I was looking at the graphs and noticed a strange boost in the upstream power level:

Daily Graph

Daily SNR Graph

Weekly Graph

Weekly SNR Graph

I’m not sure what these values mean, but I would think that higher is better. I didn’t notice any disconnects during the period of improved upstream power level. Anyone know what these values mean?

August 24th, 2006

Persistent IP Routes in Mac OS X Tiger

Posted by Chris in Technology, Sysadmin

One of the clients I work for has a Mac OS X server which handles most of the file shares on the network. They have two internet connections, one on their T1, and a secondary DSL connection for redundancy. The Mac OS X server has two network interfaces; one with an internet IP (behind a BSD firewall) and another on the private network. The default gateway on the Mac server is on the internet interface, and a seperate router on the internal network routes traffic to 5 local IP subnets for remote offices, and co-located servers.

Since the default gateway points to the internet, routes have to be added for the four other local subnets to send traffic for those subnets to the router on the internal network. These routes need to survive a reboot— they need to be persistent.

On a Windows box it is simple to add a persistent IP route. Along with your ‘route add’ command, you add a ‘-p’ to make it persistent. Easy enough. Not so simple on Mac OS X. On Linux you could just add the ‘route add’ statements to the /etc/rc.local file and they would be executed at startup, effectively making them persistent. Easy enough. This is not so easy on Mac OS X… but I found a way to do it.

Let me add my standard disclaimer that you do this at your own risk. I won’t be held responsible for any trouble you experience trying to do this. It is working great for me though :)

Open up terminal, and switch to the root user:

sudo su -

You’ll have to type in your password, and have ‘Administer the Server’ rights.

Change to the /Library/StartupItems directory

cd /Library/StartupItems/

The way I created my script was by copying one that was created by a MySQL 4 installer. You should be able to copy any of the directories in /Library/StartupItems to give you a starting point. Just substitute the one you’re using where you see me use ‘MySQLCOM’.

cp -rp MySQLCOM PersistentRoutes

Now change to the PersistentRoutes directory.

cd PersistentRoutes

If you list the contents of this directory you should see two files, one named for the service you copied, and StartupParameters.plist. We need to rename the service you copied to ‘PersistentRoutes’

mv MySQLCOM PersistentRoutes

Now we edit PersistentRoutes with your favorite text editor… mine’s vi.

vi PersistentRoutes

Go ahead and empty the file. If you’re using vi type ‘1000dd’ (no quotes) and it will delete 1000 lines. That should empty it :) . This is the contents of my PersistentRoutes file:

#!/bin/sh
. /etc/rc.common
ConsoleMessage "Adding Persistent IP Routes"
/sbin/route add 10.0.0.0/24 10.1.2.1 #Route to Boise Colo Facility
/sbin/route add 10.1.3.0/24 10.1.2.1 #Route for SonicWall L2TP Group VPN
/sbin/route add 10.1.4.0/24 10.1.2.1 #Route to Portland Office
/sbin/route add 192.168.69.0/24 10.1.2.1 #Route to Chris' House 

Save, and exit your text editor. ‘:wq’ in vi (write, quit)

Now we need to edit the StartupParameters.plist. Mine looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN” 
“http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
        <key>Description</key>
        <string>Persistent Routes for VPN Tunnels</string>
        <key>OrderPreference</key>
        <string>Last</string>
        <key>Provides</key>
        <array>
                <string>PersistentRoutes</string>
        </array>
        <key>Uses</key>
        <array>
                <string>Network</string>
                <string>NetworkExtensions</string>
        </array>
        </dict>
</plist>

That’s it! Now your routes will be added when you reboot. Need to add a new route?.. manually add it from the terminal using ‘/sbin/route add…’ then update the /Library/StartupItems/PersistentRoutes/PersistentRoutes file. Easy!

Hope this helps someone. It was causing me a bit of aggravation. Perhaps someday Apple will make this a bit easier. Use ‘netstat -r’ to display your routing table.

Cheers,
Chris

June 13th, 2006

Treo Exchange ActiveSync Hell

Posted by Chris in Technology, Linux, Windows, Sysadmin, Rant
Treo + Apache + Exchange 2003 = HELL

Today I had to set up a Treo 650 to access a user’s Exchange mailbox over the web. I did not imagine it would be as difficult as it turned out to be.

At this site we run a Linux router/firewall that handles all traffic coming into, and leaving the network. We use Apache’s mod_proxy to proxy web connections from the internet to IIS servers on the private network. Having had more than a couple 36+ hour days cleaning up viruses due to exploited IIS servers, I feel much more comfortable having Apache handle the web requests.

One of the “Gotcha’s” to using mod_proxy is that you have to disable “Integrated Windows Authentication” on any sites you proxy with Apache. Apache doesn’t understand the headers involved. No big deal, because these requests are typically coming from the internet over SSL.

I started the setup at about 12:00 noon today. The first thing I did was add the following bits of code to the Apache configuration file to Proxy the ActiveSync connections:

#ActiveSync
ProxyPass /Microsoft-Server-ActiveSync https://webmail.example.com/Microsoft-Server-ActiveSync
ProxyPassReverse /Microsoft-Server-ActiveSync https://webmail.example.com/Microsoft-Server-ActiveSync

I then put the appropriate settings into the Treo, and tested connectivity. This is where things started to piss me off.

The software on the Treo has terrible, non-intuitive error codes. The documentation is even worse. This is what I discovered (over about 4 hours of trying to get it to work):

  • For the ProxyPass directives to work, you can not use Integrated Windows Authentication on the IIS site.
  • For the Treo VersaMail app to use Exchange ActiveSync it must use kerberos authentication, which requires enabling Integrated Windows Authentication.
  • Palm’s software engineers don’t really give a shit whether the error message you get is in any way helpful, just as long as you understand it’s not working.

So the thing that sucks about this is that we run “stuff” on the gateway which requires us to use Apache on Linux. It provides remote access for employees through a web interface, and dynamically modifies iptables firewall rules when folks need access.

This was my fix, which I think is as good of a fix as is possible.

  • Exported the IIS web site that handled OWA, OMA, and ActiveSync to a file.
  • Created a new web site from the exported file.
  • Changed the TCP ports for HTTP and HTTPS to obscure, high ports.
  • Modified the document root on the IIS site, as all the magic happens in Virtual Directories.
  • Requested/Installed a new SSL certificate from an internal enterprise CA with a common name matching the internet FQDN.
  • Enabled “Integrated Windows Authentication” on the “Exchange” virtual directory in this new web site.
  • Forwarded the obscure, high SSL port from the firewall into the Exchange server.

Now the Treo works… just had to set the obscure high port in the advanced settings on the Treo. I didn’t want to go down the forwarded port road, because it seems like a compromise in security. All too often I see people bypass security measures in order to get things to work, and I hate it. This seems like a small compromise I’ll have to settle for.

Got a better solution? Let me know.

-Chris

January 28th, 2006

Installing Symantec AntiVirus 10.x using a Group Policy Object (GPO) installation

Posted by Chris in Windows, Sysadmin

Ever need to install or upgrade Symantec AntiVirus on a large number of machines rapidly? Check this out. Much easier than using a login script, or messing with transfom files for the installer.

Installing Symantec AntiVirus 10.x using a Group Policy Object (GPO) installation

January 27th, 2006

Mass Change Local Admin Password on Windows Domain Computers

Posted by Chris in Windows, Sysadmin

Yesterday I was at a client’s site and was tasked with changing the password for the local administrator account on approximately 200 MS Windows domain computers. Typically if I have to change the local admin password on a few domain computers I’ll just use the computer management MMC snapin, connect to a remote computer, change the password, lather – rinse – repeat. This would take forever though to do on 200 computers.

I came across a Visual Basic Script file which allowed me to complete the task in about 15 minutes. I just had to create a text file with the netbois computer names of each machine I wanted to change the password on, then run one command. This little script is going to come in handy. I found it published here, at VisualBasicScript.com.
(more…)