Author: simkin@simkin.org

  • OpenVPN – The VPN for everyone

    For various reasons I decided to finally sort out a secure VPN connection back to my home network. I am lucky to own a Sonicwall Pro 200 firewall with an unlimited VPN licence. Trouble is that Sonicwall made the client software End of Life and I need to buy their newer one. Don’t fancy that.

    So let’s go visit the bast treasure trove that is Open Source. Hey presto – OpenVPN. An SSL-based VPN solution which is more flexible, easier to configure and free.

    There is a great getting started guide here.  I basically downloaded the “Windows GUI” version, created some certificates and wrote my own server.ovpn config file. After ensuring my Sonicwall let the relevant port through and that my DNS names were all correct (I wanted a specific name for the VPN server) I went into work and tried it out.

    The client needs a slightly different .ovpn file and a copy of the relevant certificates (ca.crt and the one generated for that particular client). I kept the same file structure as for the server to make my life easier:

    C:\Program Files\OpenVPN\easy-rsa\keys
    ca.crt
    clientx.key
    clientx.crt
    C:\Program Files\OpenVPN\config
    clientx.ovpn

    Everything went fine except I cannot see the LAN, only the server. A bit more reading and it looks like it may be the Windows firewall running on the server. Soon fixed that. Will go into work tomorrow and try again.

    The GUI works well and whilst it isn’t as polished as say, the Cisco VPN client, it works and it works well. I certainly recommend it for home users and admins. Possibly not quite ready for mainstream deployment for novice users. I’ll try it out on my wife though and see how she gets on. She is used to me by now.

  • Adventures in Media Centre

    So I now have the MC bug and have decided that my Media Centre PC will:

    • Act as an interface for the boys computer games
    • Play DVDs with full Dolby DTS surround sound
    • Record TV shows off of the Sky Box for shipping onto DVD
    • Allow me to build a DVD library to save digging out the Disc every time the boys want to watch a movie

    Launching games

    The first one was a bit tricky but thanks to this link, and a copy of gameloader.exe I managed to solve it. Basically the “Program Library” within MC can be used to launch almost anything as follows:

    1. Create a folder called c:\MC_Launch for example
    2. create a shortcut to Gameloader.exe “mygame.exe” for the EXE of the game and call it MyGame.lnk
    3. create a MyGame.png image for MC to use
    4. create MyGame.mcl in notepad with the following content:

    <application
    name = “My Game”
    ID = “”
    Run = “.\Launch.lnk”
    BGColor = “RGB(0,0,0)”
    CompanyName = “.”
    StartImage = “MyGame.png”
    ThumbnailImage = “MyGame.png”
    SharedViewport = “”
    NowPlayingDirective = “”>
    <capabilitiesrequired
    directx=”True”
    audio=”False”
    video=”False”
    intensiverendering=”True”
    console=”False”
    cdburning=”False” />
    </application>

    5. Now copy the MCL into “Programs\Media CEnter\Media Center Programs” in the Start Menu

    Play DVDs with DTS

    Easy really. Just plugged the SPDIF co-ax into my Logitech z55000 and trawled through the advanced audio driver settings until I found the DTS tick box. Works a treat. Might need to play with Nero Drive speed as sometimes the disc runs a litle noisy but otherwise it is all good.

    Record TV Shows

    My Hauppauge HVR card has a composite feed from the back of the Sky box and the Sky box phono outputs provide sound. Only stereo of course but I’m only recording TV programmes not movies so that isn’t really a problem. For DVD-quality sound, I’ll buy the DVDs. Another reason not to get pirate copies if you ask me…

    DVD Library

    Possibly the most tricky. But here is what I ended up with.

    1. Use RipIt4Me to build a sectors list for DVDecrypter and force the VOB to the root menu.
    2. Save the resultant VIDEO_TS folder onto my Thecus NAS box
    3. Load-up MyMovies under MC and point it at this folder.
    4. The Movie appears with full artwork in MC and can be played without needing to insert the DVD

    For the record, I buy legal, genuine DVDs and have them on the shelf. I only have the NAS open on my LAN and only the MC box runs MyMovies to be able to pick the movies out and play them.

    I could go one stage further and rip only the main title using VOB2MPG but then my movies are listed as “Videos” and I don’t get the extras menus. I’m happy to sacrifice some disc space to ge the full DVD experience.

    For extra tips and advice, the Australian Media Centre Forum is worth a trawl….

  • Finally Getting into the Christmas Spirit

    We finally have the decorations up and the tree is lit-up. I also managed this week to get the Vista Media Centre configured and unplugged the DVD player. The PC does a better job. I just never got around to persuading the household to convert. In the end, I just switched it over and it is pretty much doing a good job. Need to tweak the DVD player to spin slower/more quietly and a bit of acoustic baffling would be good too. The fan noise is not noticeable really but I feel I can do better. One interesting fact to share with my reader is that the Australian Media Centre forums are the most useful of the lot.

    The other bit of news is that we invested in about 40 new tropical fish as the local fish shop is closing down. We have neons, guppies, tetras and a new catfish to replace our recently deceased one. The are all behaving nicely together and none of the three large fish have turned carnivorous either. We had one scary moment as the blue shimmery tailed guppies disappeared one by one. Turned out they loved swimming behind the fauz-rock backing. We have lowered the water level a little to solve that one….

    For the picture album, I thought Kookichoo had better get festive too.

  • N95 Video Centre Fail

    So I ripped some new movies and my Nokia refused to play them. It seems there is an obscure bug with the Video Centre where if you just copy movie files onto your memory card and for some reson, the phone cannot generate a preview image, it falls over. Quick solution is to create a small JPG file with the same name as the video file and put it in the same folder. The added bonus is that the movies now have nice “icons” when browsing on the phone.

  • 007 Shaken not Ripped

    I went to see Quantum of Solace last night with my god friend Dom. I thoroughly recommend the film. Ignore the critics, just go see it. Fewer gadgets and one-liners this time but a seamless progression of the story from Casino Royale.

    Needless to say, I thought I’d put CR on my N95 for casual out-and-about viewing. It is however the first DVD that DVDecrypter had trouble with. Darn it. Luckily there is a nother free tool called RIPIT4ME. This breaks the reading of sectors down to only valid ones and rips those. The copy-protection trick of chucking in duff sectors is thus overcome.

    I do not in any way condone film piracy but if you have the DVD already and want to watch it on your Nokia, plough through my blog to get a copy of DVDecrypter and for the settings to use in Handbrake. If DVDecrypter struggles, use RIPIT4ME instead and it will fix the problem.

    DVD piracy is taking money out of the pockets of good honest people working in the film industry. Copy legally owned DVDs onto another device for your own viewing pleasure is a neat idea. Know the difference, stay legal and happy ripping.

  • Cloning VirtualBox

    After reading that cloning VirtualBox VMs is difficult I thought I had better work out how to do it. Because if I’m going to use VM technology I need to be able to move them around the home network and back them up. The basic concepts are:

    We can copy a VDI as it is basically just a Windows file on the host machine. VDIs are VirtualBox Disk Images are image files that can hold a Virtual Machine.

    VirtualBox has a bunch of settings that explain how to launch the VM within a VDI. We need to recreate these and point it at the VDI to get a working VirtualBox.

    But…. You can’t start two machines with the same UUID. So there is a command to fix that.

    My method:

    c:
    cd "c:\program files\sun\xVM VirtualBox"
    copy "\VDI\Windows XP Server.vdi" "\VDI\Clone.vdi"
    VBoxManage internalcommands setvdiuuid \VDI\Clone.vdi

    So I basically copy the VDI (with the VirtualMachine turned off) and give it a new UUID. This works except I still have to fire-up the VirtualBox gui, create a new VM with the same settings as the master VM but rather than create a new VDI, I choose the new clone.vdi.

    What I want to do next is be able to pause the master VM, script the Copy, UUID, creation of the new VM. Luckily VirtualBox has the same command set available on Windows that the less gui-friendly OSes use. Hooray.

    I also need to script automatically starting and stopping VMs. In effect I can run an XP host which on startup can launch a bunch of VMs. Ideally it should all be able to gracefully shutdown.

    I know ESX does this better but I have some non-ESX firendly hardware in my stack and I would like to just build them as XP hosts and get all the benefits that virtualisation gives but on the cheap. So far it is looking good.

    I am also currently just running on a local disk. Running with a VDI over the LAN seems like inviting trouble but creating cloned backups on a remote disk does seem like a really easy way to do a fool-proof backup.

    I also need to get my head around allowing VMs access to the real LAN as I will want to run web servers for example on these VMs and default network settings disallow this due to the funky NAT that is in use. I guess I’m going to have to work through the command line Port forwarding…

  • VirtualBox Rides again

    After discovering that my stack of intel-based 2U servers will not run VMWare, I’m going to revert to running VirtualBox on them. Either on a WindowsXP or Ubuntu host. Either way I want to be able to:

    Create a template VM with just WindowsXP on it

    Create a template VM with WindowsXP and XAMPP on it

    Start a specific VM on host OS boot

    Automate backups

    Transfer a VM to another machine (ie. bring a VM live on a second machine after the first one fails)

    Some ramblings here might be useful: www.derekhildreth.com/

    So that’s another project then…..

  • New York and the Nokia N95

    Nokia have snuck out the 16GB micro SD card and it is compatible with my N95. Oooh.

    I found this out whilst updating my firmware and loading new maps before heading off to New York for a few days. It’s times like this that I really like my trusty N95. Sure my wife has an iphone with a far superior web browser but I have my maps, my 5Mega pixel camera, my music and a collection of movies to watch on the flight. I still have room on my 6GB memory card because I’m not greedy but with 16GB I could pretty much get every episode of Babylon 5 on my phone. If only I had the time to sit and do it…..

  • Thecus N299

    I finally bought a NAS. The chirpy little Thecus N299 (Those marketing guys earnt their money the day they thought that name up) now hums away to itself under my stairs. I loaded it with 2x500GB Seagate disks and then unloaded them and shipped them back to Scan as they were duff. I now have 2x500GB Hitachi disks in it I bought from PC World. (It cost me an extra £5 but I don’t care as this time they got home safely.)

    It has a rudimentary web GUI but is perfectly functional. I currently have it as a CIFS server called “Imp” on my home network. All our “Documents” and “Pictures” and similar shell folders now live on it. I had to build batch files for everyone’s login to connect to it with no persistence otherwise Vista moans at every logon. Files can also be accessed using the “webdisk” interface but it is not iphone friendly. So I have defaulted to the FTP variant for now.

    It also supports NFS so I will finally fire-up that rack server I have been quietening down and give VMWare a shot at home.

    I have also moved the Mercury mail queues and mail folders over to it along wth Windows Mail folders. IMAP mail has proved to be less friendly than I would like with trouble creating subfolders in RoundCube or WindowsMail. Shame really as I would prefer to just leave all hte mail on Mercury and read it from RoundCube. Future job now though.

    My masterplan (mwhahaha) is to build a simple php front-end for mail and ftp. Ideally I want FTP to stay on the LAN and use a PHP interface to wrap around it. That way I can control the authentication and don’t have to expose any (as yet unseen) potential flaws with the ftp daemon.

    By also loading my website data and (as stated above) Mercury folders on it, the active data on the web/mail server (Pixie) has reduced which helps in times of failure/recovery/upgrade and reduces the replication burden I had previously with the two server model. I’m not quite brave enough to move MySQL onto the NAS as the web server talks to the NAS over wireless and I don’t really know hoe IO intensive my websites are. Another future job. In the meantime, I’ll amend the backup/export scripts to dump to the NAS.

    The Thecus also has an iTunes server. I moved all our music to it but am yet to use that feature. I told both Julie’s iTunes and then mine of the shift to a new location and iTune dutifully cloned a load of the music. Bugger. Capacity is not a problem currently but I need to put some time aside to trash my iTunes, delete the duplicates and rebuild it again. Thanks iTunes.

    But in short, I am happy with the little fella. It just works. My files are available to my laptop, my server is not a worry so much for me now and my data is generally much safer. I will be investing in some more cat5e so that I can move him to live in the porch. It is north facing, so much cooler than the study and his little fan will go uheard there. It also puts him further away from the desktop and both less likely to get engulfed in a fire as well as more likely to be recoverable. It will need anchoring for security but will live in the corner away from sight anyway.

    I actually bought a third Hitachi to sit in my USB caddy where a suitable desktop script pulls incremental data changes over to it when I remember to run it. The Thecus is RAID1 so hardware failure is covered well but the USB disk gives me a sense of reassurance. Especially when I go away for any period of time as it lives in my sister-in-law’s house away from the NAS.

    So next job is to tell Apache to read the website data from imp directly. iTunes needs a cull and then it is time to play with NFS….

  • Nickelback Rocks!

    Went with Adam to see Nickelback at the O2 last night. It was awesome. We drank far too much beer, sang far too loudly and generally had a fantastic time. By far the best gig I’ve ever been to. Those Canadian red-neck boys sure know how to throw a shin-dig.

    Adam looking forward to a night of Rock!!!

    They started loud. We had fire. We had an impressive drum solo and constant mutterings of “Timmy!” in true South Park fashion. Their cover of “Saturday night’s all right (for fighting)” was unexpected and a real highlight. A good selection of my favourite (who told them?) tracks from “The Long Road” and “All The Right Reasons” with “How You Remind Me” from “Silver Side Up” for good measure. Of course we had “Rockstar” for the encore. Well why the hell not.

    Been there. Seen it. Done it. Bought the t-shirt. Wearing it as I type…..

    Pictures in the usual place.