Thursday, February 5, 2009

vpnc on Debian 4.0 or 'Etch' - the latest stable release

If you need a vpn client installed on your machine, here's a tutorial for vpnc (which is the best alternative for the cisco client for windows machines).

Open a terminal and go root by typing:
su

Open 'etc/apt/sources.list' with the nano-editor, which is very intuitiv and comes with every Debian installation, by typing:
nano /etc/apt/sources.list

Once opened, check if your repositories-list looks similar to this one:

deb http://ftp.ch.debian.org/debian etch main contrib non-free

Because the package is in the main-repository 'main' is the key word that must not be missing in your '/etc/apt/sources.list'. If it should not be there, just add the line above. To save in the nano editor, you press 'ctrl-o' and quit it by pressing 'ctrl-x'.

If you had to modify the file update the repository list by typing:
apt-get update

Install the vpnc by typing:
apt-get install vpnc


Create a configuration file in order to have access to Zurich University by typing:
nano /etc/vpnc/uzh.conf


The following text should be inside:
IPSec gateway vpnserver.uzh.ch
IPSec ID 'groupUsername'
IPSec secret 'groupPassword'
Xauth username 'sYourImmatriculationNumber'
Xauth password 'yourPassword'



save the file by pressing 'ctrl-o' and quit the editor by pressing 'ctrl-x'.

note:
a) don't write the quotation marks ' '.
b) 'groupName', 'groupPassword' can be found on the website
of the Zurich University.
go here

c) Xauth password can be set or not, it's up to you!


Customise the File Rights
Type in the terminal:
chmod 644 /etc/vpnc/uzh.conf
chown root.root /etc/vpnc/uzh.conf


Start / end the program
1. In order to start the program, type in the terminal as superuser:
vpnc uzh


2. In order to end the program, type in the terminal as superuser:
vpnc-disconnect


More information on how to enter the internal section of the University of Zurich can be found
here

Install Flash in Debian 'Etch'

To surf the world wide web you need for a lot of websites flash installed. And unlike the Iphone, which I nevertheless love a lot, with Debian it's possible to install flash!

The automatic procedure included in browsers does not work for a Debian 'Etch' based system. But it's very easy to install:

Because we need the backports repository, we first install the debian-backports-keyring package in order to verify the downloaded files:

apt-get install debian-backports-keyring


Then, one has to add the following line to the '/etc/apt/sources.list':

deb http://www.backports.org/debian etch-backports main contrib non-free


In order to have the packages automatically upgraded from the backports repository, you modify or create 'etc/apt/preferences' in the following way:

Package: *
Pin: release a=etch-backports
Pin-Priority: 200



Update afterwards the repositories list with:

apt-get update


And then you simply type:
apt-get install flashplugin-nonfree


For more information on backports see The Debian Wiki or backports.org.
For more information on Flash and Debian see The Debian Wiki.
For more information on installing Flash in a Debian based System see debianadmin.com.

Debian 'Etch' on Toshiba Libretto U100 - a minimal X-system and wireless card

I just love my good old Toshiba Libretto U100. And after some years on Windows XP I decided to go back to the roots and work with Debian GNU/Linux - a system I played a lot with in the past.

The installation process went easier than it used to be. Everything I need for the beginning is recognised on the Toshiba Libretto U100. Not the wireless card though, but this is just because the driver is inside the non-free repository!

I decided to install nothing but the core system (so said no to all the tasksel offers during the installation process). Then on the terminal I first customised the '/etc/apt/sources.list' to the following:

*********************************************************
deb http://ftp.ch.debian.org/debian etch main contrib non-free
deb-src http://ftp.ch.debian.org/debian etch main contrib non-free

deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib
**********************************************************

Then I did a 'apt-get update' and went on installing a minimal x-System:

apt-get install xorg (I chose 1600x1200 for the external monitor I plan to use and 1280x768 and 1024x768 for the tiny U100 display).

#very basic login manager
apt-get install xdm

I was hesitating between fluxbox - blackbox - openbox - jwm... but there are lots more, have a look here for a nice comparison between some desktop packages. I first stick to fluxbox.
apt-get install fluxbox

For more information to install a mininmal debian x-system see here.

Now it's time to get my wireless card working, because I hate the limitations of a cable-based internet connection! For more information on this see here.

#install the needed packages
apt-get install module-assistant wireless-tools

#build and install a madwifi-modules*-package in my system
m-a prepare
m-a a-i madwifi

There was no need for me to unload the ath5k module (you can do it anyway if you're not sure by typing: 'modprobe -r ath5k'.

#load the ath_pci module
modprobe ath_pci

#check that your device has an available interface
iwconfig

#raise the interface to activate the radio, for the U100 it's ath0
ifconfig ath0 up

#Because I'm using wpa encription, I needed to install wpa-supplicant package
apt-get install wpasupplicant

After this I customised my '/etc/network/interfaces' file, for more information on this, see here.

**************************************************
# The loopback network interface
auto lo
iface lo inet loopback

#The primary network interface (I commented-out the 'eth1'
#interface for ethernet, because
#I won't use it normally, I did not delete it, if I have to use it some day)

iface ath0 inet dhcp
#bring up wireless automatically at system start-up
auto ath0
wpa-ssid myNetworkName
wpa-psk mySecretPassPhrase
wireless-essid MyNetworkName

#allow-hotplug eth1
#iface eth1 inet dhcp
**************************************************

After saving the file, I brought up the interface
ifup ath0

Now, in order to use the internet, I installed iceweasel (debian's firefox):
apt-get install iceweasel

And finally, I'm going to restart my new system, pretty nervous, though :-)

And yes.... it's working!