Friday, October 30, 2009

Installing Nagios 3 on Ubuntu Server 9.10

Follow these steps to installing Nagios 3 on Ubuntu 9.10 Karmic Koala Server Edition:
# sudo apt-get install nagios3
Just follow on-screen instruction. After that, setting up user to access the Nagios web interface:
# sudo htpasswd -c htpasswd.users nagios
   New password:
   Re-type new password:
   Adding password for user nagios
Open up http://localhost/nagios3, enter your username and password you've just created. For configuring the services and hosts you want to monitor, go to /etc/nagios3/conf.d directory and you will see several base file for nagios (.cfg). For now, Nagios 3 is already running and what you have to do next.. configuring your host file for monitoring purposes.

OpenVPN on PocketPC

I'm using OpenVPN client on my Palm Treo Pro to connect to OpenVPN server at my office. After connecting I can access my PC and doing some work stuffs. All you need is .ovpn file and several key files (simply asked your OpenVPN server Admin to generate them for you)

What important is how you configure your .ovpn file. You can see below my sample-config. Please note that I'm using two backslashes, instead of one, to mention location of config folder and files.

* sample config of my .ovpn file:

     port 1194
     dev tun
     proto udp
     remote [ your openVPN server]
     resolv-retry infinite
     redirect-gateway def1

     ca "\\Program Files\\OpenVPN\\config\\ca.crt"
     cert "\\Program Files\\OpenVPN\\config\\[yourfile].crt"
     key "\\Program Files\\OpenVPN\\config\\[yourfile].key"
     tls-auth "\\Program Files\\OpenVPN\\config\\tls-auth.key" 1
     cipher AES-256-CBC
     ns-cert-type server
     verb  3

Another files you must provide is the key files. Put them (.ovpn and key files) in the same directory, usually under config folder on installation directory.

This config already tested and works perfectly :)

Upgrade From Ubuntu 9.04 to 9.10 Server Edition

Ubuntu 9.10 Karmic Koala Server Edition is available for download, but if you already used Ubuntu 9.04 Jaunty Jackalope Server Edition, you can do these steps to upgrade to 9.10. Here are what you have to do:

1. install update-manager-core package (in case it's not installed yet)
2. edit /etc/update-manager/release-upgrades
3. # sudo do-release-upgrade -d
4. wait till upgrade process succeed

And if you have Desktop System, you can do these:

1. Press Alt+F2 on your GUI
2. Type in "update-manager -d" (without quotes)
3. Update Manger should open up, and you can see "New distribution release '9.10' is available"
4. Press the 'Upgrade' button, and wait till upgrade process succeed

Thursday, October 29, 2009

Dual Boot-ing Windows 7 and Ubuntu Jaunty 9.04 Server Edition

I just succesfully implementing dual boot Windows 7 and Ubuntu Jaunty, using Windows 7 Bootloader, with the help of awesome application called EasyBCD. My first trial was using GRUB Bootloader (install to MBR), with the result "BOOTMGR is missing". Apparently my GRUB installation on MBR, not just failed, but also destroyed Windows 7 Bootloader.

Here is my disk partition mapping, my harddisk size is 80GB:
# Primary partition
/dev/sda1 100mb - automatically created with Windows 7 installation
/dev/sda2 32gb - Windows 7 installation

# Logical partition - Ubuntu
/dev/sda5 100mb - boot
/dev/sda6 2gb - swap
/dev/sda7 10gb - root
/dev/sda8 32gb - home

Before installing Windows, I move the GRUB installation from MBR to my root partition. This way, I can switch between Windows 7 bootloader and GRUB bootloader.

After installing Windows 7, download and install EasyBCD, run it, then go to add/remove Entries:

image courtesy to Neosmart

In Drive, choose your root partition, click 'Add Entry' button, then Save. That's it! Restart your computer, and you'll get Bootloader to choose your Operating System :)

Thursday, October 22, 2009

Installing Zenoss on Ubuntu Jaunty 9.04 Server Edition

Zenoss is open source network infrastructure software. Here is how I installed it on my Ubuntu Jaunty 9.04 Server Edition. First, make sure you do the following:

# sudo apt-get install build-essential autoconf swig
# sudo apt-get install libmysqlclients15-dev
# sudo apt-get install python-dev

# sudo vi /etc/apt/sources.list
  • ## zenoss-ubuntu
  • deb main stable
# sudo apt-get update
# sudo apt-get install zenoss-stack
# sudo /etc/init.d/zenoss-stack start

After the setting-up is done, you can access 1st time setup wizard by pointing your web browser url to http://localhost:8080

Guidelines for Access List

These are guidelines for creating access list in Cisco Router:

a. use text editor
b. acl proccessed top-down, place more specific tests and tests that will true frequently - at the beginning of the access-list
c. only "named acl" allow removal individual statements, not reordering
d. if you want to reordering and remove "numbered acl", you must remove whole list & recreate
e. all acl end with an implicit deny all statement
f. place "extended acl" close to the source, place "standard acl" close to the destination

How to Check 3rd Party Connection (Wireless) on Cisco Switch

This is what we can do to check 3rd party connection (wireless) on Cisco Switch:
On Cisco switch, execute this:
SWITCH> show vlan id [vlan id]

- to view which ports using this vlan, find out port with description "trunk to wireless provider"

SWITCH> show mac-address-table | i [vlan id]

- to see whether the port with description "trunk to wireless provider" shown up or not, if it doesn't, something is wrong, then :)

Easy Way to Wildcard counting

If you are a network engineer and deal a lot with Cisco router configuration, this short post might help you, I hope :)

wildcard = host - 1
host = 2^(32-prefix)

For example:
/28 --> prefix 28
host = 2^(32-28)
host = 2^4
host = 16

wildcard = 16 - 1
wildcard = 15

So wildcard masking for: -->

Exporting and Importing MySQL Database

1. Export
# mysqldump -u [username] -p [database-name] > [database-name].sql
2. Import
# mysqladmin -u [username] -p create [database-name]
# mysql [database-name] < [database-name].sql

Cisco Router configuration for NetFlow

Cisco router config for NetFlow

On user interface:

# ip route-cache flow
exit, then in global configuration mode:
# ip flow-export destination [host IP] [port] --> usually 9996
# ip flow-export source loopback 0
# ip flow-export version 5
And you can execute this command to show if your configuration works:
# sh ip cache flow
# sh ip flow export

snmpwalk and netcat

1. snmpwalk

from Linux/ UNIX gateway:
# snmpwalk -v [1|2c|3] -c [COMMUNITY] [IP Router] | grep -i [Port]
from router:
# show snmp mib Ifmib ifindex [interface] [port]

2. netcat

I use it to retrieve detail information about AS Number, Country, etc. based on IP address:

# netcat 43 < [filename-original].txt > [filename-output].txt
The file is batch file containing more than 1 IP address, and this is the format for the file:
a. should be save in MS-DOS text format
b. in the body file:
[IP address 1]
[IP address 2]
[IP address 3]
and so on..
That will do. The proccess takes a few minutes depending on how much IP address in the file. After completing, you can take a look at the file and you'll be surprise :)

Ccache - Caching Compilation in Gentoo Linux

Ccache is a fast compiler cache. To install it, do this:

# emerge ccache

For 1st install:

# ccache -M 2G


# nano -w /etc/make.conf
  • FEATURES="ccache"
  • CCACHE_DIR="/var/temp/ccache"
# PATH="/usr/lib/ccache/bin:/opt/bin:${PATH}"

To view ccache statistics:

# CCACHE_DIR="/var/temp/ccache" ccache -s

Wednesday, October 21, 2009

TTYtter - My Favourite Twitter client

@ttytter, developed by Floodgap is my favourite twitter client. Despite of its minimalist look (CLI apps, text-based running on terminal), I can use it to run on many platform, including on my Palm Treo Pro. On Linux/Unix and Mac, you just need to do this:

1. download it from here
2. on the directory where you keep the download:
# mv ttytter.txt ttytter
# chmod +x ttytter
3. then you can run it by executing:
# ./ttytter
# ./ttytter -user=[username]:[password] -vcheck
If you are Windows user, you can do telnet/ SSH to your Linux/ UNIX machine, or if you don't have any, you can register to public access UNIX server like SDF and running ttytter from there. Same thing if you want to use your mobile phone. From my Palm Treo Pro which running Windows Mobile, I just need to install SSH client like PocketPutty, and do the rest like you do at Windows PC. That also applies to another mobile/ pda phone using any OS, as long as they have telnet/ SSH client installed.

Some simple command is:
1. type directly to post status update
2. D [username] to send direct message
3. /re [post number] to reply
4. /rt [post number] to retweet

5. /re to list @[yourusername]
6. /again to refresh your timeline
7. /dmagain to show your DM

For complete operational command, you can look here.

And for additional group support, you can take a look at my friend's blog (@vkoser) here.

Tuesday, October 20, 2009

SnapIt - Simple Way Of Screen Capture

As an engineer, I work a lot using Asus eeePC 701 doing bandwidth test, capacity measuring, speed testing, etc. And I have to capture all the on screen results, for reporting. All this year I've been using old-manual way: print screen button, open image editor program (usually I used Microsoft Paint), paste and save. Can you imagine doing that with 7" screen? :) But I didn't feel much bother with it, since that's the only way I know, and slowly it became a habit.

But, since I've found this simple yet great program, it changes the way I work. Everything become soooo..simple. I mean it! It called SnapIt. After downloading and installing (small installation files), you can start your 14 days of fully-functional trial. Start the program, then you'll find a front-view camera icon on system tray:

Right-click on it, then it shows the menu:

choose the Properties menu, and you'll get this window:

You can choose the Hot key from regular Print Screen button, F10, F11 or F12. You can see that I prefer using 'Auto save image to folders' of my choice, and Jpeg as my Image Type. That's it! Can't find way more simple then this. Everytime I'd like to capture my work results, I just press Print Screen button, and my cursor change to big 'plus' symbol. Just hold your left mouse button, drag and choose whether it selected area, curent windows or the whole desktop.

Try it, I'm sure you'll like it :)

* Note: all images in this post are captured using SnapIt

Monday, October 19, 2009

Utilizing your old Palm Treo 650 :)

In this high-end gadget era, features like HSDPA, Wi-Fi, GPS, multitouch, etc. would be standard features that everybody would want to have on their devices. But for me, that won't matter. That's why I still keep my Palm Treo 650, which (as you might already knew) even don't have 3G, Wi-Fi, GPS nor multitouch :D

It's okay for me, just equipped it with unlimited data access, I set it up so it can be used as my working tool. My primary tool is pssh and CheckWWW, which I use a lot to do SSH to my UNIX server and doing things within its terminal. With CheckWWW you can do ping, whois, trace, lookup, finger, etc.

Another thing is setting up email with ChatterEmail, which actually can do "push email" with idle-imap technology. This idle-imap works by sending out small amount of data to mail server periodically, to check for new email, and if there is any, then ChatterEmail will executing request command and then retrieving the email. Almost no delay, just like push email, right? :)

And also Chatopus for my IM needs, you can see my post about integrating Nimbuzz account to Chatopus here. For web browser, you can use built-in Web from palm. Another choice would be Mini Opera and/ or Xiino.

For entertainment purposes, you can use AeroPlayer for local media files, simple, light and skinnable. Another multimedia player is PocketTunes and/ or CorePlayer which allow you to do streaming internet radio and watching YouTube, respectively. Another entertainment thing is games. I use LJP (aka. Little John PalmOS), an emulator to play from NES, SNES, Sega and many other old game console.

With DocsToGo, you'll be able to create new and/ or edit office documents (doc, xls, ppt) and read pdf files. It'll be some kind like e-book reader :)

And, for completing many activities with Palm Treo 650, I use CoLauncher. This amazing applications allows me to switch from an application to another without have to press Home button and back to default launcher before open another application. All you have to do is assigning one HardButton to execute CoLauncher, then press one letter or number, which you already setup before, to launch application assigned to it. So easy, just try it.. I'm sure you'll like it :)

That's for me :) How about you? Please share how you use your old Palm Treo 650.. Thanks!

Saturday, October 17, 2009

Reviewing Grandstream - IP Phone

This week I had a chance to try out two products from Grandstream, GXV3140 and GXP1200. I'll walk through it from a end user view :)

1. GXP1200
Regular-function IP Phone, setup and call :) This is how to setup this phone:
a. Press MENU button, go to Config menu and set IP parameter (static or DHCP, IP, subnet, gateway, DNS)
b. Press back button, then choose SIP menu, set which Account to activate, then fill in SIP User ID, Auth ID (basically it's the same for this two), SIP Password and SIP Transport, and Save
* a little note for this SIP Transport. I have to set the SIP transport to TCP, instead of regular UDP, to make my account registered *

Another way to setting up, after completing IP parameter, you can access it from web browser by typing http://[IP Address], with password: admin

This phone support up to 2 SIP Accounts, call waiting, caller ID, hold, transfer, conference and 3 custom ringtone you can create :)

Download the User Guide for GXP series here.

2. GXV3140
I could say that this is the kind of IP Phone I would like to have and use :))
Color LCD, switch screen (clock and account status on screen 1, RSS reader and stock info on screen 2, calendar and weather info on screen 3), IM, web browser, games, internet radio, picture viewer, multimedia player, screensaver with stunning picture and last but not least, a tetris game! LOL.. That's at least all the features I can mention.

For setting up this phone, I only can do it from web browser. So, after completing IP parameter, I open http://[IP Address] typing user/pass:
user: user
pass: 123 - for user access level (mostly only view configuration), or
user: admin
pass: admin - for admin access level (have to using this to configure)

The GUI is simple and clear. Support up to 3 SIP accounts, and you also can setup for weather update, RSS news, photo album (already support flickr, photobucket and phanfare geezz..), account (for online music) and browser setting.

That's all for now, have to wandering around a little more :) oh, I forget to mention that this phone also have audio-video port, SD card reader, USB port and 2.5" audio port :D

RSS Reader and Stock Info

Calendar and Weather Info


Photo Album (Photobucket, Flickr, Phanfares)

Tetris Game :)

Tuesday, October 13, 2009

Internet Explorer on Linux

This is only for fun, don't expect to have a regular IE browser :) Only simple way to try:

# wget
# tar -zxvf ies4linux-latest.tar.gz
# cd ies4linux-*
# ./ies4linux

Just follow through the wizard, and after installation is done, you can execute IE by typing:

# ~/bin/ie6

Monday, October 12, 2009

Install and Run Palm® Mojo™ SDK on Ubuntu

I just make the summary on how to installing Palm® Mojo™ SDK on Ubuntu (I'm using Jaunty 9.04 - server edition), you can see the full how-to here:

1. install Sun Java Runtime Environment (Sun JRE)
# sudo apt-get install sun-java6-jre

2. install VirtualBox 3.0
    a. Add the repository to /etc/apt/sources.list:
deb jaunty non-free
    b. Download and install public key for apt-secure: 
# wget -q -O- | sudo apt-key add -
    c. Refresh the repository and install Virtual box:
# sudo apt-get update && sudo apt-get install virtualbox-3.0
3. Installing the Palm® Mojo™ SDK
    a. Download the Linux® SDK,which consists of 2 packages:
    b. Installing:
# sudo dpkg -i palm-sdk_1.2.0-svn197576-sdk77-pho30_i386.deb
# sudo dpkg -i palm-novacom_0.3-svn196852-hud21_i386.deb
 4. Run the SDK
# palm-emulator
The emulator makes me want to have webOS devices, more than ever :)

Thursday, October 8, 2009

Installing Mozilla Firefox on Ubuntu

Mozilla Firefox would be my 1st choice of internet browser to use on linux, unfortunately Ubuntu (at least Ubuntu Jaunty 9.04 - server edition) didn't provide mozilla-firefox repository, so we need to install it manually.

Here are the steps to do it:

1. Download the source file from here, choose your preferred version and localized (better take the .tar.bz2 to follow this steps)

2. Installing dependencies
# sudo apt-get install libstdc++5

3. Extracting source files to spesific directory
# sudo tar -C /opt -jxvf firefox-*.tar.bz2

4. Manual install
# cd /opt/firefox/plugins
# sudo ln -s /usr/lib/mozilla-firefox/plugins/* . (there's a dot at the end of the line)
# sudo dpkg-divert --divert /usr/bin/firefox.ubuntu --rename /usr/bin/firefox
# sudo ln -s /opt/firefox/firefox /usr/bin/firefox
# sudo dpkg-divert --divert /usr/bin/mozilla-firefox.ubuntu --rename /usr/bin/mozilla-firefox
# sudo ln -s /opt/firefox/firefox /usr/bin/mozilla-firefox

One addition to this installation is flash plugins
1. Get the source
Go to this page, and choose .tar.gz for Linux

2. Go to Download folder, extract and move to plugins directory
# tar xvfz install_flash_player_10_linux.tar.gz
# mv ~/.mozilla/plugins/

And you are done! Just execute your browser by typing "firefox" on your terminal. Enjoy :)

Applications running on my Ubuntu

On my work, I'm using Ubuntu Jaunty (9.04) server edition. As you might already using it, you will know that server edition not equipped (yet) with X server and desktop manager like KDE or GNOME. The reason I choose server edition are it's lite, and I can add only applications that I use. Desktop edition already fill with many applications I don't even use, and it's so heavy for my 256mb RAM!

OK, here are lists of applications I'm using, starting from X server and DM:
execute this first:
# sudo apt-get update
# sudo apt-get upgrade

1. X server and xinit
# sudo apt-get install xserver-xorg xinit xorg

2. WindowManager (either xfce4 or fluxbox, equal lite for me)
# sudo apt-get install xfce4
From this step, you can execute 'startx' to login to your Desktop Manager.

note: this step is optional, you can install any desktop manager you want: Gnome, KDE or anything.. as long as your computer is powerful enough :)

3. Mozilla Thunderbird - email client
# sudo apt-get install mozilla-thunderbird

4. Mozilla Firefox - internet browser
I make a writing about installing firefox here

5. OpenOffice - office suite
# sudo apt-get install

6. Network utility
# sudo apt-get install ssh nmap traceroute tcptraceroute dnsutils

7. CUPS (Common UNIX Printing System)
# sudo aptitude install cupsys

8. Samba - file sharing
# sudo aptitude install samba smbfs smbclient

9. Nautilus - file manager
# sudo apt-get install nautilus

10. File compression tools
# sudo apt-get install rar unrar zip unzip ark

With this 10 applications, I can do everyday office works. How about you? Please share your everyday usage applications on comments :)

Chatopus - alternative IM client for Palm OS

If you still using Palm OS till now, when other OS seems to grow violently :), you should be proud of it, I do. It's been almost 10 years since the first time I use Palm PDA. The last one is Treo 650, and I still keep it till now although my primary phone is Treo Pro which using Windows Mobile.

This time I want to write about one IM applications name Chatopus, perhaps you already know that from long time ago. In the newest version (2.51), it has added integration with Nimbuzz, a mobile social messaging service that allow you to connect to many IM protocol (YM, MSN, Gtalk, Aol) and even Facebook chat :)

It's very simple, just create a new Nimbuzz account, installing Chatopus on your Palm device, then launch it. You'll get this on your device's screen:

Fill in your Nimbuzz username and password, that's it! You're done :) Enjoy, and don't forget to support the developer by purchase. Long live Palm OS!

Wednesday, October 7, 2009

Comparing Treo 650 and Treo Pro, physically :)

bottom view and front view

right-side view and left-side view

back view and top view

Pure-FTPD, an FTP server for linux

This is a simple steps to build your own FTP server in your home/ small office network, with username and password to access it. I run this on my Ubuntu Jaunty (9.04) server edition:

1. Installing the pure-ftpd package:
#sudo apt-get install pure-ftpd

2. Creating new group for FTP users:
#sudo groupadd ftpgroup

3. Creating directory for FTP users:
#sudo mkdir /home/ftpusers

4. Creating directory for each FTP user:
#sudo mkdir /home/ftpusers/joe

5. Creating the user in linux system, include the user in ftpgroup and point the home directory:
#sudo useradd joe -G ftpgroup -N -d /home/ftpusers/joe/

5. Create default password for FTP user:
#sudo passwd joe

And you are done! :)

* This example using "joe", you can create your own username.