Mostly I stayed in bed and read a book

So today I didn’t exactly do much. I woke up, had breakfast in the middle of the afternoon, stayed in bed and read a guide book to Japan. It was a very relaxing morning/afternoon. I then did the dog shit run, stocked up the bird table and had some toast.

Finally got round to doing the pfSense upgrade, which is now almost completed, just need to reinstall and set up NUT. Upgraded the server packages, upgraded wordpress and al it’s packages. Upgraded my Ubuntu box. Stuck a bit more filler around the boiler flu. That needs to be sanded now really to see what a full bloody mess I’ve made of it. Ordered some pastry rolling sheet things. Ordered some more wine kits. The strawberry is cleared ready for bottling, so I’ll probably do that when I start the new ones off so I can sterilise all the stuff together.

Then we went out for a meal. Chose a different place from TripAdvisor. An Italian called ‘Di Meo’, which is at the top of Gloucester Road. Looks a bit of a tip from the outside, but a lovely little restaurant. TripAdvisor review done. Here’s my review of the “Lucky Dragon”. Then came back, got into bed again and did some more reading. Think it must be time for a bath, before, mmm, bed I guess.

I can feel a summons coming on

Still working on the mobile game. Spent most of the day trying to register an iPhone5 on test flight, it kept telling me it was an iPhone4. Eventually found out that it was because it was restored from a backup. So lots of buggering about later it decided it was in fact an iPhone5. So first version of that concept out, got some feedback, lots of work to do. I’ll start on that tomorrow. Ended up doing a few bits on the main project, again need to do a bit more on that tomorrow.

Went out for a run. Much to the dogs annoyance. She got her walk in the evening, plus we played ‘bombing the ball down the stairs’, which is always popular and knackers her out after ten minutes.

Still no receipt from plumbers. So Saturday I’ll put a formal request for everything in a letter and send that off. If after fourteen days they fail to respond I’ll send one recorded and then issue a summons. I don’t know why people attempt to piss me off, they all fail.

The Strawberry wine is almost there. Added a couple more sachets of something, now need to let it clear, then siphon it off. Then add something else, bottle it and wait another bloody four weeks. The White wine still seems to taste a bit shit to me.

New flash card arrived and USB reader, I shoved it in the Ubuntu box and it read it fine. So now transferring the latest pfSense image to it, will then try and mount it and copy the config across. Then at the weekend I’ll put the new card in and see what it does. I’m not going to bother putting gag on it this time as that seems to interfere with the automatic upgrade process. I’ll wait until I have a stable image before doing that again. I never updated the MAC address for the network card on the UPS script anyway. They are pretty low power now so the UPS can run for them for quite a while, so I’m not going to worry about it for the moment.

Need to pick Jamie up from the station at midnight. Oh joy.

pfSense – NAT reflection

Didn’t sleep at all last night, didn’t help when Jamie decided not to go to bed until around 5AM and the dog was busy throwing up. Then the phone went, it was mother, ignored. Got up and spent the bulk of the very horrible day working, well testing the mobile game, I think that’s the last day on that now, back on Android tomorrow I think.

In between testing on iPod I was installing the new pfSense box. Pain in the ass part one. So the pfSense box has no drives, all it has is a compact flash card. So to install pfSense on to it is quite a challenge. So I installed Ubuntu desktop edition to a USB stick, using Ubuntu desktop edition, which is full of bugs as far as writing out an image is concerned. You select the image name in the file selector and then it ignores you and uses whatever it can find. Anyway after getting the bootable image the next thing to do is copy an uncompressed CF image of pfSense to the stick as well. Also copy over GAG boot loader as it doesn’t suffer the PXE boot problem to do with wake on LAN (look back a few months in the blog). So when you have your image, now plug stick into pfSense box and boot it, allow about ten minutes for it to boot. Struggle to find a bash shell, open it and then block copy over the pfSense image over to the CF card using linux DD command. Once that’s done, install GAG and run the install on the CF card, it will moan about GRUB needing installing but it’s already there. Remove stick and reboot. Hopefully you will get the GAG startup screen, add the pfSense partician to the loader and set the timeout to this partician. Once that’s done let the bloody thing boot. Hopefully all will be okay and you can assign the first couple of NIC’s to WAN and LAN. Once that’s done, take your old pfSense config XML file and do a search and replace for all the interfaces and replace all the bge0/re0 stuff with the correct interface assignments. Then restore that file over to the new pfSense box and reboot. Hopefully all will come up and be working, well it was for me….except one thing, there’s always the one bloody thing….

I couldn’t connect to my server on the DMZ from the LAN side, no matter what I did, it just wasn’t happening. It’s all to do with NAT reflection, basically if you try and connect to the web server from inside the LAN it has to send out a request from the LAN IP, via the gateway, out of the WAN interface, then back in the WAN interface, through NAT and then to the server, it then has to make the whole trip back. The only way I could get it to work was to use port forwarding for each of the ports on both server IP’s and then only worked if I used the proxy to do reflection, which basically runs a deamon to ram the packet request back down the same port it came from. This worked, but I wasn’t happy about it.

So went to the gym. Came back after thinking about it, a lot. So I added a firewall rule to log packets from the netbook, just to see where they were going. With the port forwarding and proxy reflection nothing showed up in the firewall log. So I disabled the port forward and I could see the request then going out to the WAN IP address and promptly getting lost in the either. So I enabled normal reflection on the 1:1 NAT, then on the log I could see the WAN IP being translated to the internal LAN IP….and getting lost somewhere in the internal LAN. So had to think about it…there was some guff in the advanced settings about reflection only working if the rules could determine the source interface on rule loading. So then, when the request is generated LAN side it then translates it to the LAN IP from the WAN IP via the NAT 1:1 translation, it then sends it via the gateway, which is the load balancing gateway, so it could potentially send it via either WAN1 or WAN2, then it really is going to have a bit of an issue trying to work out well the hell to reflect it to. So I added a rule to the LAN which was to send all packets destined for the internal LAN IP’s of the server via the default gateway. Bingo. That worked a treat, and thinking about it, it’s the correct solution. So now when a request is set from an internal LAN IP to a WAN IP on the server, it takes the source IP, looks at the destination as that’s a 1:! NAT mapping it translates it from the WAN IP to the internal LAN IP, it then sends that via the default gateway, which then goes through the default WAN (I’m not sure it actually ever gets that far as it really doesn’t need to), goes to sever, server then replies back via the default gateway and gets translated back to the correct IP. Job done. Hours of fun, for which I didn’t have hours for.

Mother sent an email, apparently her curtain rail has fallen down. Sorry, but during the week I have 24 hours in a day, excluding the ones I’m asleep for I still have 37 hours of stuff to cram in. Your curtain poll is not high on my to do list. I still have a load of home checks to do as well. The dog didn’t even get a walk today, as the only breaks I had it was absolutely pissing down. We did have a play with her ball though when I came back from the gym. But she’s off to doggy day care tomorrow, so that’ll make up for it. She’s actually been very good considering, I don’t think she was overly keen on venturing out anyway.

My drain cleaning attachment has turned up for my pressure washer.

Right, well hopefully that’s the last about pfSense now. Incidentally it uses around 17 watts considering the old box was around 85, so that’s a hell of a power saving. Also it’s performance appears to be very good, I was getting some pretty good speed tests results. Right, I’m now finished for the day, it’s twenty to one and I need to be up at 6 to take the dog to paw stretchers. Fun fun.

pfSense – the revenge

So started of this morning with one more tweak to the mobile game, not sure if it’s been submitted to Apple or not yet. Anyway, spent the rest of the day play testing it. No real significant issues that I could see. Thoroughly enjoyed playing it as well.

Decided to try this fasting diet thing, as the only change I had to make to my existing diet to get under the 600 calories was to remove the sausage roll from my salad and the two slices of bread from my lunchtime sandwich, and that was it.

Walked the dog, we did the wet route today as it wasn’t particularly nice.

Went to the gym and did combat. Came back and started to do battle with the new pfSense box. New box is built, this is this nice Jetway board with quad lan. The version of pfSense already on the flash card is the release version and that doesn’t appear to support the new network nics. So I’m now trying to get a version of the nano pfsense on to the flash card. This is turning out to be somewhat problematic. I don’t actually have a machine with a compact flash card interface on it, except for one linux box with one mounted as a sata drive and another one on the new Jetway board. So I’m now trying to install it off a USB flash drive. The good news is the new version does seem to support the NIC’s, the bad news is it won’t actually mount as a file system. So what I’ve done now is install a bootable version of Ubuntu on to the flash drive, I’ll then copy over the cf image to it and then try and write that to the flash card. I still then have to update the boot block as it will no doubt have the old issue with being unable to boot properly from the wake on lan. So lots of fun things to play with ahead.

Today I moved my life

So started off with a call from plumber…lets call him No.3. He came round pretty much instantly, seems like a nice chap, friend of Sarah’s. Did mention that the boiler would need a permanent live as it will be switched from the time at the moment. It’s a very good point and it’s the first one to mention it. He also didn’t mind who I got to do it, hmm wonder who that will be.

Spent the day sorting out routing issues on the mobile game. Mainly an analysis and optimisation task. Appeared to be quite successful. I’ll see what Al says the performance is like on his iPhone4.

Took dog out for a walk, today we choose a new rather dull route around the industrial estate. Can’t see us doing it again. Pawstretchers called and Sasha is going to visit on Wednesday.

So tomorrow I have two plumbers, one in the morning, one early evening. So far none of them have been even vaguely attractive, let alone cute. How come in porn films the plumber is hot and has a tool like a tree trunk?

Went to gym. Did Body Combat, followed by half hour of running.

I do like my new coffee machine, almost got through a bag of beans in two days. But now does mean I won’t be able to sleep for a week.

Spent the evening moving my life, well moving MannMansion.com anyway, which contains this blog. It hasn’t moved far, about two and a half feet for the moment, but it’s now on the mini-itx box.

So the joys of moving a Ubuntu server from one machine to another. First install Ubuntu 12.04 LTS server on to new machine. Had to do this via a USB stick as I forgot it only has a CD drive not a DVD drive. Once that’s installed, best to backup fstab as restoring a backup with a different UID isn’t pretty. It’s all going to go to cock anyway as grub will have bad entries but that can be fixed later. The other thing to do is backup the udev persistent files. This was the cause of my missing network connection, it was there but moved from eth0 to eth1. Then stop postfix and apache2 on old server. Back it up as normal and then copy the backup file to the USB external drive. Then plug that drive into the new server, mount it and restore the backup. Now copy the backup persistent files over the new versions and restore the old fstab. Then reboot and watch it all horribly go wrong. You’ll get no end of mount errors, but if you ignore them all it will actually boot correctly. So reboot and run Ubuntu recovery, when that’s loaded run the ‘repair packages’ option. This will update everything and most importantly rewrite the grub boot loader. When this is done reboot again and you’ll get an error about the file system not being properly unmounted, ignore this and let it do the file system check. It will then boot as normal. Next reboot will be error free.

So I connected up to the pfSense box DMZ and made it live. I’m surprised that my SSL certificates are still valid, but that all seems fine. Apache is working okay, imap appears to be okay. Weather it’s receiving mail or not I’m not sure of yet. I’ll give it a couple of minutes….Sending mail appears to be working….dum de dum….Oh I haven’t got the printers plugged back in yet or the UPS, but I’m not really expecting any issues with those. And receiving mail is working. So final job then is to move old server out of cabinet and install new server, which is actually the old proxy box, which needs to be changed as the PSU isn’t really up to the job. So I’ll sort out a new case and then look into the second project, changing the pfSense box to a machine that uses less power than the sun….

The butt cheek incident

So this morning I got up a bit later than planned. No particular reason, not like we were having sex or anything. I had breakfast, the dog had breakfast, we both took a shit (different venues, same process). I then ventured out into the garden and got rid of the last of the soil, which was now very much mud and the knackered paddling pool. Also swept up all the leaves and bits. Need to get some new loppers.

Oh before that (chronology not a strong point as usual), I installed the new coffee maker, install being the correct word. If it was any bigger I’d have to take a wall out. Set it all up. It makes coffee. It actually makes very nice coffee. I look forward to trying out various different beans. It’s a posh one, bean to cup, Delonghi. It also produces frothy milk, so that’s 3 things in the house that can do that now.

Right, so had lunch. Sunday so boiled eggs. Then on to the next few jobs, which was a bit of painting and filling over old network panel holes, now that all the cables are in and also over some moved light fittings. Then cleaning out the bathroom cabinets. I’m sure those travel sickness pills with a sale by of 1997 are still serviceable, but in the bin they went. Then cleaned out the laundry room cupboards. I do not require three hundred different pots of shoe polish.

Then I went out and did a house check for a dog. Bit of a shame this one as the house isn’t directly connected to the garden, so I think I’m going to have to say no.

Then decided to swap the servers over. Now the new one does need a new case and PSU as the old one won’t power on properly from a mains on, also the switches are still a bit screwed. But backed up the old server to a USB external drive. Installed Ubuntu on the new machine and then restored the backup. Didn’t work. I’d named one file system MANNMANSION and the other one mannmansion. It got quite upset about this. It also then failed to initialise the network connection. So both things need to be looked into a bit more.

So now it’s a Sunday and time for a bath. And some wine. Followed by some dinner.

Oh, Sarah knows a boiler man, so I’ve added him to the list, that will be about seven in total. Still, one of them may actually be okay.

You never got to the bottom of this and really thought I was going to talk about that did you? Oh may be one day, when I’ve drunk too much perhaps…

And todays post is being typed using Ubuntu Desktop edition

It’s on here as it’s switched on and I can’t be arsed to fire up the main machine again.

Ok, so cleaning man came round this morning to give me a cleaning quote, walked round with a clipboard, that’s one step away from wearing a hi-viz. Ooo, firefox doesn’t seem to have a spell checker built in…ah it does, it just wasn’t set to the right language. Anyway, he came up with 2.3 hours and two cleaners (they always work in pairs, a bit like breasts). With the price they can do it once a fortnight and it better be bloody good.

Work wise, playing around with more Android stuff. Getting it set up on the Ubuntu box, there’s also a solution I’m looking into for dev studio as well.

Managed to find a reasonable Mini-ITX board that was display stock, so got it for £50. It’s dual core and apparently only needs about 20 watts. Hopefully it will fit and work in the old proxy case. I think I may have found another board also that would be good for pfSense, but one thing at a time.

Went to gym, did combat, ran for twenty seven minutes afterwards. Now I’m going to eat salad and watch the Indian Grand Prix. Man coming tomorrow to give me a quote for new boiler and doing the bathroom.

I must admit ‘Ted’ did make me chuckle

So started off with changing part of the audio lib to use the lock free ring buffer, that all worked fine. So then changed a header file that I forgot to do before. That was about all I had time for as I had the afternoon off. Sarah popped round and we took the old mattress to the skip.

I then took the dog out, which wasn’t specifically timed for when the in laws arrived, honest. Anyway they were painless and brought cake and sausage rolls, plus tomatoes so are forgiven all sins. They left Megan though.

Ended up installing desktop Ubuntu on another one of my SFF PC’s. Went to the gym and did pump. Came back, picked everyone up and went to La Piazza at Aztec West. It was ok, but I’m sure it’s been better in the past. Came back, sat on the toilet. Then we went out to the cinema and watched ‘Ted’, a film about a Teddy Bear that comes to life. It’s certainly not a kids film and has some killer gags in it. Now sat in bad typing this up with a nice glass of white.

Ha, got you, you bastard

Started out fixing a couple of mobile game issues then working on yet another bloody codec. This time IMA4 which has yet another file format, at least this one is RIFF based. Managed to get it decoding without too much stress.

So then on to the outstanding issue, the bloody UPS and powering down / up the server and the pfSense box. First thing I noticed was that when the pfSense box shut down, it magically woke again when the server deconfigured the network. Then another problem when the server was booting I couldn’t get the script to activate in the correct place to wait for the network to come up.

Anyway, the final solution….

pfSense box has it’s shutdown modified to trigger after 1 minute. This needed to be done in the package php script rather than the nut conf as it reruns it every reboot. That’s the only change required on the pfSense box. On the server the nut script is modified so that it pauses rather than shuts down the ups. Then a script is added to to init.d, this checks the shutdown flag, if set then it sends the wake on lan to the pfSense box and deletes the flag. It then starts a reboot on another bash shell set to 2 minutes, this stops the script jamming and also stops an issue with grub reporting a bad boot and stopping on the grub screen.

So it works like this: Power goes off, UPS goes critical, server then sends a remote shutdown to pfSense box. pfSense box then starts a shutdown delayed by 1 minute (to stop the reboot from the network deconfigure). Server then shuts everything down and just waits. Then either the UPS power runs out and everything shuts off or power is restored. Doesn’t matter either way, the server will reboot after a time out or after the power is restored. Server boots, power kill flag is set to script runs a wake on lan to pfSense box. pfSense box starts booting. Server starts a shutdown and reboot for 2 minutes. It then continues to boot and fails all over the place due to no network. Eventually gets to log in prompt. Then shutdown occurs and reboots. Server then boots normally as pfSense box is now up. Job done. Yes I am good.

Also went to gym, ran for 72 minutes and knocked up 1000 calories. I’m now going to drink wine, eat cheese and watch torture porn.

So, no pony sex then

After last nights Chinese and large amount of beer / wine combo all I was greeted by this morning was a large dog poo and pool of piss. Can’t blame the dog at all, I know she would have tried to wake me and failed. She did look rather guilty though, and gave me that ‘I jumped on your head at 4AM and you failed to respond’ look. It rained constantly all morning so put off the normal dog walking session and moved back on to doing server experiments. Basically you can fill a machine with network cards and providing they are on the PCIe bus (including the built in NIC), they will always transfer at a pretty constant 942Mbps. If you use the PCI bus however then you get 778Mbps (Even with Intel cards), also I’m sure if I managed to get it going that transferring from two PCI cards would have been even slower. So anyway, now built the pfSense machine up, removed the hard disk and replaced with a flash memory card, installed 4 additional NIC’s, 2 PCIe and 2 PCI. So that gives me 3 high speed connections and two slower ones to choose from. I only need 4 network ports really, but I’m sure I’ll find a use for them all.

The amusing thing is I’be had to configure one of my Ubuntu PC’s to run minicom, as when you install the embedded kernel on pfSense you get no VGA driver. The last time I used a null modem cable I think was in the 80’s. Anyway, it’s installed and it boots fine from the flash card and all the tty appears on minicom. Just set up the firmware load for the wireless (otherwise you have to unplug it each time as the driver isn’t built into the kernel). Next step is to do some proper pfSense configuration, but that’s enough on it for today, but great progress.

Oh yes, for some reason I asked Jamie if he would dress up as Rainbow Dash and I could dress up as Derpy….he turned me down, but did enquire into how I suddenly knew so much about ‘My little pony’.