Sometimes There’s Just No Logic…
Last Friday I got to work, booted up my little Eee netbook and quickly realized that it wasn’t on the network. No DropBox. No IM. No Web. I love this little thing, but without a network connection it suddenly becomes a weird paperweight.
I toggled the WiFi hotkey and confirmed that it was indeed on. Nothing.
I plugged in an ethernet cable and confirmed I had link lights on both ends and packets moving (flickery lights!). No results.
Took a look into the Device Manager and was dismayed to see a complete absence of my ethernet and wifi adapters! I found that really distressing as everything had been working an hour before when I packed up at the house.
Scan for new hardware? None.
Attempted to reload drivers. No luck. Fail.
Whined on Twitter. No tips.
Whined to some fellow geeks on IM. Nathan replied with something like, “Power down, unplug, pull the battery for 10 seconds. Hit power button to drain any charge, put battery back in and try.”
I booted back up and had my two network adapters back. Damnedest thing… Static electricity maybe?
Broke (then fixed) VMware Player Networking
As many long-time readers are aware, I’m a big fan of virtualization. I like to do testing and dev work in virtual machines as that helps keep my primary machine(s) cleaner and leaner. It also lets me keep a whole fleet of machines around without needing all that extra hardware and expense.
I ran into an interesting situation this morning with networking though. See, I’ve been running VMware Player on my home machine for a few months with no issues. This works especially well when I’m doing some work projects – helps me keep things self-contained. I just schlep the VM clients around on external USB 2.0 hard drives.
Last night I installed the Hamachi client on that home machine. This morning I fired up my work virtual machine and had no network connection! It didn’t take more than 5 seconds for me to realize that it was probably related to the Hamachi install.
My theory was that VMware was trying to bridge my network with the Hamachi adapter instead of the LAN interface.
From my experience with VMware Server, I know about the Virtual Network Editor application. A quick look under the Start menu didn’t show it grouped with VMware Player, but a quick dive into the VMware Player install directory found the executable easily enough.
I ran the VNE app and was initially stymied: I could see everything but I couldn’t change anything. All the good stuff was disabled and grayed out:
Oh yeah, I’m running Vista. I bet things work better if I run it as Administrator… So I right-clicked on the vmnetcfg.exe and gave that a shot.
Lo and behold, I can change things now! I used the “Add” button to chose the Hamachi interface for exclusion and now my VMware clients are back on track.

Problem solved.
Displaying a Maintenance Page
One of the production sites I manage has a pretty straightforward setup. Your basic firewall, some 1-to-1 NAT routing and a pair of Web/App servers behind it. OK, there are some other boxes behind the firewall as well, but they’re not really germane so I’ll just wave my hands and gloss over that aspect.
Simplified, it looks like this:
I have two external IPs (y.y.y.2 and 3) each going to a different web server. The firewall gets each to the appropriate internal web server over port 80 to Linux and SSL port 443 for the Windows server.
The Linux web server hosts a pile of WordPress and Joomla sites. It also runs VMware Server and hosts a few small “utility” servers.
The Windows server hosts a .NET application with a separate SQL Server back end.
My goal is display a maintenance page when I’m doing maintenance or rebooting either the Windows server or the SQL Server behind it.
I have a few options, but also some wrinkles to ponder. I figure that right before I start maintenance I’ll pop onto the firewall and redirect all the y.y.y.3 traffic somewhere else. When done I then redirect it all back. That part seems easy enough.
Should I send it the traffic the Linux / Apache server? Well, that server doesn’t have a “root” site. Everything on that box is hosted via virtual hosts. That may or may not be an issue. Obviously path names wouldn’t match up from the site on the Windows server to the Linux/Apache server. I thought maybe I could just set a 404 page on the Linux server to give my maintenance message – but would that hose up 404s on all the sites that server currently hosts? Or is that all separate between Apache virtual hosts?
Or maybe I could just build a little Linux VM client with a 404 to do the same thing?
But wait, I don’t really want to have to install my SSL cert on a standby server. If I redirect port 443 to port 80 is the client browser going to holler?
And hey, am I even on the right track with how to approach this? Buying a bunch of hardware isn’t the answer.
I’ve been mulling this over for a few days and have about got myself into analysis paralysis so now I’m opening it up for more thoughts and insight. What would you do?
VMware Server Bridging Problem (fixed)
Sometimes you just have to give credit…
Earlier today I installed VMware Server on a machine at work and then built a client Windows 2003 server on it. The install went smoothly, but once it was up and running I found I couldn’t get it on the network. In fact, I couldn’t even ping the gateway by IP address.
I installed the VMware tools thinking maybe I was missing drivers, but that didn’t fix it. I spent way too much time messing around with the client’s IP configuration as I was assuming that the issue must be something I’d typed or set wrong. However, after an hour of no progress I had to suck it up and search the web.
Fortunately, I found my answer almost immediately at the #ifdef blog. Turned out to be a VMware Server configuration issue – it was grabbing the Hamachi LAN adapter instead of the Ethernet adapter.
The fix was to force the VMnet0 controller choice rather than allow it to bridge to an automatically chosen adapter. By doing that, the virtual machine was able to get an IP on the LAN.
A few clicks and I was up and networking properly.
I love finding answers on other blogs. Ironically, I searched for something last week and found the answer in a post I’d written here 2 years ago. Kind of embarrassing… I didn’t remember writing about it until I saw the search results!
Google Analytics Address RegEx Tool
One of the handy features of Google Analytics is the “Filters” feature. Want to make sure your visits to your site aren’t tracked? Just create a filter for your external IP address[1] and you’re good to go.
To setup filters you’re going to need to know a little bit about regular expressions. Another term for regex is “achilles heel” – at least for me. I just sweat trying to get my head around anything more advanced than filtering a single IP address… Total brain cramps when I need to filter a small range of addresses, for example.
Fortunately, Google has a nifty little tool buried in the help document titled, “How do I exclude traffic from a range of IP addresses?” There’s regex calculator there!
For instance, want to just filter out one address? Enter that address in the “First IP” field and then click “Generate RegEx”. I entered in 24.12.100.119 and it spit back ^24\.12\.100\.119$. Cool, huh?
It’s even more interesting for ranges, of course. Give it a try and see if it can’t help you a bit.
Oh, and there’s even a primer on regular expressions in the Google Help as well.
[1] Not sure what your external address is? Try a site like whatsmyip.org to find out. Are you a user of Google Mail? Then check the bottom of the screen to see your current address.





