Simon Mott - All about me

Slow DNS resolving using bind9 as caching resolver

I currently have 4 DNS servers across my estate and until recently these were all configured to forward all queries to Google DNS (8.8.8.8). I ended up having an issue with Google caching an undesired record value so I opted to change my DNS servers so that they no longer forward queries elsewhere, but instead try to answer it themselves; Doing this gives me slightly more control over my DNS cache.

As I use named (bind9) this was a pretty trivial change – Simply remove the forwarders { 8.8.8.8; }; clause in my configuration and that should be that.

During my post-change testing though I’d noticed that resolution was taking significantly longer for un-cached queries than I’d expect (microsoft.gointeract.io is only used to illustrate my issue):

PHP Handlers and PHP 5 vs 7

by Simon

php_logoThe idea for this post actually came from observing performance after moving this site over to WordPress (and to a lesser extent, my other website, General Photography). I use Puppet orchestration for my servers and I made the mistake of trying to convert everything to puppet manifests and also get things working how I wanted without fully understanding how puppet works at the same time; That however is another story. This does means that my puppet manifests are not very flexible currently and I use suphp as my main PHP handler just because for me, at the time, it was easier.

That being said – I’m fully aware of the performance issues suphp exhibits because my Observium install used it at first – it now uses mod_php because loading all the graphs was noticably slow. I thought I’d try to quantify the performance differences between suphp and mod_php and decided I should do all 3 common PHP handlers. Whilst I was gathering metrics for this I decided It’d be useful to include PHP7 results too.

Caching with Apache’s mod_cache and mod_deflate

I currently work in the hosting industry and as part of my job I have to deal with WordPress on a regular basis and as such I’ve seen how appalling it can be sometimes with regards to page loading times. Given that my content on here doesn’t change all too often, it makes sense to spend the time generating the content only once and serving it to meet multiple requests for the same document. In order to do this one would usually employ some form of caching.

WordPress itself does have the option for multiple caching plugins which integrate nicely but in my experience they still have to pass the request off to a PHP handler which means some processing is still needed to accommodate the request (albeit less than a full page load). For the purposes of this article though, I’m going to assume a generic framework as this technique is not specific to WordPress at all.

There’re a number of software solutions to sit in front of your web server which act as a cache and some of the more notable ones are nginx and varnish and each have their pros and cons (As far as I know, Varnish can’t do native SSL termination yet). For this post though, I’ll be making use of some Apache modules to do the same thing. This was mostly an experiment for myself to see what I could do with it – I’ve found some limitations which as of yet I haven’t been able to work around for lack of knowledge on the inner workings of Apache, but for now It does the job.

Full screen Flash Video on Linux

ghexSo here we have it – I’ve finally got around to tackling this issue which has been bugging me for a while.

When watching a flash video in full screen on dual monitors, as soon as you go off to do something else you will soon notice that your video is no longer full screen! How annoying.

The way to fix this is to edit the flash player binary. Firstly you need a hex editor – I use “ghex”

$ sudo apt-get install ghex

You can of course use your hex editor of choice.

UN2400 Mobile Broadband on Ubuntu 11.10

un2420I have a HP Compaq Mini 311c-1030SA netbook with ION. I decided to encrypt it the other day just on the off chance it was stolen that way I would be happy that none of my data would be lost.

It had the orignal OS (Windows XP Home) and Kubuntu Linux in a dual boot configuration. Windows encrypted nicely with TrueCrypt and I decided to start fresh with Linux as the version I had installed was fairly old and as far as I am aware there is no way to on the fly encrypt a currently installed distro.

Lets just say that due to a slip of the hand I somewhat destroyed my encrypted Windows partition! (Foolishly, one of the first things I did when i got the netbook a few years ago was remove the recovery partition for more HDD space too)

This isn’t really a big problem for me as I hardly ever used the Windows install. Here is the clincher though, the netbook has a Qualcomm UN2400 Mobile Broadband chip which requires the firmware to be uploaded to the chip based off what country/carrier you plan on using. This firmware and some of the ppp configuration scripts are installed onto the Windows partition… which I had just destroyed!

VPN Bonding

This page details step by step how I accomplished aggregating two separate internet connections into one, seemingly single, connection to the Internet. This “single” connection has a greater bandwidth capacity that either of the individual connections could yield. As a side affect this also nicely doubles up as a redundant connection. This method can be used for achieving link aggregation for both home and business users alike for a fraction of the cost of commercial connections / aggregation units available that do the same thing and in theory could be expanded to as many links you like however be warned, the more links there are, the more overheads there will be with tunnelling; thus potentially noticeable drops in speed.

For this demonstration I am using two Virtual Machines via VirtualBox. This enables me to experiment with without cutting my servers off from remote administration. Both machines are running Ubuntu 10.04.3 LTS (Lucid) however there is no reason this wont work for other distributions as long as you modify the steps accordingly.

Office 2010, KMS Activation and Domain Relationships

by Simon

Whilst this seems trivial to some people, not only did this issue affect my office, but one of our branches in India too so I figure its worth noting somewhere!

My current employer has many operating companies (OpCo’s) dotted around the world, all under one brand. Because of this structure, our OpCo in the UK has a two way trust relationship between our domain and the parent company’s. For arguments sake, lets call them UKNET and CENTRALNET.

At the end of last year we were told to use a Microsoft KMS server hosted on CENTRALNET to install Office 2010 on some of our workstations. Easy.. or so we thought.

LAN Events!

by Simon

lan_bigFor those of you that know me fairly well, you would know that over the last 5-6 years i have attended a number of LAN events hosted by MultiPlay.co.uk. Whilst I decided to take a break from the event last year we have jumped back on the band wagon again and are here for this years Spring event, i42.

To be truthful the group of us that agreed to attend this year decided this would be a meet up primarily aimed at coding DMDirc and as yet that coding remains to be seen. For the time being we have succumbed to the usual shenanigans that befalls a LAN event – Lots of junk food, lots of video games, lots of random shouting, “Hax!” or “ROFL!” (Pronounced roffle) as a brief example and general other tom foolery.

I must admit all things aside i do enjoy the atmosphere shared at a LAN especially when you are surrounded by friends

Me, myself and I

by Simon

As you have have discovered, I’m not especially big on blogging. I lead quite a mundane (or at least I think so) life compared to some other people I know. That said I feel I should share at least something new!

I had some advise from a few of my closest peers to which the “jist” was the need to not sit on my arse and at least try to better myself. As of a few days ago I made the decision to look into the possibility of gaining some professional certifications. I am looking to start a career in the IT industry and, partly because of where I live (and my unwillingness to just get up and move) and my lack of industrial experience … its not going very well.

I feel pursuing these certifications will not only aid me in the career department (eventually) but the knowledge and mindset of “I did that” would boost my view of my own self worth and improve me as a person.

Admittedly this is all talk currently. As some of you know, most of the time my “bark” has no “bite” to put it bluntly.

I am hoping to achieve the following certifications:

Microsoft Certified Technology Specialist (MCTS)
Windows Server 2008 Network Infrastructure Configuration (70-642)
Windows Server 2008 Active Directory Configuration (70-640)

CompTIA Linux+ (Exams LX0-101 and LX0-102) – with the aim of furthering this to LPIC-1

“Nexus One – Web meets Phone”

by Simon

N1On Monday my shiny new Nexus One phone finally arrived!

The phone was ordered on 14th April but with all the recent disruptions to air traffic caused by the icelandic volcano, Eyjafjallajökull, delivery of my phone was delayed.

Overall I am really impressed with the phone. It’s a lot more zippy than my older G1 and looks one hell of a lot nicer too. The UI is pretty similar to the G1’s Android 1.6 but there are some significant differences. Most notably are the 2 extra home screens, giving the phone a total of 5 screens instead of 3. The AMOLED is sharp, bright and most importantly, larger which makes a nice change as it is a pleasure to look at. The phone is nicely weighted (not too heavy, not too light) and feels sturdy.

All this was expected though, given how long Android has been available on mobile devices and I think that Google and HTC have had ample time to perfect on the design. On the note of the design, one thing I (and probably many others) consider to be a flaw is the SDcard slot. You have to remove the battery to get at the card which is… not useful.

On the plus side however, I found the voice recognition very accurate with no training what so ever. I’ve spent a few hours crazily talking to my phone…

If you have any questions, please feel free to contact me (when the contact form works) or simply ask Google to lend its wisdom.