Σάββατο 25 Σεπτεμβρίου 2010

cosmote vpn-internet

Most carriers do have two types of APN (Access Point Name) provision for the SIM: "private" APN (which provides a non-routable IP assignment from behind a NAT, for basic browsing and e-mail functionality) and "public" APN (that provides a routable IP assignment, which is the Minimum Requirement for a more sophisticated connection type, such as VPN, etc).
However, both of them are assigned by a DHCP (Dynamic Host Configuration Protocol) Server on a GGSN (Gateway GPRS Support Node) of the particular GPRS network operator. In either case, the end result is a DYNAMIC IP address on the GPRS terminal (be it a laptop PC, a PDA, or phone).
Some carriers do offer what is called a "dedicated APN" provision, which gives the subscriber their own IP range to choose from (almost like a small subnet).

Κυριακή 19 Σεπτεμβρίου 2010

Configuration of the Alix board

First Install Voyage on a CF card

On your Debian Linux (desktop) computer :

Go to the Voyage Linux Website.

Download the latest version (for me this was voyage-0.6.5) of Voyage Linux to the desktop.

There will now be the following file on your desktop :
voyage-0.6.5.tar.bz2

Open the Terminal (with root privilege -> write "su" and press ENTER) :
write "cd Desktop" and press ENTER
write "tar xjf voyage-0.6.5.tar.bz2" and press ENTER
write "cd voyage-0.6.5" and press ENTER
Outside of the Terminal, open the "voyage-0.6.5" folder and then open the file "README" (double-click). There you will find the installation instructions which are the ones I describe here.

You first need to format and partition the CF-card. So, insert the card in the card reader. Then in the Terminal :
write "dmesg" and press ENTER
you will get a very long list with at the end the device name for the CF-card (the size of the card should appear at the end of the line between brackets), it should be "sda" or sdb" (you will need this name in the following step, to be sure to format the right device and not your hard drive)
write "fdisk /dev/sdb" (or your own device name instead of "sdb") and press ENTER
write "d" and press ENTER
write "n" and press ENTER
write "p" and press ENTER
write "1" and press ENTER
press ENTER (default value)
press ENTER (default value)
write "w" and press ENTER
Outside of the Terminal, right-click on the volume which represents the CF-card and choose "Unmount volume".

In the Terminal window :
write "mkfs.ext2 /dev/sdb1" (or your own device name instead of "sdb")
write "tune2fs -c 0 /dev/sdb1" (or your own device name instead of "sdb")
Ok. Now your CF-card is formatted and partitionned.

In the Terminal window :
write "apt-get install rsync" and press ENTER
move to the /mnt folder and write "mkdir cf" and press ENTER
move to the voyage-0.6.5 folder
write "./usr/local/sbin/voyage.update" and press ENTER
press ENTER (default value = "Create new Voyage Linux disk")
press ENTER (default value)
press ENTER (default value = "Select Target Profile")
write "5" (=ALIX) and press ENTER
press ENTER (default value = "Select Target Disk")
write "/dev/sdb" (or your own device name instead of "sdb") and press ENTER
press ENTER (default value = "1")
write "/mnt/cf" and press ENTER
press ENTER (default value = "Select Target Bootstrap Loader")
press ENTER (default value = "grub")
press ENTER (default value = "1")
press ENTER (default value = "Configure Target Console")
press ENTER (default value = "Console")
press ENTER (default value = "Copy Distribution to Target")
now you can check if the entered values are ok (if yes, then write "y", in no, then write "n" and start the whole process again), then press ENTER
press ENTER (default value = "Exit")
If above the line "What would you like to do?" you get a message like "copyfiles.sh script completet" then Voyage Linux is now installed on your CF-card.

Now you can remove the CF-card from your desktop computer.

To remove the "voyage-0.6.5" folder from your Desktop :
write "cd .." and press ENTER
write "rm -r voyage-0.6.5" and press ENTER

THEN :
on the Alix board, insert the CF-card
on the Alix board, insert the Ethernet cable in the connector which is nearest to the power connector (connect this cable on its other end to your router)
on the Alix board, first connect the power cord to the board's connector and only after that, connect the AC adapter to the wall socket
wait approx. 1 minute for the Alix to boot
You need to know the IP address of the Alix board, so do the following (on your desktop computer' Terminal) :
write "aptitude install nmap" and press ENTER
write "nmap -sP 192.168.1.*" (or replace "192.168.1" with your router's address ; don't forget the asterisk at the end)
this will take something like 30 seconds and then you will get a list of all computers, routers, ... which are on your network, amongst them should be the Alix board :
Host 192.168.1.2 appears to be up.
MAC Address: 00:0D:B9:17:7E:A0 (PC Engines GmbH)

Here you can see the Alix's IP address = 192.168.1.2 (or whatever is indicated there). I suggest to fix the IP addresses of the Alix board and the desktop PC which will contain the music library (for example : desktop PC = 192.168.1.20 and Alix board = 192.168.1.30, that's the example I will use here). You fix the IP addresses from inside your router's interface (see router manual for that).

When you have finished fixing the IP addresses for both computers, restart your router and then do the nmap command again on the desktop computer to check if it's ok.

To be able to work on the Alix board via the desktop computer, you need to install openssh-server on the desktop computer or putty :
write "ssh -2 -p 22 root@192.168.1.30" (or the address you chose)
after a little moment it will ask for the root passwort : write "voyage" and press ENTER
now you are inside the Alix computer with root privileges
You need to change the read/write configuration of the Alix computer which is normally read only :
write "remountrw" and press ENTER
Then :
write "apt-get update" and press ENTER
write "apt-get upgrade" and press ENTER
Modify the country specific language settings :
write "apt-get install locales" and press ENTER
write "dpkg-reconfigure locales" and press ENTER
chose the settings related to your country and language
Install some packages which will be used or which are useful (jed = userfriendly text editor, mpd = music player daemon, alsa-base = sound drivers) :
write "apt-get install jed mpd alsa-base" and press ENTER
Add a user (without root privileges) :
write "apt-get install adduser" and press ENTER
write "adduser your_username" (your_username = same as on the desktop computer)
enter the desired password (and remember it)
Change read/write configuration back to read only :
write "remountro" and press ENTER
Exit the Alix computer :
write "exit" and press ENTER (you are back on the desktop computer)