SheevaPlug Development Kit

A few months ago, I decided to purchase a SheevaPlug Development Kit to replace my previous home server which was an old Dell workstation. The main reason to replace the old machine was power usage, for a machine that is sitting idle most of the time, it costs a lot of money to run.
All I needed was a device on which I could run linux to run some typical core network services (DNS, DHCP, NTP) as well a some extras like my internal mail server and proxy. With a power consumption of only a few Watts, the SheevaPlug was ideal for this purpose. Its a pretty small device with the following specifications:

Specifications

  • 1.2GHz Marvell Kirkwood 6281 CPU
  • 512MB DDR2 400MHz RAM
  • 512MB NAND Flash
  • Gigabit Ethernet
  • USB 2.0 Host
  • SDIO interface for SDHC cards
  • Serial port

Installation

The SheevaPlug is shipped with Ubuntu 9.04 “jaunty” installed. The standard software image does have some issues, so the first thing I did was upgrad to the latest version using the SheevaPlug installer 1.0. This involved attaching the serial console to a PC and running a script which loaded the new software from an USB stick. This wasn't very difficult, but not exactly something a novice should attempt either. The only issue I ran into was that the USB stick used to perform the upgrade couldn't have any partitions on it. So the stick had to be wiped and formatted as one big FAT32 partition (mkfs.vfat -I /dev/sdX).

After the upgrade was completed, the device was ready to be configured just like any other debian-like linux machine.
Because the size of the internal flash is limited, I installed a 4GB SDHC card to mount the directories that are most likely to fill up the storage.

The next issue I ran into was that after logging in via SSH, the device complained about missing nl_BE locales. Because those are not available on the plug and I didn't really need them, I set the locale to en_US by creating /etc/default/locale with the following contents:

  1. LANG="en_US.UTF-8"
  2. LANGUAGE="en_US.UTF-8:en"

Software

I installed the following software packages, which are working without issues:

ntp
Internal primary NTP server for use by all clients. Obtains the current time from several external clock sources
bind9
Internal primary DNS server. Hosts the internal DNS zone and accepts DDNS updates from the DHCP server.
dhcp3-server
Internal DHCP server. Assigns IP addresses to clients and updates the DNS records.
squid3
Proxy server. I don't really need caching, but to access some websites, I need to use an external proxy server. Instead of having to change the client settings every time, this proxy server simply redirects requests for some websites to different upstream proxy servers
postfix
Mail relay. All outbound email needs to pass via this server, again to make it easier to switch to different upstream ISPs and to detect abuse in case a clients gets infected by a virus.
dovecot
Internal IMAP server. This hosts the users mailboxes. Email is retrieved from the ISPs using fetchmail and then stored on this server so that it can be accessed from any computer in the house.

Experience

The device is working pretty well. Other than a small issue with the SD card, everything has been running stable for a few months now. One of the major drawbacks at the time is the price. Its only 99USD, with shipping costs that adds up to a little over 100EUR plus an additional 30EUR VAT and fees.

For others interested in purchasing this device in Europe, there now is a company selling them from the UK so you can avoid the additional fees, NewIT. I don't have any experience with them the offers look pretty nice. They can even sell different models, so you won't have to perform the initial upgrade yourself. If anyone has experience with them, good or bad, let me know. I'll probably get another one just to experiment with.

Blog Category:

Iphone tethering mobileconfig for Mobistar

Update: This no longer works with the 3.1 firmware - go thank Apple & Mobistar for that..

The easiest way to enable tethering on your iPhone is to browse to websites like http://help.benm.at which have configuration files that you can install on your phone. However, all the mobileconfig files I found online didn't work for me as they used the wrong APNs. My account needs to use "web.pro.be" for data and "mms.be" for MMS.

So I created my own mobileconfig, attached to this article. Use at your own risk, I'm not going to guarantee that anything here is correct, but it has been confirmed to work (both tethering and MMS) by several people. To install, simply open the attached file from your iPhone.

Of course, keep an eye on your bandwidth consumption, it isn't cheap.

Policy based routing on Juniper Netscreen firewalls

Cleaning up my home directory, I found this presentation I made back in 2006 while beta-testing the policy based routing functionality in netscreen firewalls.

Posting it here as it might be of use to some people.

Backing up delicious bookmarks

Social bookmarking services like Delicious are great for sharing your bookmarks with others or just across multiple computers. But one disadvantage of having them stored in a central location is that you have no control over the backup strategy they use. What if they suffer from a system crash and lose all your data?
If you think I'm just being paranoid, think of what happened to Ma.gnolia recently.

Just to be safe, I wrote a simple little script that takes a copy of all my bookmarks - in XML format - and stores it locally on my PC. Because it is in XML format, converting this data to some other format in the future should be fairly trivial.

  1. #!/bin/sh
  2.  
  3. # Your delicious username and password, separated by a colon
  4. CREDENTIALS="UserName:YourPassword"
  5. # Location where the backup will be stored
  6. BACKUP_DIR="$HOME/backups/del.icio.us"
  7.  
  8.  
  9. if [ ! -d "$BACKUP_DIR" ] ; then
  10. mkdir -p "$BACKUP_DIR"
  11. fi
  12.  
  13. DATE=$(date +"%Y%m%d")
  14. curl --user "$CREDENTIALS" -o "$BACKUP_DIR/bookmarks-$DATE.xml" -O "<a href="https://api.del.icio.us/v1/posts/all"

">https://api.del.icio.us/v1/posts/all"
[/geshifilter-code]

The script is run from cron on a regular basis, so even if something were to happen to Delicious, I still have a copy of all my bookmarks. Lets hope I never need it.

Blog Category:

Pages

Subscribe to Bart Jansens RSS Subscribe to Bart Jansens - All comments