Sunday, 30 September 2012

Diagnosing Routing Problems

A friend of mine was having trouble with web requests not working to a specific site from his home office.  The usual investigations of DNS, tracert and the like showed that the requests were heading off to the correct server, but they never seemed to return.  As my friend didn't have admin access to the server to check if the requests arrived, I decided to set up a proxy to see if that would help with the diagnosis.  Here are the steps:

  1. Installed squid using aptitude
  2. Aptitude turned on squid by default.  As I didn't want to risk having an open proxy, I turned it off with:  sudo /etc/init.d/squid stop
  3. Edited the config file: sudo vim /etc/squid/squid.conf
  4. Added access line just for my IP
    1. acl allowed src 123.456.789.012
    2. http_access allow allowed
  5. Fired up the squid server with: sudo /etc/init.d/squid restart
  6. Added the proxy settings to the browser:, port 3128
  7. Checked the access log: sudo less /var/log/squid/access.log
  8. That seemed to be working fine, so I remembered that there had been a really good post on the GeekUp mailing list about monitoring traffic hitting a server, so I went and had a read
  9. I installed tcpdump with aptitude, and then...
  10. sudo tcpdump -i eth0 host

With the proxy set up the PC connected to the target server just fine.  I think it is something wrong at the server end and I don't have control of that.  Over to the server's admins...

Sunday, 23 September 2012

NTFS Limits On Linux

I've come unstuck with my backup approach of using an external USB drive on Linux formatted with NTFS.  Duplicati puts lots of files in a single folder for a big backup.  I ran up against the limitations of ntfsmount.  The ever helpful serverfault hive mind told me I should really be using ext3.  I agreed with them.

Here's the steps to try again.
  1. umount /dev/sdb1
  2. Unplug an copy anything important over to a windows PC
  3. Plug back in
  4. mkfs.ext3 /dev/sdb1
  5. mount /dev/sdb1 /mnt/usbdrive

File Editor And SFTP Combinations

Just a quick note to list my current combinations for editing remote files over SFTP is:

Windows PC Based

Notepad++ and the NppFTP plugin that comes in the default installer.

Mac Based

Android Based

Friday, 21 September 2012

NTFS USB Drive On Debian

I'm just diving in to getting NTFS working on my Debian server.  Here are the steps so far...

  1. Use aptitude to install ntfsprogs
  2. Plugged in the USB drive
  3. Watched /var/log/syslog to see what it thinks about the USB dive
  4. The logs show that it assigned it to sdb1
  5. Created a mount point at /mnt/usbdrive
  6. Mounted with: ntfsmount /dev/sdb1 /mnt/usbdrive
  7. Hmm...the mount failed and it said I needed to chkdsk /f on windows.  I gave it a whirl
  8. Windows didn't report any problems, so I tried again
  9. Debian worked like a charm
Off to set up the mounted drive as my Duplicati backup.

Tuesday, 18 September 2012

New Backup Approach

I've decided that the time has come to move on from my current backup solution with Wuala. Now that I need about 200GB backed up I'd be looking at a bill of around £150 plus per year. The new plan is that I'll set up the backup infrastructure myself.
I'm going to use Duplicati as the software to drive the backups. I'll have an SFTP server set up on the home LAN  to which I'll configure all the local PCs to backup to each day. I then plan to setup a Raspberry Pi with an attached USB disk drive as an offsite backup. I'll install this in my father's house and get my home LAN server to again backup to it overnight using Duplicati.

Sunday, 9 September 2012

Manchester Raspberry Pi Jam

#1 son and I had a great time at the Manchester Raspberry Pi Jam at Madlab on Saturday.  We got the Pi up and running and making an LED flash morse code out.  Turns out you've got to worry about the length of the gaps just as much as the length of the flashes.

Here's a video of the Pi saying 'Hi Mum'.  I promise it is the Pi doing the work and not the laptop.

The plan for next time is to make a bright enough light source that another board connected to a Pi can read the Morse Code back in using a photo-resistor.

Wednesday, 5 September 2012

Raspberry Pi Running Headless

I've got the Raspberry Pi up and running in headless mode.

  1. I used the general instructions here: 
  2. With specific headless information from here:
  3. Installed the Debian Raspbian “wheezy” image on the SD card
  4. Connected power and Ethernet cable
  5. Found the IP address off the router
  6. ssh to the pi user on that IP using password of 'raspberry’
  7. Ran the setup with sudo raspi-config

Saturday, 1 September 2012

Off To Arduino Course

I'm on the tram on the way to the Arduino course at Madlab. Very excited.