Thursday, May 26, 2011

The Perfect Server - Ubuntu Natty Narwhal (Ubuntu 11.04) [ISPConfig 2]

This tutorial shows how to set up an Ubuntu Natty Narwhal (Ubuntu 11.04) server that offers all services needed by ISPs and hosters: Apache web server (SSL-capable), Postfix mail server with SMTP-AUTH and TLS, BIND DNS server, Proftpd FTP server, MySQL server, Courier POP3/IMAP, Quota, Firewall, etc. In the end you should have a system that works reliably, and if you like you can install the free webhosting control panel ISPConfig 2 (i.e., ISPConfig runs on it out of the box).


I will use the following software:

Web Server: Apache 2.2.17 with PHP 5.3.5, Python, Ruby, and WebDAV Database Server: MySQL 5.1.54Mail Server: PostfixDNS Server: BIND9FTP Server: proftpdPOP3/IMAP: I will use Maildir format and therefore install Courier-POP3/Courier-IMAP.Webalizer for web site statistics

Please note that this setup does not work for ISPConfig 3! It is valid for ISPConfig 2 only!


I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!


To install such a system you will need the following:


In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100 and the gateway 192.168.0.1. These settings might differ for you, so you have to replace them where appropriate.


Insert your Ubuntu install CD into your system and boot from it. Select your language:


Click to enlarge

Then select Install Ubuntu Server:


Click to enlarge

Choose your language again (?):


Click to enlarge

Then select your location:


Click to enlarge

Click to enlarge

Click to enlarge

If you've selected an uncommon combination of language and location (like English as the language and Germany as the location, as in my case), the installer might tell you that there is no locale defined for this combination; in this case you have to select the locale manually. I select en_US.UTF-8 here:


Click to enlarge

Choose a keyboard layout (you will be asked to press a few keys, and the installer will try to detect your keyboard layout based on the keys you pressed):


Click to enlarge

Click to enlarge

The installer checks the installation CD, your hardware, and configures the network with DHCP if there is a DHCP server in the network:


Click to enlarge

Click to enlarge The Perfect Server - Ubuntu Natty Narwhal (Ubuntu 11.04) [ISPConfig 2] - Page 2

Wednesday, May 25, 2011

The Perfect Desktop - Kubuntu 11.04

This tutorial shows how you can set up a Kubuntu 11.04 desktop that is a full-fledged replacement for a Windows desktop, i.e. that has all the software that people need to do the things they do on their Windows desktops. The advantages are clear: you get a secure system without DRM restrictions that works even on old hardware, and the best thing is: all software comes free of charge. Kubuntu 11.04 is derived from Ubuntu 11.04 (Natty Narwhal) and uses the KDE desktop instead of the GNOME desktop.


I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!


To fully replace a Windows desktop, I want the Kubuntu desktop to have the following software installed:

The GIMP - free software replacement for Adobe Photoshop Shotwell Photo Manager - full-featured personal photo management applicationGoogle Picasa - application for organizing and editing digital photosFirefoxOperaChromium - Google's open-source browser Flash Player 10 FileZilla - multithreaded FTP client Thunderbird - email and news clientEvolution - combines e-mail, calendar, address book, and task list management functionsaMule - P2P file sharing applicationKTorrent - Bittorrent client Vuze - Java Bittorrent client Kopete - multi-platform instant messaging clientSkypeGoogle EarthQuassel IRC - IRC client Gwibber Social Client - open-source microblogging client (Twitter, Facebook, etc.) LibreOffice Writer - replacement for Microsoft Word LibreOffice Calc - replacement for Microsoft Excel Adobe ReaderGnuCash - double-entry book-keeping personal finance system, similar to Quicken Scribus - open source desktop publishing (DTP) applicationAmarok - audio player Audacity - free, open source, cross platform digital audio editorBanshee - audio player, can encode/decode various formats and synchronize music with Apple iPods MPlayer - media player (video/audio), supports WMA Rhythmbox Music Player - audio player, similar to Apple's iTunes, with support for iPods gtkPod - software similar to Apple's iTunes, supports iPod, iPod nano, iPod shuffle, iPod photo, and iPod miniXMMS - audio player similar to Winampdvd::rip - full featured DVD copy programKino - free digital video editorSound Juicer CD Extractor - CD ripping tool, supports various audio codecsVLC Media Player - media player (video/audio)RealPlayer - media player (available for i386 systems only)Totem - media player (video/audio)Xine - media player, supports various formats; can play DVDs Brasero - CD/DVD burning program K3B - CD/DVD burning programMultimedia CodecsKompoZer - WYSIWYG HTML editor, similar to Macromedia Dreamweaver, but not as feature-rich (yet)Bluefish - text editor, suitable for many programming and markup languagesQuanta Plus - web development environment, including a WYSIWYG editorVirtualBox OSE - lets you run your old Windows desktop as a virtual machine under your Linux desktop, so you don't have to entirely abandon Windows TrueType fontsJavaRead-/Write support for NTFS partitions

Lots of our desired applications are available in the Ubuntu repositories, and some of these applications have been contributed by the Ubuntu community.


As you might have noticed, a few applications are redundant, for example there are two CD/DVD burning applications in my list (Brasero, K3B). If you know which one you like best, you obviously don't need to install the other applications, however if you like choice, then of course you can install both. The same goes for music players like Amarok, Banshee, Rhythmbox, XMMS or browsers (Firefox, Opera, Chromium).


I will use the username falko in this tutorial. Please replace it with your own username.


The installation of the base system is easy as 1-2-3 because the Kubuntu installer doesn't offer a lot of options to choose from, so you cannot go wrong.


Download the Kubuntu 11.04 Desktop iso image from http://www.kubuntu.org/getkubuntu (this link offers torrent downloads only; if you want to download the iso image directly, you can use one of the mirrors listed on https://launchpad.net/ubuntu/+cdmirrors), burn it onto a CD, and boot your computer from it. Select Start Kubuntu:


Click to enlarge

The system boots:


Click to enlarge

Select your language and click on the Install Kubuntu button to start the installation:


Click to enlarge

On the next screen you see a few requirements for the Kubuntu 11.04 installation (the system should have at least 3.9GB available drive space, should be plugged into a power source (to make sure that the system doesn't shut down during installation because of an empty battery), and should be connected to the Internet). Please check the Download updates while installing and Install this third-party software (this will install the software necessary to process Flash, MP3, and other media files) checkboxes and click on Forward:


Click to enlarge

Now we come to the partitioning of our hard disk. Usually Guided - use entire disk is a good choice, unless you need custom partitions and know what you're doing. Guided - use entire disk will create one big / partition for us:


Click to enlarge

Then choose your time zone:


Click to enlarge

Change the keyboard layout, if necessary:


Click to enlarge

Type in your real name, your desired username along with a password, and click on Forward:


Click to enlarge

Afterwards, Kubuntu is being installed. This can take a few minutes, so be patient:


Click to enlarge

After the installation, you will be asked to reboot the system. Click on Restart Now:


Click to enlarge

At the end of the shutdown process, you are asked to remove the Kubuntu installation CD from the CD drive. Please do this now and press ENTER:


Click to enlarge

Your new Kubuntu system starts. Log in to the desktop with the username and password you provided during the installation:


Click to enlarge

This is how your new desktop looks:


Click to enlarge

Now the base system is ready to be used.

The Perfect Desktop - Kubuntu 11.04 - Page 2

Monday, May 23, 2011

Asterisk Cisco CallManager

CallManager is the centerpiece of Cisco's entry into the world of telephony.

As of June 2009, Cisco has released version 6 of their CallManager
CallManager version 5+ is now running on Linux RedHat
CallManager version <5 is implemented as a set of services that run on a Microsoft Windows 2000-based server.
Configuration data is stored in a Microsoft SQL database.
The administration interface is implemented using HTML, JavaScript, and Java applets served up using Microsoft's IIS. Even though the administration interface does not appear to use ActiveX, you must use Internet Explorer to configure CallManager.
Multiple CallManagers can be clustered to provide higher availibility.

Wednesday, May 18, 2011

Digium T1/E1 Card

Digium TE122P
The Digium TE122P is a single port selectable T1/E1/J1 pci card with optional support for the Digium VPMADT032 echo cancellation module.

Digium TE420
Digium's TE420 PCI Express card provides termination of up to 60 channels of voice or data across four E1, T1, or J1 interfaces in a PCIe x1 form factor. Selectable on a per-port or per-card basis, the TE420 allows E1 and T1 circuits to be mixed with full channel synchronization.

Digium TE412P Quad Span T1/E1 PCI Card for Asterisk™
The TE412P offers an on-board DSP-based echo cancellation module. It supports E1, T1, and J1 environments and is selectable on a per-card or per-port basis.

Digium TE212P Quad Span T1/E1 PCI Card for Asterisk™
The TE212P offers an on-board DSP-based echo cancellation module. It supports E1, T1, and J1 environments and is selectable on a per-card or per-port basis.

Tuesday, May 10, 2011

Asterisk Network Security

If you install Asterisk and use the "make samples" command to install a demonstration configuration, Asterisk will open a few ports for accepting VoIP calls. Check the channel configuration files for the ports and IP addresses.

If you enable the manager interface in manager.conf, please make sure that you access manager in a safe environment or protect it with SSH or other VPN solutions.

For all TCP/IP connections in Asterisk, you can set ACL lists that will permit or deny network access to Asterisk services. Please check the "permit" and "deny" configuration options in manager.conf and the VoIP channel configurations - i.e. sip.conf and iax.conf.

The IAX2 protocol supports strong RSA key authentication as well as AES encryption of voice and signalling. The SIP channel does not support encryption in this version of Asterisk.

The Asterisk Dialplan

The Asterisk dialplan is divided into contexts. A context is simply a group of extensions. For each "line" that should be able to be called, an extension must be added to a context. Then, you configure the calling "line" to have access to this context.

If you change the dialplan, you can use the Asterisk CLI command "dialplan reload" to load the new dialplan without disrupting service in your PBX.

Extensions are routed according to priority and may be based on any set of characters (a-z), digits, #, and *. Please note that when matching a pattern, "N", "X", and "Z" are interpreted as classes of digits.

For each extension, several actions may be listed and must be given a unique priority. When each action completes, the call continues at the next priority (except for some modules which use explicitly GOTO's).

Extensions frequently have data they pass to the executing application (most frequently a string). You can see the available dialplan applications by entering the "core show applications" command in the CLI.

In this version of Asterisk, dialplan functions are added. These can be used as arguments to any application. For a list of the installed functions in your Asterisk, use the "core show functions" command.

Asterisk Static And Realtime Mode

The ARA realtime mode is used to dynamically load and update objects. This mode is used in the SIP and IAX2 channels, as well as in the voicemail system. For SIP and IAX2 this is similar to the v1.0 MYSQL_FRIENDS functionality. With the ARA, we now support many more databases for dynamic configuration of phones.

The ARA static mode is used to load configuration files. For the Asterisk modules that read configurations, there's no difference between a static file in the file system, like extensions.conf, and a configuration loaded from a database.

You just have to always make sure the var_metric values are properly set and ordered as you expect in your database server if you're using the static mode with ARA (either sequentially or with the same var_metric value for everybody).

If you have an option that depends on another one in a given configuration file (i.e, 'musiconhold' depending on 'agent' from agents.conf) but their var_metric are not sequential you'll probably get default values being assigned for those options instead of the desired ones. You can still use the same var_metric for all entries in your DB, just make sure the entries are recorded in an order that does not break the option dependency.

That doesn't happen when you use a static file in the file system. Although this might be interpreted as a bug or limitation, it is not.