2011

HOW TO : Modify iptables rules

Quick how to for my personal records. iptables is an open source firewall (and it does a lot more) included with most linux distributions.

Steps to add new rule to existing configuration

  • Check the list of rules and their corresponding sequence

[code]sudo iptables -vL –line-numbers [/code]

  • Add the new rule at the required location/sequence

[code] sudo iptables -I INPUT LINE_NUMBER RULE [/code]

Example :

[code]iptables -I INPUT 8 -s X.X.X.X/24 -p tcp -m state –state NEW -m tcp –dport 3128 -j ACCEPT[/code]

  • Save the configuration

[code] sudo serivce iptables save [/code]

Thx to Sijis for helping with the commands.

HOW TO : Fix Jboss startup script for CentOS

Quick note for myself on fixing the default startup script provided by Jboss to work on CentOS. Thx to Shankar to finding the solution.

The default startup script (/$JBOSS_HOME/bin/jboss_init_redhat.sh) that Jboss provides does not work properly in CentOS. The start option works fine, but when you try to stop Jboss, it gives you a “No JBossas is currently running” message and quits.

Here’s a quick way to fix it. Edit the jboss_init_redhat.sh file and replace

[code]JBOSSSCRIPT=$(echo $JBOSSSH | awk ‘{print $1}’ | sed ‘s/\//\\\//g’) [/code]

with

[code]JBOSSSCRIPT=$(echo $JBOSSSH | awk ‘{print $1}’)[/code]

HOW TO : Move your life into the cloud – Part 2

Following up on my previous post (https://kudithipudi.org/2011/11/13/how-to-move-your-life-into-the-cloud/) on the journey to using online services to maintain your productivity, here are some services that I use on a regular basis

BOOKMARKING :

  • SERVICE : Every switched your computer and were frustrated of having to remember and bookmark all the links you saved up on your old computer? I use delicious, to save me from this frustration. Delicious is the grand daddy of online bookmarking services and even though there are several competing services with more social networking capabilities, delicious works well for me. It allows you to store all of your bookmarks in an easily accessible URL (for example, all my bookmarks are at http://delicious.com/kudithipudi) and annotate them with tags
  • COST : free
  • OTHER CHOICES : pinboard, StumbleUpon, Google Bookmarks (being discontinued from Dec 2011), Firefox Sync, EverNote

Introducing the Indian Samurai

Have you ever seen an Indian Samurai? No, I don’t think so :). I have been fascinated by Samurai ever since I was a kid. So I asked my friend, Buffy (awesome artist) to create a personal profile of me in Samurai attire :). And what do you get? An Indian Samurai :). Moving forward, this is going to become my profile on all online services (other than LinkedIn, because I like my job 🙂 ). Everyone can put up a picture, but very few can put up their own personalized icon :).

Want to get your own personalized profile icon? Send a note to Buffy at http://www.handmadebybuffy.com/. You won’t regret it.

HOW TO : Move your life into the cloud

Nope… I am not too late to get on the “cloud” bandwagon :). I started writing this post in Dec 2009 and here’s a screenshot of my drafts to prove it 

And I have finally decided that it is time to complete the post and publish it.

I change laptops every 6 months or so and a lot of my friends ask me how I manage to swap them so quickly and yet stay productive. I am sure a lot of you can relate to this. It usually take a month or so to get your workstation to a “state” that you feel comfortable with and are productive. Here are the tricks/tools I use to make the switching of a laptop/desktop to be a no-brainer activity. And I utilize the “cloud” heavily for this.

I adhere to a couple of simple rules to make sure I can be productive anywhere, even in situations, where I don’t have my workstation with me.

  • Everything I produce should be searchable
  • Everything I produce should be available on the web
  • Everything I produce should be easy to share

With these principles in mind, here are the services I use..

PHOTOS :

  • SERVICE : I use flickr to store all my pictures. I have taken ~40 thousand pictures since 2003 and everyone of them is online at http://www.flickr.com/photos/kudithipudi. I wish, flickr was around when I was a kid, so that I had a place to store all the pictures from my childhood instead of rotting away in some old cardboard box. I like Flickr for it’s simplicity and ease of use. There are other sites that offer a lot more features, but the features offered by Flickr are are more than enough for me.
  • COST : $24.95/year to upload/store unlimited number of pictures
  • OTHER CHOICES : There are plenty of photo storing/sharing sites. Some of the popular ones are picasa, photobucket, facebook

ON-LINE STORAGE :

  • SERVICE : I use dropbox to store any digital content I create. This overlaps a bit with the service I use to store documents I create. Dropbox is a service that allows you to synchronize files between different computers you have the agent installed on and at the same time stores them online for you. They offer 2GB of free space by default and you can earn more space by referring people to the service. (note : the links to dropbox are my referral links. If you sign up for the service, I get 250Mb of free space. If you don’t want to use the referral links, you can sign up for the service directly at www.dropbox.com).You would think 2GB is not a lot of space. But once you remove the music, movies and photos, you really don’t need a lot of space :). For example, I haven’t crossed 1.8 GB, even though I have an electronic record of all my important files all the way from 2006. All I do, when I switch to a new laptop is install the dropbox agent and voila all my files are downloaded and synced with the latest copies.
  • COST : free. If you need more space, dropbox offers it for a cost.
  • OTHER CHOICES : There’s plenty of competition for dropbox, but I don’t think anyone of them have come close to making the sharing/storage work as seamless as dropbox. Some of the popular ones are box.net, SugarSync,wuala, Amazon Cloud Drive

DOCUMENTS :

  • SERVICE : I use Google Docs to create and store documents, spreadsheets and presentations. Since it’s inception in 2006 as a simple online editor and spreadsheets service, Google Docs has come a long way. There are few things you cannot do in Google Docs, that you can do in a full fledged productivity suite like Microsoft Office. Plus it gives you the capability to collaborate with other people when creating documents.
  • COST : free.
  • OTHER CHOICES : The only other service that comes close to Google Docs is Zoho Suites. Microsoft has a competing product, Office Live, but I think they are confused on how to market it because it will eat into their most profitable franchise (Microsoft Office)

EMAIL :

  • SERVICE : I use Gmail for my email. Although there is a standalone version,  I use it as part of the services provided by Google Apps for my domain (kudithipudi.org). It offers free spam protection, 7GB of space and super fast search. What else can one ask for? 🙂
  • COST : free
  • OTHER CHOICES : There are several free email hosting providers. Some of the popular ones are hotmail, yahoo, aol

ONLINE PRESENCE :

  • SERVICE : I strongly believe that all of us have to manage our online presence. And I don’t mean just for the folks that work in technology, but everyone that uses the Internet. And that is pretty much most of the people living on planet earth :). There are several ways to do this (and I think that is for a another blog post), but the simplest way is to ensure you have a place where you can broadcast your presence. I use this blog as a way to document my thoughts, share ideas and in general manage  my on-line presence. I host this blog on a virtual server that I lease from Rackspace.
  • COST : $11/month
  • OTHER CHOICES : I would not recommend what I am doing for most people. There are several free platforms that you can host your blog on. I just do it this way, because I like to tinker with technology. Some of the popular blogging platforms are tumblr, blogspot, wordpress, squarespace.

Happy 11/11/11

Other than a bunch of movies being released on this date.. everything seems to be normal :). Stock market is volatie, Europe seems confused, Revolutions going on in middle east.. I keep gaining weight :).. yep.. things are normal..

HOW TO : Configure Oracle data source in Jboss

Here are some quick notes on configuring a data source for an Oracle database in Jboss. Data Source are common access points to different sources of data, provided by the application server framework to the applications running in it. These instructions are very specific to the 5.x EAP version.  Jboss SOA has a pretty easy ant based script to configure data sources. I am not sure why Redhat didn’t think it would be good to include it as part of the EAP package too.

  1. Download the latest version of the JDBC driver from Oracle at http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html . You can also get to this link by searching for “download ojdbc jar” in Google. In fact, I would recommend that, given that Oracle might change the link for future editions. You will need an Oracle account to download the driver file.
  2. Copy the driver file to $JBOSS_HOME/server/$JBOSSS_PROFILE/lib
  3. Disable the default hsqldb datasource provided by Jboss. This is good for development purposes, but for any application server you want to deploy into a production environment, you need to replace it with a more robust DBMS. It will have a major impact on performance. There are two places hsqldb is referred to in the default install
    • $JBOSS_HOME/server/$JBOSSS_PROFILE/deploy/hsqldb-ds.xml
    • $JBOSS_HOME/server/$JBOSSS_PROFILE/deploy/messaging/hsqldb-persistence-service.xml
    • I usually rename these files with a DO_NOT_USE prefix. You can delete them too, but I leave them around just in case.
  4. Configure the Oracle data source by copying from the sample files and configuring them
    • $JBOSS_HOME/server/$JBOSSS_PROFILE/deploy/oracle-ds.xml (you can find the sample file at $JBOSS_HOME/docs/examples/oracle-ds.xml)
    • $JBOSS_HOME/server/$JBOSSS_PROFILE/deploy/messaging/oracle-persistence-service.xml (you can find the sample file at $JBOSS_HOME/docs/examples/oracle-persistence-service.xml)
      • Comment out the following line in the file if you are not using clustering in the application server [code] <attribute name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</attribute> [/code]
Restart Jboss and it will create all the required tables and objects in the schema provided in the connect string. It is implied that you have created a schema in Oracle with the required privileges.

I have been tagged..

As a site linking to site which is linking to site that serves malware. And I thought it was worth a post, because that site is twit.tv according to google 🙂 . 

I believe the warning is due to the fact that I linked to some video provided by twit on this post (https://kudithipudi.org/2011/11/04/overheard-comment-about-start-upentrepreneurship) .

I pinged Leo on Google + about it and hopefully he will have his team take care of it. Wait.. let me say that again.. I pinged Leo!!! . Isn’t technology amazing. With the click of a button, I was able to send a personal message to one of the most famous tech personalities.