Archive for the ‘FOSS’ Category

How To: iptables example

Posted: April 21, 2011 in FOSS

This is an example script for iptables

# IP addresses

# Subnets

# Flushing all chains
iptables -F
iptables -X

# Setting default filter policy
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP


Postfix –

1) Append smtp_generic_maps to Postfix
[root@server1 ~]# echo ‘smtp_generic_maps = hash:/etc/postfix/generic’ >> /etc/postfix/

2) Append the necessary outgoing email masks to Postfix address mapping table
<user>@<your_server> <your_email_address>

[root@server1 ~]# echo ‘root@server1.mydomain.local’ >> /etc/postfix/generic

3) Create lookup table for Postfix address mapping table
[root@server1 ~]# postmap /etc/postfix/generic

4) Restart Postfix to take effect Postfix changes
[root@server1 ~]# /etc/init.d/postfix restart

Mutt –

1) ‘set envelope_from=yes‘ in /etc/Muttrc file

2) Create .muttrc file if it’s not alredy created at your user’s home
[sajithr@server1 ~]$ touch ~/.muttrc

3) Add the necessary masks to ~/.muttrc
set from=”<from_email_address>”
set realname=”<username>”

[sajithr@server1 ~]$ cat ~/.muttrc
set from=”
set realname=”foo, server1″

How To: Setup DBD::Oracle in Ubuntu

Posted: September 11, 2010 in FOSS, How-to

This how-to outlines the setup of Perl-Oracle connectivity under Ubuntu.

  • Install DBI (DBI module should be installed before installing DBD::Oracle)

root@cratlk1:~# perl -MCPAN -e shell

cpan shell — CPAN exploration and modules installation (v1.9402)
Enter ‘h’ for help.

cpan[1]> m DBI
CPAN: Storable loaded ok (v2.21)
Going to read ‘/home/sajithr/.cpan/Metadata’
Database was generated on Tue, 24 Aug 2010 07:47:51 GMT
Module id = DBI
DESCRIPTION  Generic Database Interface (see DBD modules)
CPAN_USERID  TIMB (Tim Bunce <>)
CPAN_FILE    T/TI/TIMB/DBI-1.613.tar.gz
UPLOAD_DATE  2010-07-25
DSLIP_STATUS MmcOp (mature,mailing-list,C,object-oriented,Standard-Perl)
MANPAGE      DBI – Database independent interface for Perl
INST_FILE    /usr/local/lib/perl/5.10.1/

(If it’s not installed, install DBI)

  • Download DBD::Oracle

cpan[2]> get DBD::Oracle

  • Install libaio, libaio-dev (for Oracle instant-client)

root@cratlk1:~# sudo aptitude install libaio libaio-dev

  • Download and install oracle-instant-client-basic and oracle-instant-client-devel

root@cratlk1:~# alien –scripts oracle-instantclient11.2-*.rpm
root@cratlk1:~# sudo dpkg -i *.deb


Jaunty on T61

Posted: August 11, 2009 in FOSS, How-to, Life

Yes, It was a hard decision!

It took a very long time to move from Fedora. The main reason why I sticked with Fedora was to align with my RHEL and CentOS servers. But finally I realized the need of a “desktop”. So I decided to go ahead with Ubuntu 9.04 on my Lenovo T61.

Before the installation I read this excellent ThinkWiki article.

Here’s the result.


Video – nVIDIA Quadro NVS 140M; OK

Sound; OK

Wireless NIC – Intel; OK

Wired NIC – Intel 1GbE; OK

Bluetooth; OK

Keyboard Shortcuts; Almost OK, even ThinkVantage button! ( except the Atl+F8, Alt+F9, Alt+F12 and Alt+Space bar). To solve Alt+F8 ( Touch-pad on/off) here’s the fix.

Fingure-print; This ThinkWiki solution was helpful to fix the  problem of getting the finger-print reader hot. I had “USB Not Found”, “USB Timeout” and “Reading Error” errors when I was trying to tf-tool –acquire && tf-tool –verify. But after very patient retries, I figured out that swiping a finger “tip” was the trick. If you’ve any problems creating the .bir file, just give a try by swipping a finger “tip” rather than the whole thumb.


Oracle – 11gR1; Here’s the doc. If $DISPLAY environment variable not working, please run xhost local:oracle as privileged user to open ACL for the oracle user to access X and then export DISPLAY=0:0 for the user, oracle.

PL/SQL Developer – v7.1.4; On Wine it’s works pretty muck OK. I un-zipped Oracle basic instant client under ~/.wine/drive_c and specify the oci.dll path on PL/SQL Developer. And created a directory for TNS_ADMIN enviroment variable and set the variable from regedit. Finally created a valid tnsnames.ora at $TNS_ADMIN location. Basically these routings worked well and I could login to a db without any issue. But the images on the tool-bar are not displayed. I haven’t tested all the fuctionalities yet.

Citrix ICA Client – v11; OK, Please read the official doc and install pre-requisists before the installation.

Skype – v2.0; OK

VMware Workstation – v6.5.2; OK

It took whole 2-days to come up with a satisfied desktop.
And finally, thanks to the Internet and community works, the mission was successfully completed!

Thanks RMS!

Posted: October 15, 2008 in FOSS

During my SL visit, I received FSF membership materials. I was wondering to read “Free Software Free Society: selected essays of RMS” for months. The very first thing I did was stick a “INSIDE GNU/Linux” sticker over MS badge on my new notebook.

op5 and GPL

Posted: September 27, 2008 in FOSS
Tags: ,

op5; a network management/monitoring tool set developed on mighty Nagios. For me, the most important and interesting thing is the way they use open source concept.

What does op5 mean by open source,

With open source, we mean that the source code, which constitutes our products, is made available to our customers, who can utilize, read and modify the code. This assures the user that the program is doing what it should and is adjustable to fit the customers needs. Such modifications are commonly made by the original author, who may choose to make those adjustments a part of the official version. Find more information about the projects we build our products upon.

And see how they use GPL,

In GNU General Public License 2.0, it says (translated freely) that it is prohibited to withhold source codes from the user, if the source code is a development of the source code protected by GPL. One is not allowed to further spread the developed software or the original. However, there is nothing that states that one has to make one’s seperated and stand alone add ons available to the general public.

op5’s products are based on a number of different GPL licensed softwares. We develop functionality, which is normally added to one or more open source code programs. The code usually involves integrated functions, between several independent programs, in order to obtain added functionality and/or user-friendliness. Our source code is always available to our customers.

This introduces a few (but not trivial) problems and also shows how depth an enterprise can go with GPL. As I’m not an expert on legal matters, no serious comments will be raised here.

Anyway, at the end of the day, GPL has ended up as propriety license.