Latest Publications

Secure online backup and restore with Tarsnap

beastie Data has become a critical part of any environment. In order to be able to restore data in the event of loss or changes, system administrators need to backup data.

When choosing a backup and restore method, it is a good idea to think of reasons and requirements for restores. Typical reasons for restores are written changes to files, accidental deletion of files, failed (crashed) harddisks (storage media), damaged hardware (servers, computers, workstations, laptops), theft of hardware and impound of hardware during search and seizures by authorities (police, tax, court, judge).

Tarsnap is a secure online backup service for BSD, Linux, OS X, Solaris, Cygwin, and can probably be compiled on many other UNIX-like operating systems. The Tarsnap client code provides a flexible and powerful command-line interface which can be used directly or via shell scripts.

Tarsnap was written by Dr. Colin Percival. In January 2004, Colin became a FreeBSD committer and a member of the FreeBSD Security Team; he became the Security Officer for FreeBSD in August 2005, a position which he has held since. Aside from his work as FreeBSD Security Officer, he is probably best known in the FreeBSD community for his work on FreeBSD Update and Portsnap.

This example will install Tarsnap on a FreeBSD operating system.

Log in as root on the server in question and perform the following commands, that will install the Tarsnap client.

cd /usr/ports/sysutils/tarsnap && make install clean

Visit the website, create an account and add funds to your account. Perform the following command, that will generate a cryptographic key for encryption of your data.

tarsnap-keygen --keyfile ~/tarsnap.key --user foobar@foobar.com --machine starnix

Store a copy of the key in a safe place. Perform the following commands, that will configure Tarsnap.

cd /usr/local/etc
cp tarsnap.conf.sample tarsnap.conf
nano -w tarsnap.conf

That’s it. Tarsnap is now installed and ready to be tested.

The following commands will test the Tarsnap client and service, create remote archives, list archives on the remote site, restore from an archive on the remote site and delete an archive on the remote site.

tarsnap -c -f 2010-03-08 /usr/home/ann /usr/home/bob
tarsnap -c -f 2010-03-09 /usr/home/ann /usr/home/bob /usr/home/charles
tarsnap --list-archives
tarsnap -x -f 2010-03-08 usr/home/bob
tarsnap -x -f 2010-03-09 usr/home/bob
tarsnap -d -f 2010-03-08

The first archive 2010-03-08 is created and the homes of Ann and Bob is uploaded in compressed and encrypted blocks. The next archive 2010-03-09 is created and only the changes in the homes of Ann and Bob since last archive and the home of Charles is uploaded in compressed encrypted blocks. The list of archives will show the two archives 2010-03-08 and 2010-03-09. The restore of the home of Bob from the first archive 2010-03-08 will restore the home of Bob as it was at that time. The following restore from the archive 2010-03-09 of the home of Bob will restore the home as it was at that time. The restored directory structure is written to the current directory.

The Tarsnap client only upload the absolutely necessary blocks, that is not present on the remote site. The remote site only stores the absolutely necessary blocks, that is needed to restore the archives. No block is stored twice on the remote site even though archives appear to contain the same (doublettes) files.

Perform the following commands and configuration, that will configure FreeBSD for automatic regular backup.

nano -w /etc/crontab

37  22   *   *   *   root   /usr/local/bin/tarsnap -c -f `date +\%Y\%m\%d`

killall -HUP cron

FreeBSD will make sure, that the Tarsnap client will be executed every day at 22:37 and create a new archive, that is named after the server and current date.

Setting margins for printing in Evolution Mail for Ubuntu

evolution The default margins for printing in the Evolution Mail client for the Ubuntu operating system is close to the edges of the paper per default. This is the procedure for setting the margins.

Open Evolution Mail. Click File. Click “Page Setup…”. Set the value of “Format for” to the printer in question. Set the value of “Paper size” to “Manage Custom Sizes…”. Set the name to your name. In this example, values for a papir size of A4 is used. Set the value of Width to 210 mm. Set the value of Height to 297 mm. Set the value of Top, Bottom, Left and Right to 20 mm. Click Close. Set the value of “Paper size” to your name. Click Apply.

Updating the rules of SpamAssassin

spamassassin In order to stay updated with the latest spam identification rules, it is necessary to update the internal rules of SpamAssassin.

This procedure for SpamAssassin on a FreeBSD operating system will check for updates in rules, and, if available, download and install them.

SpamAssassin provides a silent utility, that downloads and installs the latest rules from a SpamAssassin channel in a secure manner using The GNU Privacy Guard.

sa-update && /usr/local/etc/rc.d/sa-spamd reload && "Rules of SpamAssassin was updated and SpamAssassin was reloaded."

An exit code of 0 means, that an update was available, downloaded and installed. An exit code of 1 means, that no updates was available. An exit code of 2 means, that an error occurred.

Protecting personal data

thief Thinking, that you are above reproach, is not enough to stop your personal data from being used against you by authorities, employers, marketing campaigns, hackers and sick people with or without your permission or authorization.

Personal data can be used for theft of identity, criminal activities, revenge and other critical abuse, that can give you severe trouble with authorities, debt and other traumatic events. You can as innocent even get arrested and emprisoned.

Make sure, that the personal data, you give, is proportional to your goal. An example of this is when you as a private person is buying a service or a product from a private company – and the private company asks for your social security number. This is not proportional to the goal and should be denied.

Make sure, that your service memberships, subscriptions and accounts use different  usernames, passwords and mail addresses. An example of this is when you use the same password for all services, such as computer, mail and social networks – and a hacker obtains the password from the least secure service. This might give the hacker access to surprising amounts of personal data about you and your relations.

Make sure, that you have a policy for using social networks. The policy should include your rules for privacy settings, personal data, content, applications, quizzes, relations and sharing. An example of this is when you make unverified relations or accept applications and share personal data, that can be abused.

Make sure, that you have a policy for content of conversions, chats and communication. You can assume, that most conversations are logged, monitored and recorded. This includes public areas, rooms of interest, fixed phones, mobile phones, messaging, mail and social networks.

Make sure, that you use secure encryption when transmitting or storing private data. Use digital signing and encryption of mail. An example of this is when you submit credit card details to an insecure non-encrypted payment service. Another example is when you store private data on an insecure non-encrypted computer, which is then lost during transportation, subject to theft or hacking.

Make sure, that you use and surf the internet anonymously. Replace the domain name service (DNS) servers of your internet service provider (ISP) with open DNS servers. Replace the mail service of your ISP with your own mail service. Replace the proxy server of your ISP or the direct connection to the internet with a connection through a network of virtual tunnels, such as Tor.

Make sure, that electronic devices, that leaves digital tracks, are turned off or is offline when not in use. This include mobile phones, computers, watches, sports equipment, security wear and other devices, that use trackable systems, such as GSM, GPRS, GPS and other networks.

Make sure, that you can get advice from a system administrator and a criminal defence lawyer.

Learn more at European Association for The Defence of Human Rights, European Digital Rights and IT Political Association of Denmark (IT Politisk Forening).

Password protecting a website

beastie Password protecting a website or part of a website is used to control access.

Which method you use depends on the operating system, web server, language and content management system.

If you use the FreeBSD operating system and the Apache web server, a simple solution is to use the htpasswd utility.

In the following example, two users are given access to a password protected part of a website. Each user will be given a username and a password.

nano -w www/www.foobar.com/ppc/.htaccess

AuthUserFile /usr/home/foobar/www/www.foorbar.com/ppc/.htpasswd
AuthType Basic
AuthName "Foobar Password Protected Content"
Require valid-user

passwd -c www/www.foobar.com/ppc/.htpasswd ann
pass www/www.foobar.com/ppc/.htpasswd bob

When opening the password protected part of the website, a dialog appears, and, if correct password is given, gives access to the password protected content.

Note, that website password protection should not be considered safe in general.

Pictures from Open Source Days 2010

Here are some of our mobile phone pictures from the Open Source Days 2010 conference. Enjoy!

WordPress, pictures and galleries

nextgen-gallery The content management system WordPress has a built in feature, that can handle pictures. However, this is not a well working feature. Fortunately, WordPress supports the use of plugins, which are extensions for WordPress. You can find many different plugins for WordPress on the homepage of WordPress.

NextGEN Gallery handles pictures much better. It is easy to create a new gallery, upload one or more pictures into it – and then insert a picture from the gallery or the complete gallery into a post. The way, that NextGEN Gallery displays pictures is neat, smooth and fast. It supports full screen.

This procedure will install NextGEN Gallery.

cd wp-content/plugins
ftp http://downloads.wordpress.org/plugin/nextgen-gallery.zip
unzip nextgen-gallery.zip
rm nextgen-gallery.zip

Open the website. Click “Log in” or “Site Admin”. Click “Plugins”. Find “NextGEN Gallery”. Click “Activate”.

The plugin is now installed and it is ready to use.

Click “Gallery”. Click “Upload pictures”. Set the value of “New Gallery” to the title of your new gallery, such as “2009-04-16 The Queen and Chris-Craft”. Click “Add gallery”. Click “Upload Images”. Click “Browse…”. Select file with MouseLeft. Select more files with Ctrl and MouseLeft. Click “OK”. Set the value of “in to” to the new gallery. Click “Upload images”.

If you want to insert  gallery when adding or editing a post, then click the “Add NextGEN Gallery” button. Set the value of “Select gallery” to the new gallery. Click “Insert”.

If you want to insert a picture from one of the galleries, then click the “Add NextGEN Gallery” button. Click “Picture”. Set the value of “Select picture” to the picture. Set the value of “Float” to either “Left”, “Center” or “Right”. Click “Insert”.

Open Source Days 2010

Open Source Days is the largest open source conference in Denmark with a low budget, high quality, dedicated crew from the open source community and 6 tracks of speakers of different topics.

This 12th Open Source Days conference will be held at IT University of Copenhagen on Friday 5th of March and Saturday 6th of March.

Open Source Days is a great chance to learn more about open source and to make friends and contacts within the open source community.

Graphical website visitor statistics

Graphical website visitor statistics (usage reports) is created on the basis of website log file analysis.

One way to do this, is to install Webalizer, which is an open source log file analysis utility, that can produce graphical website visitor statistics in HTML format, that can be viewed in a browser.

Webalizer can read standard log file formats, such as the one used by popular web servers, such as Apache.

This procedure will install Webalizer, analyse the log file of a website and produce the graphical website visitor statistics on a FreeBSD operating system with Apache.

Install Webalizer from the ports collection.

su -
cd /usr/ports/www/webalizer
make install

Analyse the log file and produce the detailed website visitor statistics with reverse lookup resolving of IP addresses of visitors for geographical statistics.

webalizer -o /usr/home/foobar/www/www.foobar.com/visitors/ -t www.foobar.com -D /usr/home/foobar/www/www.foobar.com/visitors/dnscache -N 10 /var/log/www/www.foobar.com/custom.log

Webalizer is highly configurable and works well with cron (crontab) automation. In order to configure Webalizer and its reports, read the manual.

Annoncering i magasinet Out & About

Open Tech SmbA er det perfekte valg for den mellemstore og mindre virksomhed.

Drømmer du om, at starte egen virksomhed?

Open Tech SmbA har erfaring med iværksætteri, regnskab og jura – og er derfor også det perfekte valg for mindre virksomheder, der har behov for sparring, fleksibilitet, sikkerhed, stabilitet og tryghed, samt iværksættere, der med en forretningsplan i hånden drømmer om, at blive virksomhedsejere.

Open Tech SmbA har som et led i markedsføringen indgået en aftale om annoncering i magasinet Out & About, der er det største nyhedsmedie, der også henvender sig til homoseksuelle, biseksuelle og transseksuelle i Danmark.

Den første annonce, der er udarbejdet af Gobananas Design, er med i den trykte martsudgave af Out & About, nummer 87, der udkommer fredag den 26. februar.

Out & About udkommer såvel i online som i trykt udgave 12 gange årligt i et oplag på 10.000 eksemplarer, der læses af 32.000 læsere. Det er gratis og kan hentes på barer, restauranter, caféer og diskoteker i 15 større byer i Danmark og Sverige.