JSON Parsing Nagios Script

Reading Time: 2 minutes

Parsing JSON in Bash is never usually the best idea but sometimes it may be necessary or preferred. Here’s a nice easy script which uses the ‘jq’ command to perform JSON parsing in Bash.

imgres

Let’s imagine you have the following JSON which is outputted by a stats gathering process:

{"web_rate":1,"db_rate":2,"php_rate":2}

Parsing that in Bash by writing some regex’s etc is perfecting possible but there’s an infinitely easier way. Welcome to ‘jq’. Let’s see it in action.

Read More »

That’s not a server, THIS is a server!

Reading Time: 11 minutes

I thought a wee article on what a server is and why they are expensive compared to your average PC might be interesting. When you hear someone say they have built a server for the house what they usually mean to say is they’ve built a PC and have it running various applications which serves ‘stuff’. A real server is a different beast all together.

bullion26_profi_reduced607x350

So what makes a server a server? It boils down to the hardware feature set. Sure, you can get low-end servers which are nothing more than a PC in a fancy rack mount chassis, but lets take a look at higher end goodness.

Read More »

How To Create a Tor Exit Node

Reading Time: 8 minutes

This will be a quick tutorial on how to configure an Exit Node for the Tor Network. Doing this comes with some inherent risks for the operator but exit nodes are essential for bridging Tor with the ‘clear net’. Without exit nodes, anyone suffering from ISP filtering or those not wishing to have their Internet activity logged (BBC Article) couldn’t utilise Tor to access the Internet.

tor-exit

Unlike bridges, exit nodes (and normal relays) are publicly known devices, for which their IP address and configuration is available for anyone to see. They effectively make the final connection to the destination on behalf of the originating (anonymous) client. The Tor network is drastically short of exit nodes, but for good reason. Because they are the final hop in the chain, they will be making hundreds of outbound connections to whatever website or service Tor users request. It is therefore easy for the powers who be to blame an exit node operator for ‘doing bad things’ when in fact their node is merely participating in a network, much like a traditional router would in any network. Anyway, assuming you have balls of steel and willing to run an exit node I’ll take a look at how to do this with least hassle as possible.

Read More »

How To Configure Tor On Your Network

Reading Time: 11 minutes

Tor (‘The Onion Router’) is by far the most popular solution for anonymous browsing, with over 6000 relays and 2.5 million active users.  I’m going to look at how to configure Tor on your network, in a variety of ways. The so called ‘Dark Web’ seems to get a bad press, maybe because of illegal sites like Silkroad, but it’s actually an invaluable resource for citizens or visitors to countries who have severe Internet censorship (including the UK!). Even Facebook has a .onion address, as does the DuckDuckGo search engine and Aphex Twin’s ‘Syro’ album.

tor-logo

By far the simplest and most secure way of using Tor is to install the Tor Browser. It’s dead simple and takes literally a few minutes. However, depending on your goal, there are other ways to use Tor. I’m going to look at a few ways to deploy Tor, including the pros and cons of each. These are:

  • Using the Tor Browser Bundle
  • Configuring a Tor SOCKS proxy
  • Creating a transparent Tor network

Read More »

Providing Free WiFi For Anyone To Use

Reading Time: 6 minutes

As the UK government have announced they wish to classify Internet access as a public utility (implying it shouldn’t be a privilege but should be more like electricity etc) I thought I’d share how I have opened my Internet connection for anyone to use. As long as you can receive the signal you can connect and browse to your heart’s content without any keys or passwords.

free-internet

Firstly, this is against the T&C’s of most ISPs, including mine. There’s a few (il)logical reasons for that but it’s mainly revenue protection. Even though they know a single connection would be perfectly suitable for many households to share, they would obviously lose money if everyone did that. Namely because, unlike other utilities, Internet access is generally not metered, meaning it’s a fixed cost per household per month. If your neighbour cannot afford their own Internet access or for whatever reason cannot get a contract then I feel it’s only fair to allow them to use mine. With talk of some people not being able to afford heating during the winter it’s hardly appropriate to expect them to also afford broadband. Who needs Internet access though? I mean it’s not like online shopping is generally cheaper or anything, not to mention almost everything is moving towards e-billing, right?

I’m not going to suggest everyone should just blindly open up their WiFi router for anyone to use but here’s how I’ve achieved this safely.

Read More »

Use IPv6 even if your ISP doesn’t support it

Reading Time: 6 minutes

Sometimes you just have to know something exists before you look into it. IPv6 tunnels may well be a good example. Many ISPs are stuck in the dark ages, what with their archaic attitudes and red tape procedures longer than a trip to Mars.

It’s dead simple to get IPv6 working at home via an IPv6 tunnel broker.

helogo

I guess this is somewhat ironic, given their 90’s style logo and website, but these guys provide the tools you need to get your Internet connection this side of the new millennium. Guess what – it’s FREE!

Read More »

Headless Torrent Daemon on Raspberry Pi

Reading Time: 4 minutes

If, like me, you use a Raspberry Pi as a multimedia centre it’s really handy being able to kick off a torrent without having to be logged into the Pi. This is especially useful if you want to download something using your phone, to your Pi, from literally anywhere.

transmission

Here’s how to configure Transmission so you can download torrents to your Pi from anywhere.

Read More »

How To: Read Your Neighbours Facebook Private Messages

Reading Time: 9 minutes

For a casual bit of weekend fun I thought I’d share a potential method for obtaining your neighbour’s Facebook password. This is purely educational and I used my own systems to do this but it highlights how potentially easy it can be to obtain someone’s login credentials to any website.

tumblr_lr2653aWLv1qclfey

We are going to utilise various attack vectors to demonstrate the methodology of the process. The story starts with a hypothetical situation.

Read More »

El Capitan Scared a Granny (… and more brokeness)

Reading Time: 2 minutes

I upgraded to OS X El Capitan so I could be down with the kool kats and join the revolution. Not really – I installed it ‘cos it’s new and shiny. Although the upgrade went smooth enough (and only took an hour) I discovered several applications were now broken 🙁

elcapitan

I’ll save everyone from nonsensical rambling and get down to the facts. First up, prank calls…

Read More »

Horrible IPv6 to IPv4 Hack

Reading Time: 3 minutes

With the ever greater need for the adoption of IPv6 in the Internet world it’s high time people started dual stacking services on both IP versions. Sadly, sometimes this is not possible when particular software hasn’t caught up with 1995.

This is especially frustrating when, for one reason or another, you want to use a single hostname for both services which support v6 and those which don’t.

images_ipv6

The reason this is complicated is because a single hostname Read More »