Tech Fixes

Vagrant up on Windows 10 with Hyper-V

Posted on Updated on

Warning: This is essentially a brain dump, so it is more like a set of notes than a tutorial as such. I’m planning to clean this up and develop it as I go along. It’s incomplete. I’m publishing this, because otherwise it will sit as a draft probably forever. This is mostly me talking myself through troubleshooting, I do that a lot. Read the rest of this entry »

A temporary fix for Logstash S3 input authentication

Posted on Updated on

A while ago I ran into an issue where I couldnt use Logstash and the ‘logstash-input-s3’ plugin, and the manual authentication method didnt work well.

Read the rest of this entry »

Process AWS ELB logs with Logstash! update!

Posted on

I previously wrote about making a grok filter to process ELB logs.
I have since worked on this further and developed an updated filter, which has been working very well for some time now.
As there were some comments on the previous post, I thought I should upload my working copy that I use right now also.
Read the rest of this entry »

Process AWS ELB logs with Logstash!

Posted on Updated on

I recently ran into a problem with Logstash, where it would not correctly and consistently process AWS (Amazon Web Services) ELB (Elastic Load Balancer) logs from an S3 bucket.

ELB logs are the standard method of logging ELB usage and activity in AWS, and are very useful when trying to determine a wide variety of trends and activities.

I was determined to get ELB logs into Elasticsearch, using logstash, so I needed to figure out a few things… Read the rest of this entry »

Fixing permissions on CloudTrail S3 objects

Posted on Updated on

Where I work we aggregate all of our AWS CloudTrail logs from separate accounts into a single S3 bucket in a central account.

Yesterday, I ran into a weird problem where I noticed that our Logging solution, ELK, would not process files dating before a certain time.

Upon further investigation, I discovered that the date period missing was before we moved all of our existing files into the bucket from the AWS account it was originally in. So, “simple!” I thought to myself, “I’ll just update the permissions and allow ELK access to the files!”.

I was wrong, not simple. I had to fix this anyway… Read the rest of this entry »

How to enable remote Powershell Script execution

Posted on Updated on

I develop and run quite a few little network scripts to automate repetitive and mundane tasks, and I try as much as possible to do this remotely, without requiring to log onto a particular machine.

I recently ran into a Powershell error that prevented enabling remote Powershell Script running, using the command Enable-PSRemoting. Read the rest of this entry »

Get IP List from Pingdom using Powershell

Posted on

I write a lot of little scripts to do everyday tasks while I work, and I think I should share some of them. Read the rest of this entry »

Adventures in soldering – Fixed my Xbox 360 wireless adaptor

Posted on Updated on

Over the weekend I started playing some PC games and decided that it was better to use a game pad.

It was at that point I discovered that my trusty PC wireless adaptor for my Xbox 360 gamepad(s) had stopped working, as in dead. I tried to revive it in every way I could, but I gave up and figured it was a case of fix or buy new. Read the rest of this entry »

Creating a Windows NAT in Amazon Web Services (AWS)

Posted on

As I’ve probably stated before, I use Amazon Web Services on a daily basis in my work, and recently I’ve been considering moving my own private hosting to them (For this very blog, for example).

The problem I have with Amazon Web Services, is that it seems to me that they should stick a big ‘BETA’ sticker on the front of it. I say this because although AWS has a lot of genius and good ideas, as well as being very affordable, it is somewhat buggy. There are also a lot of unexplained and odd things that happen when you do more advanced things within its infrastructure.

For examples of these glitches, have a look at the AWS Support Forums. Read the rest of this entry »

Convert Putty .ppk Private Key To A Normal SSH .ssh Key You Can Use On An Apple Mac

Posted on

This is from another article which I found very useful yesterday.
The original article is found here.

Also, how to connect to a server using SSH on a Mac

I spent ages trying to figure this out so that I could SSH onto my production hosting server from my iBook. Now that I know what was wrong, I can’t believe how long it took me to solve, because the answer is so simple – but unfortunately I never found anything in Google that helped me, it was only pure luck and dogged perseverance that helped me figure this one out.

I found I

already knew that I could open an SSH connection on my Mac using Terminal, and I could SSH onto my production server from my XP pc using Putty with no problems.

So when I copied my .ppk Putty key from my PC to my Mac I expected to be able to type:

ssh -2 username@ –i yourkey.ppk

from within Terminal and get straight onto my server with no questions asked.

But oh no! it’s not quite as easy as that – well these things never are, are they?

Let start with the very basics, you can find the Terminal program on your Macintosh in Applications -> Utilities.

Open it and you have something resembling a Windows DOS prompt.

Now if you already have a .ppk file from your PC that you want to convert to use on your Mac you need to visit the Putty Website and download puttygen.exe (on your PC) now open it, and using the File menu, load your .ppk that you already use, and type in your pass phrase.

Now go to the Conversions menu and export the key as an OpenSSH key – hey presto – you now have a key file that will work on your Mac! Such a simple solution, yet that took me so long to figure out …

Anyway, now you just need to copy your new .ssh keyfile over to your home (~) directory on your Mac and set the permissions to 700 (chmod 700 yourkey.ssh).

Once you’ve done all that you can use the ssh command.

 ssh -2 username@ –i yourkey.ssh 

and you should be able to SSH onto your box as you would from your PC – amazing!