Raspberry Pi 2 Bitcoin Node

Not long ago I set up a Bitcoin node on a Debian Wheezy VPS to teach myself about Bitcoin and the blockchain in general. It was a great learning experience but the memory requirements of the Bitcoin software kept causing my VPS instance to run out of memory. So the kernel would constantly be killing off the bitcoind process. A growing blockchain also meant the node was getting close to the limit of its available disk space as well. Increasing the amount of disk space available to the VPS instance with the plans offered by the hosting provider was going to be prohibitive for the purpose. So I was forced to assess other solutions. Luckily I had a spare Raspberry Pi 2 that I had yet to do anything with at home. So I made the decision to try and install a Bitcoin node on that instead to save some money. The main expense with using the Raspberry Pi was going to be finding enough storage for the block chain. I didn’t have an SD card that was big enough at home to accommodate the operating system image and the block chain. So I opted to buy a cheap external USB flash drive to keep it separate from the root filesystem. After formatting with ext4 the flash drive has 57Gb of available space, at the time of writing the blockchain takes up 40Gb of space so that leaves a further 17Gb for future growth. […]

By |May 26th, 2015|Hardware, Linux, Open Source|0 Comments

Running a Bitcoin Node on Debian Wheezy

Over the last few years I have keenly followed the rise of Bitcoin from its early days trading at around $8USD. I watched with interest when it made its sharp rise to $1200USD and then felt dismay with more recent decline back to around the $200USD mark. As a whole I think Bitcoin and the Blockchain are both game changing technologies that are yet to see their full potential. So over the last few months rather than just watching the Bitcoin exchange rate bounce around the place. I sought to get a deeper understanding of how the underlying technology works and how it can be extended further. As part of this learning process I decided to set up a Bitcoin node both to act as learning resource for myself and to help contribute something back to the larger Bitcoin network. In this article I am going to run through the process of turning a VPS running Debian Wheezy into a fully fledged Bitcoin node. […]

By |January 22nd, 2015|Linux|0 Comments

Creating a Simple Iptables Blacklist

Anyone that had ownership of  a server for any length of time quickly learns that the Internet is full of spammers, bots and other characters you would prefer didn’t exist. A firewall is key to keeping these guys at bay and Linux comes with a Kernel level firewall called iptables that can be employed for this purpose. The only downside of iptables is that people who don’t deal with it on a regular basis tend to find its syntax a little bit daunting. In this post I am going to run you through the process of setting up a basic firewall IP blacklist. Using a bash script to read list of blacklisted IP addresses and feeding these to iptables so they can no longer access your server. Creating the Script First up create decide where you would like the script to live. for this example I am just going to put it in /root/scripts. i.e mkdir /root/scripts nano firewall.sh […]

By |June 16th, 2014|Linux, Security, Uncategorized|0 Comments

Creating a Tor Relay on Debian

The TOR project has proven itself an indispensable tool in the fight to protect the anonymity of people on-line. The project needs servers to route traffic through for the project to achieve its goals though. So contributors are needed to donate relays nodes ensuring a free Internet for all. In this post I am going to run you though the process of installing TOR and configuring a relay service for use by the network on a Debian system. Installing & Configuring Tor First up login to your machine via a terminal, update the package library and install the Tor server: apt-get update apt-get install tor Then change into the Tor config directory cd /etc/tor […]

By |June 12th, 2014|Linux, Security|0 Comments

PHP FPM Errors After Upgrade

Recently I noticed a few of my servers had stopped serving my sites, with  502 errors being to visitors. I took a look at my site logs and noticed that they were full of the “Permission Denied” errors below: 2014/06/09 09:45:17 [crit] 11453#0: *22 connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied) while connecting to upstream A little more investigation and I found that a privilege escalation issue in the PHP default fpm configuration had been found. This had consequently been fixed in the latest releases. But unless a systems administrator is paying attention and knows that changes to the config are required, upgrading the PHP instance leads to a broken web server. […]

By |June 10th, 2014|PHP, Security, Sysadmin|0 Comments

Encypting Diectories With eCryptfs

eCryptfs is an encrypted file system that works at the file system level. In this post I am going to cover the basic usage of eCryptfs and some of the situations you may want to think about using a encrypted file system. What is an encrypted file system? File system encryption protects information by converting [...]

By |December 14th, 2013|Linux|0 Comments

Raspberry Pi Overclocking

Like just like alot of other people as soon as the Model B Raspberry Pi went on sale in March I eagerly rushed out and ordered one from Element 14. Due to production delays this didn’t arrive till the start of June.  But given its size, specs and price I was more than happy to see it finally arrive in the mail. Upon its arrival I rushed down to the store and brought a USB card reader, a couple of 16GB sdcards and a HDMI to DVI cable so I could use a standard LCD screen I had laying around as a display. A couple of corrupted attempts at writing the images to the sdcard with dd later, and I was up and running the standard Debian Squeeze image. After a quick poke around the internals I took a quick peek at the CPU information with  “cat /proc/cpuinfo” and was presented with the following output: Processor    : ARMv6-compatible processor rev 7 (v6l) BogoMIPS    : 697.95 Features    : swp half thumb fastmult vfp edsp java tls CPU implementer    : 0x41 CPU architecture: 7 CPU variant    : 0x0 CPU part    : 0xb76 CPU revision    : 7 Hardware    : BCM2708 Revision    : 0002 Serial        : 000000001e57390e […]

By |June 26th, 2012|Hardware, Linux|0 Comments

Near Realtime File Replication With Lsyncd

Ever wanted real time backups of  directories on your server? To replicate static media files for a website to a separate box to reduce load? An easy solution lays with lsyncd it allows you to watch a directory structure on your file system, and replicate any changes on a remote system. How It Works: inotify is a Linux subsystem available from the 2.6.13 release of the Linux kernel that monitors changes made to a file system and reports these changes to interested applications. lsyncd is an application written in lua that uses the inotify service to inform it of changes made to monitored directories and then when notified of a change uses rsync to replicate the changes on a remote service. Getting lsyncd The lsyncd sourcecode can be downloaded from Google Code and compiled but depending on the distribution your server is running, the install process be even easier as lsyncd is included in the repositories of many popular Linux distros. Installing On Debian / Ubuntu While lsyncd is included in both the repositories of Debian and Ubuntu but unfortunately its an outdated version so check what version you are going to get beforehand with the command: apt-cache show lsyncd If apt-cache tells you that only one of the 1.x versions are available, I would recommend grabbing one of the 2.x versions from the Debian testing repository instead, the amd64 package can be found here  and one for the i386 architecture here. Then install using the dpkg command i.e cd /root wget wget http://ftp.au.debian.org/debian/pool/main/l/lsyncd/lsyncd_2.0.4-1_amd64.deb apt-get install lua5.1 rsync dpkg -i lsyncd_2.0.4-1_amd64.deb […]

By |July 21st, 2011|Linux|2 Comments