<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-767845241484768052</id><updated>2012-02-16T01:45:51.554-08:00</updated><category term='BASH'/><category term='Firewalls'/><category term='Web Album'/><category term='Base'/><category term='Xen'/><category term='postgres'/><category term='Cygwin'/><category term='Monitoring Amazon servers.'/><category term='Amazon'/><category term='Mysql'/><category term='Thin client'/><category term='Basic Networking'/><category term='Google Docs'/><category term='Jmeter'/><category term='CI'/><category term='TUN/tap'/><category term='Hudson screenshots'/><category term='http'/><category term='Virtual OS'/><category term='Sync'/><category term='DAlbum'/><category term='Compiling Kernel'/><category term='Directory Server'/><category term='Scripting'/><category term='System Monitoring'/><category term='Bridging'/><category term='FTP'/><category term='Networking'/><category term='Google Apps Active Directory sync'/><category term='Hudson'/><category term='Muninlite'/><category term='Linux Networking'/><category term='Virtualization'/><category term='Monit'/><category term='EC2'/><category term='Dropbox'/><category term='Automation'/><category term='Maverick'/><category term='Openbravo'/><category term='apache'/><category term='Barnyard'/><category term='LTSP'/><category term='Backtrack'/><category term='Linux Terminal Server Project'/><category term='ThinKloud'/><category term='SFTP'/><category term='linux Kernel'/><category term='UML'/><category term='Cross platform scripting'/><category term='ERP'/><category term='M/monit'/><category term='Qemu'/><category term='OpenLDAP'/><category term='Nagios'/><category term='Application Monitoring'/><category term='User Mode Linux'/><category term='Google'/><category term='LDAP'/><category term='Munin'/><category term='Virtual Networking'/><category term='PostgreSQL'/><category term='Jenkins'/><category term='Snort and Base'/><category term='Snort'/><category term='Active Directory'/><category term='Linux'/><category term='performance testing'/><category term='Sizing Tool'/><category term='Ubuntu'/><category term='pgpool'/><category term='Monitoring'/><category term='AD'/><category term='Google Apps'/><category term='IPtables'/><title type='text'>Linux | Open Source | Agility | CI | CD</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-7413386444272619361</id><published>2012-01-11T02:41:00.000-08:00</published><updated>2012-01-11T02:48:11.212-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AD'/><category scheme='http://www.blogger.com/atom/ns#' term='Sync'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Apps Active Directory sync'/><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Apps'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Directory'/><title type='text'>Google Apps Active Directory sync.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Are you planning to migrate from MS suit to Google Apps?&lt;br /&gt;&lt;br /&gt;Some time back I did one such migration and came across several posts where people said "Google AD sync doesn't work properly", etc etc.&lt;br /&gt;&lt;br /&gt;But I found it very useful and usable, with a fact that not much of the documentation is available around it.&lt;br /&gt;&lt;br /&gt;This lack of documentation inspired me to write this blog, hopefully it will ease up your work.&lt;br /&gt;&lt;br /&gt;To begin with, you need to have:&lt;br /&gt;* Working MS AD and an account with Google App&lt;br /&gt;* Administrative credentials for both (AD and Google App) accounts.&lt;br /&gt;* "&lt;a href="http://support.google.com/a/bin/answer.py?hl=en&amp;amp;answer=106368" target="_blank"&gt;Google Apps Directory Sync tool&lt;/a&gt;" installed on your system.&lt;br /&gt;&lt;br /&gt;Now lets see how it is done:&lt;br /&gt;* &lt;b&gt;Start the "Configuration Manager" from your startup menu&lt;/b&gt;.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-IEYtatMzRmM/Tw1Sl6q93tI/AAAAAAAAAEI/mz7ZJlUePnE/s1600/Start.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/-IEYtatMzRmM/Tw1Sl6q93tI/AAAAAAAAAEI/mz7ZJlUePnE/s200/Start.jpg" width="159" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;* &lt;b&gt;Fill the required details as shown in screenshots&lt;/b&gt;.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-wLJPekX78nw/Tw1TJ2vNKGI/AAAAAAAAAFI/vPyO6MYSCdI/s1600/tool.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="135" src="http://3.bp.blogspot.com/-wLJPekX78nw/Tw1TJ2vNKGI/AAAAAAAAAFI/vPyO6MYSCdI/s200/tool.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;General Settings&lt;/b&gt;: Check the options that you want to migrate to Google Apps. In my case I used only Users and Groups.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-EsxzhJ9wiqE/Tw1TF4l9bhI/AAAAAAAAAEw/oji-19BG08I/s1600/settings.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="93" src="http://2.bp.blogspot.com/-EsxzhJ9wiqE/Tw1TF4l9bhI/AAAAAAAAAEw/oji-19BG08I/s320/settings.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Google Apps Settings&lt;/b&gt;: Fill the email and password of user with Administrative privileges on Google Apps.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-zwDE7BhmqMw/Tw1TBZoOnbI/AAAAAAAAAEQ/6g2aFYnaqlE/s1600/LDAP.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="93" src="http://3.bp.blogspot.com/-zwDE7BhmqMw/Tw1TBZoOnbI/AAAAAAAAAEQ/6g2aFYnaqlE/s320/LDAP.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;LDAP Connection&lt;/b&gt;: This part needs your local LDAP/AD details. The provided user nay not be admin, but needs only read access.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-8x5aqvNWAKk/Tw1TKi_rtWI/AAAAAAAAAFQ/I0wv5td8gAg/s1600/User.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="112" src="http://4.bp.blogspot.com/-8x5aqvNWAKk/Tw1TKi_rtWI/AAAAAAAAAFQ/I0wv5td8gAg/s320/User.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;User Attributes&lt;/b&gt;: Provide the local (LDAP/AD) attribute for mail ID (in my case it was mail). &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-jZeN2sYiWyg/Tw1TLrZkcsI/AAAAAAAAAFY/krVH0Zhwgeg/s1600/User1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="181" src="http://4.bp.blogspot.com/-jZeN2sYiWyg/Tw1TLrZkcsI/AAAAAAAAAFY/krVH0Zhwgeg/s320/User1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;User Extended Attribute&lt;/b&gt;:&amp;nbsp; This configuration maps local given name, sir name and password attributes to Google Apps.&lt;br /&gt;Specifying Suspension Policy enables the user to decide what to do if a user is present in Google Apps and not in local AD.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-5LMWxUkL7s0/Tw1TMexd4cI/AAAAAAAAAFg/wHhiA5inC58/s1600/User2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="217" src="http://1.bp.blogspot.com/-5LMWxUkL7s0/Tw1TMexd4cI/AAAAAAAAAFg/wHhiA5inC58/s320/User2.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;User Sync&lt;/b&gt;: Add a new rule. This rule will define which users to sync (or which user not to sync). The rule field accepts RegEx, allowing us to add multiple users through one line.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-vQ-ZXZXnmd8/Tw1TEpnsoLI/AAAAAAAAAEo/t72a6csuGyc/s1600/Notification.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="218" src="http://1.bp.blogspot.com/-vQ-ZXZXnmd8/Tw1TEpnsoLI/AAAAAAAAAEo/t72a6csuGyc/s320/Notification.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Notification&lt;/b&gt;: In this section define your SMTP server and other details required to relay email on success or failure of this sync up.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-o5RuMCPOk3c/Tw1TB-WBwkI/AAAAAAAAAEY/Xy9rzI7C-10/s1600/limit.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="217" src="http://3.bp.blogspot.com/-o5RuMCPOk3c/Tw1TB-WBwkI/AAAAAAAAAEY/Xy9rzI7C-10/s320/limit.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Sync Limit&lt;/b&gt;: This section is to specify the suspension limit. In simpler words "The script should fail if more users are being suspended (than the specified limit)".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-HwSrFwwy_CE/Tw1TDOw_3KI/AAAAAAAAAEg/Ef6s1sbbdhg/s1600/logs.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="218" src="http://2.bp.blogspot.com/-HwSrFwwy_CE/Tw1TDOw_3KI/AAAAAAAAAEg/Ef6s1sbbdhg/s320/logs.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt; Log File&lt;/b&gt;: Specify a valid log file path here. The sync tool will save its output in this file.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Anything Else&lt;/b&gt;: There are many more options available (example syncing contacts etc), but in this blog I documented only the minimalistic configuration (and that was what I required fro my project).&lt;br /&gt;&lt;br /&gt;* &lt;b&gt;Test it out&lt;/b&gt;.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-7G-ESekaFdI/Tw1TG7l2boI/AAAAAAAAAE4/cstNKiriAhs/s1600/Simulate.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="218" src="http://3.bp.blogspot.com/-7G-ESekaFdI/Tw1TG7l2boI/AAAAAAAAAE4/cstNKiriAhs/s320/Simulate.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Simulate Sync&lt;/b&gt;:&amp;nbsp; This tab will tell you if your configuration is correct. And if you don't find any error (warnings are still OK), then just hit "Simulate Sync" @ the bottom.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-csS-mTTIe4Y/Tw1TIIxMUSI/AAAAAAAAAFA/7mymjuUOKkY/s1600/Simulate1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="216" src="http://1.bp.blogspot.com/-csS-mTTIe4Y/Tw1TIIxMUSI/AAAAAAAAAFA/7mymjuUOKkY/s320/Simulate1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Result&lt;/b&gt;: Hitting Simulate Sync will take you to a new view. Check if you see users being synced and you don't have errors.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* &lt;b&gt;Save this&lt;/b&gt; configuration to a file. I saved it as google-sync.xml.&lt;br /&gt;&lt;br /&gt;* &lt;b&gt;Run it&lt;/b&gt;: As of now this sync can only be run through command line, so just run this command and see the magic.&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;&lt;i&gt;&lt;b&gt;sync-cmd.exe -a -c "google-sync.xml" -r C:\Sync-logs\Google.Sync.logs&lt;/b&gt;&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;* &lt;b&gt;Schedule it&lt;/b&gt; with the help of tool like Jenkins and you are done with one aspect of migration which gives head ache to people.&lt;br /&gt;&lt;br /&gt;PS: Scheduling it through a tool makes it easy to monitor and/or run it on demand. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-7413386444272619361?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/7413386444272619361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2012/01/google-apps-active-directory-sync.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/7413386444272619361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/7413386444272619361'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2012/01/google-apps-active-directory-sync.html' title='Google Apps Active Directory sync.'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-IEYtatMzRmM/Tw1Sl6q93tI/AAAAAAAAAEI/mz7ZJlUePnE/s72-c/Start.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-6227904832158444953</id><published>2012-01-05T03:55:00.000-08:00</published><updated>2012-01-05T03:55:42.490-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dropbox'/><category scheme='http://www.blogger.com/atom/ns#' term='ThinKloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Docs'/><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><title type='text'>I am confused (Google docs Vs Dropbox)</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt; One of the interesting thing that I worked recently on was a small  decision of either using Google docs or Dropbox for storing and sharing documents.&lt;br /&gt;&lt;br /&gt;Seems unimportant?&lt;br /&gt;&lt;br /&gt;I also thought the same on hearing this for the first time, but believe me this proved to be an interesting study.&lt;br /&gt;&lt;br /&gt;Let me take you to the tour of both.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://docs.google.com/" target="_blank"&gt;&lt;b&gt;Google docs&lt;/b&gt;&lt;/a&gt; is an online solution provided by Google to collaboratively work (sharing, editing, etc) on the documents.&lt;br /&gt;&amp;nbsp; Several addons like &lt;a href="http://tools.google.com/dlpage/cloudconnect" target="_blank"&gt;&lt;b&gt;Cloud Connect&lt;/b&gt;&lt;/a&gt;, etc helps us to sync our native MS office documents to Google docs.&lt;br /&gt;One of the advantage of Google docs is that multiple people can edit one single document @ the same time.&lt;br /&gt;&lt;br /&gt;On the other hand &lt;a href="http://www.dropbox.com/" target="_blank"&gt;&lt;b&gt;Dropbox&lt;/b&gt;&lt;/a&gt; is used to share files, irrespective of the file being a document, image or some thing else.&lt;br /&gt;Same account can be either synced to multiple computers OR same files can be shared to multiple accounts, hence giving  feasibility of accessing the files across the globe (on multiple  systems). &lt;br /&gt;Feature like sharing and selective sync help us selective share our files with different people.&lt;br /&gt;One of the advantage of Dropbox is the ability to share all sorts of files (not only just documents)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;And the confusion starts :-)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;It looks pretty simple that Google docs should be used for documents and  Dropbox for other files, but the problem statement lies in the fact  that Google changes format of our existing MS office/Open office&amp;nbsp; documents to Google docs format (on uploading). In most of the cases this is not an issue, but  it created trouble when you have &lt;i&gt;formulas, macros &lt;/i&gt;and&lt;i&gt; images&lt;/i&gt; in your  documents, as&lt;br /&gt;&lt;i&gt;"They may disappear from your uploaded document"&lt;/i&gt;.&lt;br /&gt;Google also provides a solution to this, in the form of uploading the  documents (in this case other files can also be uploaded) in original  format (not changing the format to Google docs format).&lt;br /&gt;&lt;br /&gt;Here comes another "&lt;b&gt;BUT&lt;/b&gt;".&lt;br /&gt;&lt;br /&gt;But this also has a drawback, that we can't maintain single source of  truth for the documents. To edit any document we have to download it and  then again upload, which creates multiple copies in Google docs (which  have to be manually deleted).&lt;br /&gt;&lt;br /&gt;Conclusion after digging deaper:&lt;br /&gt;Using any of these tool is subjective.&lt;br /&gt;&lt;br /&gt;IF:&lt;br /&gt;* You are creating the documents from scratch.&lt;br /&gt;* And the priority is to have simulanious editing of documents, rather  than maintaing MS office formatting, example: Attendance sheet etc.&lt;br /&gt;Then Google docs is THE tool.&lt;br /&gt;&lt;br /&gt;ELSE IF:&lt;br /&gt;* You want to use your existing docs.&lt;br /&gt;* And the priority is to use the MS office format.&lt;br /&gt;Then Dropbox is THE tool.&lt;br /&gt;&lt;br /&gt;Advantages:&lt;br /&gt;* Google can save money sent on MS office licenses.&lt;br /&gt;* Both the tools can save the hassle of maintaining local shared file server.&lt;br /&gt;* Both have there recovery mechanism, so no danger of getting fully F**k*d.&lt;br /&gt;* Both provide full fleged files/documents sharing system (sharing sccross the globe).&lt;br /&gt;* Both provide the confidence of having one single "&lt;i&gt;Source Of Truth&lt;/i&gt;" for documents.&lt;br /&gt;* Dropbox provides offline editing of files (as they gets synced when connected back to internet). Same is provided by Google docs when used with Cloud Connect.&lt;br /&gt;&lt;br /&gt;As my requirement was more of sharing and offline working, so I choose Dropbox for now :-)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-6227904832158444953?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/6227904832158444953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2012/01/i-am-confused-google-docs-vs-dropbox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/6227904832158444953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/6227904832158444953'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2012/01/i-am-confused-google-docs-vs-dropbox.html' title='I am confused (Google docs Vs Dropbox)'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-8537517453338979199</id><published>2012-01-04T04:10:00.000-08:00</published><updated>2012-01-05T03:56:36.981-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cygwin'/><category scheme='http://www.blogger.com/atom/ns#' term='CI'/><category scheme='http://www.blogger.com/atom/ns#' term='Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='Jenkins'/><category scheme='http://www.blogger.com/atom/ns#' term='Automation'/><category scheme='http://www.blogger.com/atom/ns#' term='ThinKloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='BASH'/><category scheme='http://www.blogger.com/atom/ns#' term='Cross platform scripting'/><title type='text'>Cross Platform scripting with bash.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Is this title a bit confusing?&lt;br /&gt;&lt;br /&gt;I asked this question to many people and got the same answer as "YES"&lt;br /&gt;In our day to day life when we talk about bash, we refer to Linux as it's OS.&lt;br /&gt;&lt;br /&gt;But the main punch of this blog is to mak BASH break the boundaries of Operating System.&lt;br /&gt;I agree that till now bash is not capable of doing this alone.&lt;br /&gt;&lt;br /&gt;Now any guesses about the tool?&lt;br /&gt;&lt;br /&gt;If you guessed "&lt;a href="http://www.cygwin.com/"&gt;CYGWIN&lt;/a&gt;" then consider yourself as winner ;-)&lt;br /&gt;&lt;br /&gt;To make it more clear for people who were not able to guess it, I can put my example here:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Background&lt;/b&gt;: I am a consultant and work with all sorts of projects, during my last couple of projects I was automating build &amp;amp; release cycle for a product that is built on four platforms (Linux32, Linux64, Windows32, Windows64), hence I was desperately looking for some cross OS/platform scripting solution.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;My Thoughts&lt;/b&gt;: I am a BASH guy and as any developer, my first preference was to look for a solution around what I already know, rather than straight away jumping into any new technology and learning it (it was my second option though).&lt;br /&gt;If it was not bash then I was looking into &lt;b&gt;ant&lt;/b&gt; or others to do the job.&lt;br /&gt;As&lt;br /&gt;"The best way to do a work, is to do it." --&lt;i&gt;Harpreet Singh&lt;/i&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;For Newbies&lt;/b&gt;: Cygwin is Linux-like environment for Windows making it possible to port software running on POSIX systems (such as Linux, BSD, and Unix systems) to Windows.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution&lt;/b&gt;: Now lets put this together.&lt;br /&gt;Install Cygwin on a windows system with basic features like "openssh", "vim", etc.&lt;br /&gt;That's it you are ready to rock 'n' roll.&lt;br /&gt;All most all your Linux commands can run in this shell, which includes doing "ssh" into a Windows system ;-)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Need More&lt;/b&gt;: The story is not over yet. Combining the above setup with a CI tool (Jenkins in my case), gave me what I wanted.&lt;br /&gt;A full fledged automated build system, running on four platforms simultaneously (using Jenkins' multi configuration project feature), with ease of writing the script only once and that too using BASH.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Now that's what I call a win ;-)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The winners prize&lt;/b&gt;: As a prize of my effort done for the above setup I got:&lt;br /&gt;* Time saved per build/release cycle.&lt;br /&gt;* Time saved in developing automation scripts.&lt;br /&gt;&lt;br /&gt;And more important a "Happy Client"&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-8537517453338979199?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/8537517453338979199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2012/01/cross-platform-scripting-with-bash.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/8537517453338979199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/8537517453338979199'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2012/01/cross-platform-scripting-with-bash.html' title='Cross Platform scripting with bash.'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-185627092520531852</id><published>2011-03-16T09:46:00.000-07:00</published><updated>2011-03-16T09:48:13.398-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Monitoring'/><category scheme='http://www.blogger.com/atom/ns#' term='Application Monitoring'/><category scheme='http://www.blogger.com/atom/ns#' term='Openbravo'/><category scheme='http://www.blogger.com/atom/ns#' term='System Monitoring'/><category scheme='http://www.blogger.com/atom/ns#' term='Nagios'/><title type='text'>Nagios: Monitoring Systems &amp; Applications</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;"Someone please help me." &lt;br /&gt;These are the first words we usually say when we see our production system stuck/crashed due to some reasons.&lt;br /&gt;But "Someone helps those who help themselves."&amp;nbsp; --Harpreet Singh ;-)&lt;br /&gt;&lt;br /&gt;Now jokes apart.&lt;br /&gt;But suppose we get an alert before the systems fails may be during the first stroke or when the load starting going high or may be when total processes were more or any thing related to our applications running on the server.&lt;br /&gt;&lt;br /&gt;Wouldn't this be like a boon, a chance to save the system in time?&lt;br /&gt;If you have seen my earlier posts you will find monit/munin doing the same, but as on the way of my learning, I found that nagios is a better (easy and more flexible/plugable) tool.&lt;br /&gt;Before starting to explain on why my opinion changed I will ask you one question here.&lt;br /&gt;What do you expect/need from any system/application monitoring tool?&lt;br /&gt;&lt;br /&gt;The general answers would be:&lt;br /&gt;&amp;nbsp;- Stable.&lt;br /&gt;&amp;nbsp;- Good UI.&lt;br /&gt;&amp;nbsp;- Easy Installation.&lt;br /&gt;&amp;nbsp;- Easy configuration.&lt;br /&gt;&amp;nbsp;- Good coverage over different applications and system.&lt;br /&gt;&amp;nbsp;- etc. etc.&lt;br /&gt;&lt;br /&gt;Now lets see if nagios answers all of these?&lt;br /&gt;&lt;br /&gt;Like other tools nagios also has client-server architecture, which gives us freedom to monitor any number of&amp;nbsp; systems/applications from one nagios server.&lt;br /&gt;It has a easy to understand &amp;amp; configure UI, through which you can do many things like scheduling, controlling alerts etc. And if you are a CLI lover (as most of Linux geeks are) then you can do all those from command line also.&lt;br /&gt;&lt;br /&gt;Now here comes the most impressive part.&lt;br /&gt;Nagios is highly flexible. First of all it has huge plugin base already available for you to work with.&lt;br /&gt;But if that is not enough for you, then ask yourself just one questions.&lt;br /&gt;Do I know how to write a script (bash, python etc)?&lt;br /&gt;&lt;br /&gt;I usually say one line for nagios, that "If you can do it through CLI, you definitely can do it with nagios." Same is the answer for the question you asked yourself (above). If you can write a script to perform any action (login check, api calls, application query etc.) and get a small readable/understandable output (for both&lt;br /&gt;success and failure cases). Then it's like a kids play to integrate it to nagios and see the same results in UI.&lt;br /&gt;&lt;br /&gt;In simple words:&lt;br /&gt;&amp;nbsp;- Write a script to perform certain action.&lt;br /&gt;&amp;nbsp;- Copy that to the nagios script directory (just to ensure that you/anyone doesn't accidentally deletes it).&lt;br /&gt;&amp;nbsp;- Add that to the nagios commands.&lt;br /&gt;&amp;nbsp;- Call that command for the host you want.&lt;br /&gt;&amp;nbsp;- And done.&lt;br /&gt;&lt;br /&gt;Another plus part is that you can flaunt in front of your seniors about the work done (with minimal effort involved) ;-)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-185627092520531852?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/185627092520531852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2011/03/nagios-monitoring-systems-applications.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/185627092520531852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/185627092520531852'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2011/03/nagios-monitoring-systems-applications.html' title='Nagios: Monitoring Systems &amp; Applications'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-2146104965058279103</id><published>2011-03-14T10:21:00.000-07:00</published><updated>2011-03-14T11:04:34.899-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Openbravo'/><category scheme='http://www.blogger.com/atom/ns#' term='Jmeter'/><title type='text'>Why is my application slow?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Wondering what kind of blog post is this?&lt;br /&gt;So let me take you on a brief tour.&lt;br /&gt;&lt;br /&gt;Some time back I got a chance to work on Performance Testing of our application (@ openbravo).&lt;br /&gt;&lt;br /&gt;On this opportunity one quick questions popped up in my mind: "what do we seek in any performance testing tool?"&lt;br /&gt;&amp;nbsp;- Easy to adjust with our requirement.&lt;br /&gt;&amp;nbsp;- Easy to operate.&lt;br /&gt;&amp;nbsp;- Easy reports at the end.&lt;br /&gt;&lt;br /&gt;In our case Jmeter answered them all.&lt;br /&gt;&amp;nbsp;- With Jmeter recorder we were able to record the flow of the application. And with some adjustments like variables, assertions, halts, etc. we reproduced the scenario where a normal user will be using the application.&lt;br /&gt;&amp;nbsp;- After creating the script we can easily run it either from Jmeter UI console or CLI.&lt;br /&gt;&amp;nbsp;- Now for reports Jmeter itself has good number of ways in which we can view reports (graphs, tree view etc), but for sharing those reports is a bit of overhead, so another simple way is to run the test through Hudson (CI tool) and view reports using Hudson's Jmeter plugin.&lt;br /&gt;&lt;br /&gt;So basically before any end user/customer shouts "Why is my application slow?", this tool integrated with hudson does a regular check of the delay, failed requests, etc&amp;nbsp; to track the performance and give you an upper hand over other similar applications.&lt;br /&gt;&lt;br /&gt;When I was on my way with this work someone asked me "RM and performance testing?", "shouldn't QA do that for you?"&lt;br /&gt;I have a single answer to such question and truly writing there is nothing like mine or your work. It's only a perception, if we have time and scope of doing something then I think we should extend our hands and do it.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-2146104965058279103?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/2146104965058279103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2011/03/why-is-my-application-slow.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/2146104965058279103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/2146104965058279103'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2011/03/why-is-my-application-slow.html' title='Why is my application slow?'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-4904854247106674883</id><published>2010-10-29T06:06:00.000-07:00</published><updated>2010-10-29T06:30:31.655-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Openbravo'/><category scheme='http://www.blogger.com/atom/ns#' term='SFTP'/><title type='text'>Fun With SFTP</title><content type='html'>Until now I never knew that using FTP can be so easy.&lt;br /&gt;Many of you would have started thinking about the FTP servers till now, but to be more clear here I am talking about SFTP (SSH File Transfer Protocol).&lt;br /&gt;&lt;br /&gt;But as Shakespeare said "What's in name, the thing we call rose would smell as sweet with some other name".&lt;br /&gt;And so is true for SFTP, as this provided the usability that I was looking for and that too with minimal configuration with some extra benefits which we will talk about in the last.&lt;br /&gt;&lt;br /&gt;And not only that I was able to do this in two different ways.&lt;br /&gt;&lt;ul&gt;&lt;li&gt; One is like my as colleague Juan Pablo says "It should be a JAIL for the user", so that he cannot move outside the directory.&lt;/li&gt;&lt;li&gt; And the other one is like simple ftp which allows you to move around but not able to read or write unless you have permissions.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;To know it better I think a use case will be really helpful.&lt;br /&gt;So I will put down the requirement that pushed me to learn about it.&lt;br /&gt;We needed to grant permissions to one directory to a user, with one directory I literally mean that, as we wanted to block him from peeping into other things.&lt;br /&gt;That too with minimal access to system binaries and it should be secure etc etc.&lt;br /&gt;&lt;br /&gt;And SFTP was the best suit for the requirement, you will get the answer of how in the next section where I have shown the configurations of both the cases and believe me it couldn't have been simpler.&lt;br /&gt;&lt;br /&gt;Lets get into the jail first ;-)&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Edit /etc/ssh/sshd_config to include this.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;Subsystem sftp internal-sftp&lt;br /&gt;Match User sftpuser&lt;br /&gt;ChrootDirectory /var/www/sftpdir        (this makes the user stay under one directory)&lt;br /&gt;ForceCommand internal-sftp&lt;/span&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt; &lt;span&gt;Create the sftpuser and set it's shell acess to false, so that user is not able to do ssh.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;useradd -m -s /bin/false sftpuser&lt;/span&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt; Give correct permissions to sftpdir.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;chown root:root /var/www/sftpdir&lt;/span&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;For increasing security I changed these also in /etc/ssh/sshd_config:&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;&lt;blockquote&gt;PasswordAuthentication no&lt;br /&gt;PubkeyAuthentication yes&lt;/blockquote&gt;&lt;/span&gt;And I also added my pub key to /home/sftpuser/.ssh/authorized_keys file, but this is optional as this doesn't make any effect on the SFTP working.&lt;br /&gt;&lt;br /&gt;For this jail method we are done.&lt;br /&gt;&lt;br /&gt;Try connecting:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;sftp sftpuser@localhost&lt;br /&gt;Connecting to localhost...&lt;br /&gt;Enter passphrase for key '/home/user/.ssh/id_dsa':&lt;br /&gt;sftp&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now lets get back and see the next way (I know most of us will not read this, as first one will work like a charm):&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Create a user with /usr/lib/openssh/sftp-server as shell and /var/www/sftpdir as home dir.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;sudo useradd -s /usr/lib/openssh/sftp-server -d /var/www/sftpdir sftpuser&lt;/span&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt; Add this /usr/lib/openssh/sftp-server to /etc/shells file&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;&lt;blockquote&gt;echo "/usr/lib/openssh/sftp-server" &gt;&gt; /etc/shells&lt;/blockquote&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt; For increasing security I changed /etc/ssh/sshd_config and also added my key to /var/www/sftpdir/.ssh/authorized_keys file.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;PasswordAuthentication no&lt;br /&gt;PubkeyAuthentication yes&lt;/span&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;&lt;span&gt;Set correct permissions of the sftpdir&lt;span style="font-style: italic;"&gt;. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote style="font-style: italic;"&gt;&lt;span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;chmod go-w /var/www/sftpdir&lt;br /&gt;&lt;/span&gt;chmod 700 /var/www/sftpdir/.ssh&lt;br /&gt;chmod 600 /var/www/sftpdir/.ssh/authorized_keys&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;And done.&lt;br /&gt;&lt;br /&gt;Try connecting:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;sftp sftpuser@localhost&lt;br /&gt;Connecting to localhost...&lt;br /&gt;Enter passphrase for key '/home/user/.ssh/id_dsa':&lt;br /&gt;sftp&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now about the extra benefits:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Easy to configure.&lt;/li&gt;&lt;li&gt; Good in Security.&lt;/li&gt;&lt;li&gt; Can work with PubkeyAuthentication.&lt;/li&gt;&lt;li&gt; No extra installation (as uses SSH).&lt;/li&gt;&lt;li&gt;Easy to use SFTP client.&lt;/li&gt;&lt;/ul&gt;at least these things are enough to pull me towards it.&lt;br /&gt;&lt;br /&gt;That's it for taday. Happy SFTPing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-4904854247106674883?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/4904854247106674883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2010/10/fun-with-sftp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/4904854247106674883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/4904854247106674883'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2010/10/fun-with-sftp.html' title='Fun With SFTP'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-6088341683317465717</id><published>2010-10-26T04:44:00.000-07:00</published><updated>2010-10-26T04:49:01.557-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sizing Tool'/><category scheme='http://www.blogger.com/atom/ns#' term='Openbravo'/><category scheme='http://www.blogger.com/atom/ns#' term='Amazon'/><category scheme='http://www.blogger.com/atom/ns#' term='EC2'/><title type='text'>Sizing Openbravo: EC2 cost calculation and experimenting with around 270 concurrent users</title><content type='html'>To help Openbravo partners and users we have extended our Sizing Tool Guidelines to include some more facts and findings.&lt;br /&gt;&lt;br /&gt;"As more the better" --Harpreet Singh ;-)&lt;br /&gt;Same has been proved by the new Amazon Cluster Compute Instance (cc1.4xlarge).&lt;br /&gt;&lt;br /&gt;Amazon recently anounced the availability of it's biggest Instance, ideal for cluster infrastructure, as it promises high connectivity between cluster instances (as high as 10 Gigabit Ethernet).&lt;br /&gt;But we tested this instance for the standalone test with Oracle DB and Openbravo on same instance.&lt;br /&gt;The results were realy exciting as it was able to handle around 270 concurrent users.&lt;br /&gt;&lt;br /&gt;Now truely speaking "Thats what I call results."&lt;br /&gt;And the same results have been added to our Sizing Tool Results.&lt;br /&gt;&lt;br /&gt;"There is no such thing as a free lunch." --Milton Friedman&lt;br /&gt;This instance also has some drawbacks:&lt;br /&gt; - It costs a lot (almost $1.60 per hour)&lt;br /&gt; - Till now it is only available in US (N Virginia) region.&lt;br /&gt; - And is only available with CentOS.&lt;br /&gt;&lt;br /&gt;Now here comes another one.&lt;br /&gt;As cost is the biggest concern when we think of any new infrastructure. For example: Running an instance (which can support 10 concurrent users) for 3 (THREE!!!) years on Amazon EC2 would cost only $1217.60, I think these figures can help one think about on-site and in-cloud (EC2) deployments.&lt;br /&gt;So we extended our Sizing Guidelines to help you choose your Amazon Instance.&lt;br /&gt;&lt;br /&gt;In the last section of the Guidelines we have added:&lt;br /&gt; - Steps you can follow to calculate your yearly cost with &lt;a href="http://calculator.s3.amazonaws.com/calc5.html"&gt;Amazon cost calculator&lt;/a&gt;.&lt;br /&gt; - As Amazon calculator is a bit complex so we created &lt;a href="https://spreadsheets2.google.com/ccc?key=tQVw5MCH_p6P5BVDcpIewLw&amp;authkey=CIWQ0NEB&amp;hl=en&amp;authkey=CIWQ0NEB#gid=0"&gt;simple calculator&lt;/a&gt; to help you out.&lt;br /&gt; - And pre calculated cost for most common scenarios.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-6088341683317465717?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/6088341683317465717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2010/10/sizing-openbravo-ec2-cost-calculation.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/6088341683317465717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/6088341683317465717'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2010/10/sizing-openbravo-ec2-cost-calculation.html' title='Sizing Openbravo: EC2 cost calculation and experimenting with around 270 concurrent users'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-286385946784912062</id><published>2010-10-18T04:48:00.000-07:00</published><updated>2010-10-18T05:11:48.664-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ERP'/><category scheme='http://www.blogger.com/atom/ns#' term='Openbravo'/><category scheme='http://www.blogger.com/atom/ns#' term='Maverick'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Openbravo Ubuntu Maverick (be the first to use it).</title><content type='html'>We were planning to blog and call for users to come up for early testing of your own trusted Openbravo with the upcoming Ubuntu's 10.10. But as Ubuntu Maverick (10.10) is already released, I think now all of us have a chance to be the first to use Openbravo with Ubuntu Maverick.&lt;br /&gt;&lt;br /&gt;To be the first all you need to do is get Ubuntu Maverick Meerkat up and running any where you like may it be your hardware system, Amazon EC2 or a virtual machine.&lt;br /&gt;&lt;a href="http://releases.ubuntu.com/releases/10.10/"&gt;This&lt;/a&gt; link will help you if you are planning to install on hardware system or virtual machine and these &lt;a href="http://uec-images.ubuntu.com/releases/10.10/release/"&gt;AMIs&lt;/a&gt; to boot one in EC2&lt;br /&gt;&lt;br /&gt;Once you are set then lets rock and roll. I mean start installation.&lt;br /&gt;&lt;br /&gt;So all you have to do to install Openbravo is:&lt;br /&gt; - Enable the Partner’s Repository:&lt;br /&gt;    * sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"&lt;br /&gt;&lt;br /&gt; - Install the openbravo-erp package:&lt;br /&gt;    * sudo apt-get update&lt;br /&gt;    * sudo apt-get install openbravo-erp&lt;br /&gt;&lt;br /&gt;You can also install it using Synaptic or the Ubuntu Software Center:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_NfmyMpYAx_Y/TLw03coLGYI/AAAAAAAAADo/aNodY1kFCis/s1600/maverick-openbravo.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 243px;" src="http://3.bp.blogspot.com/_NfmyMpYAx_Y/TLw03coLGYI/AAAAAAAAADo/aNodY1kFCis/s400/maverick-openbravo.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5529352569686268290" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Can installing of any comprehensive ERP be simpler than this?&lt;br /&gt;&lt;br /&gt;You can do it even on a Friday. ;-)&lt;br /&gt;As installing most ERPs on a Friday means forgetting about your Friday and Saturday night fun.  With Openbravo on Maverick Meerkat, you can start the process at 7 and be at the party by 9!&lt;br /&gt;&lt;br /&gt;So once you are done with the party sorry I mean installation you are set to use it and be a proud user of Openbravo ERP.&lt;br /&gt;As it's you love and support that we have been able to live up to your expectations.&lt;br /&gt;&lt;br /&gt;Also the users/developers who want to upgrade from 10.04 to 10.10, can do that without a fear of breaking the installation, the only concern should be that 10.10 is not a LTS version :-(&lt;br /&gt;&lt;br /&gt;For more on installing Openbravo in Ubuntu please follow this &lt;a href="http://wiki.openbravo.com/wiki/ERP/2.50/Openbravo_ERP_Installation/Ubuntu_Installation"&gt;wiki&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-286385946784912062?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/286385946784912062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2010/10/openbravo-ubuntu-maverick-be-first-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/286385946784912062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/286385946784912062'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2010/10/openbravo-ubuntu-maverick-be-first-to.html' title='Openbravo Ubuntu Maverick (be the first to use it).'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_NfmyMpYAx_Y/TLw03coLGYI/AAAAAAAAADo/aNodY1kFCis/s72-c/maverick-openbravo.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-5435016448366536922</id><published>2010-07-16T06:32:00.000-07:00</published><updated>2010-07-16T07:05:32.576-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pgpool'/><category scheme='http://www.blogger.com/atom/ns#' term='PostgreSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Openbravo'/><category scheme='http://www.blogger.com/atom/ns#' term='postgres'/><title type='text'>PostgreSQL: Performance Tuning</title><content type='html'>&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;"&lt;span style="font-weight: bold;"&gt;Need is the mother of discovery&lt;/span&gt;"    -Harpreet Singh&lt;br /&gt;I wrote this line just few minutes before writing this blog, as my need of optimizing PostgreSQL's performance lead me to search/discover for some cool facts and features of postgres and tools related to it.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;For any postgres user thinking about 100 or more concurrent users is like a nightmare. I will admit that some time back I was also a bit scared on thinking about 100 concurrent users with postgres, but with the end of my search I am happy that I found a usable way to achieve that.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;"&lt;span style="font-weight: bold;"&gt;Knowledge increases by sharing&lt;/span&gt;"&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;So I thought I will pass it to everyone who is searching for it on the internet.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;The need that triggered me to search for this was to recommend Hardware as well as Software configuration to support 100-200 concurrent users on Openbravo ERP and postgres/Oracle as the database.&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;For me as I am a postgres supporter I believed that postgres will be able to handle it. And yippee I was right.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;Coming back to the main point:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;Postgres doesn't support too many users (concurrent) by default, it comes with very solid configuration aimed at everyone's best guess as to how an "average" database on "average" hardware should be.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;Postgres has some default configuration options to fine tune it, like:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;- max_connections&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;- shared_buffers&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;- effective_cache_size&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;- etc etc.&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;But these are not enough for postgres to support 100+ (concurrent) users.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;In a reply of my query to postgres performance mailing list, I came to know about connection pooling.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;One and the only con that I saw in this is that it is external, I mean we have to configure an external tool to do connection pooling.&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;There are tools like pgpool to make the job easy for us (pgpool is a middleware that works between PostgreSQL servers and a PostgreSQL database client).&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;Connection pooling tools provide us features like:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;- Connection Pooling: It reduces connection overhead, and improves system's overall throughput.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;- Replication: Using the replication function enables creating a real-time backup on 2 or more physical disks.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;- Load Balance: As the name suggests it distributes the queries on two or more replicated servers.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;- Limiting Exceeding Connections: With the use of this extra connections are queued instead of returning an error immediately.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;- Parallel Query: Using the parallel query function, data can be divided among the multiple (replicated) servers.&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;Configuring these properly can fine tune postgres' performance to handle 100-200 concurrent users.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size:100%;"&gt;Happy *postgresing*&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;To read more about performance tuning in postgreSQL read &lt;a href="http://www.revsys.com/writings/postgresql-performance.html"&gt;this&lt;/a&gt;.&lt;br /&gt;For more on pgpool click &lt;a href="http://pgpool.projects.postgresql.org/"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-5435016448366536922?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/5435016448366536922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2010/07/postgresql-performance-tuning.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/5435016448366536922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/5435016448366536922'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2010/07/postgresql-performance-tuning.html' title='PostgreSQL: Performance Tuning'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-8112831949322561302</id><published>2010-07-01T22:14:00.000-07:00</published><updated>2010-07-09T12:42:55.488-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CI'/><category scheme='http://www.blogger.com/atom/ns#' term='Hudson'/><category scheme='http://www.blogger.com/atom/ns#' term='Openbravo'/><title type='text'>Module Integration with CI (Hudson)</title><content type='html'>Module Integration with CI (Hudson)&lt;br /&gt;&lt;br /&gt;Long back we (RM @ Openbravo) introduced CI (Continuous Integration) tool (Hudson) for testing code of our core ERP development branch.&lt;br /&gt;Which allowed our developers to do:&lt;br /&gt; - Daily Builds (Full/Incremental).&lt;br /&gt; - Smoke Tests.&lt;br /&gt; - DB Consistency Tests.&lt;br /&gt; - etc.&lt;br /&gt;&lt;br /&gt;But as most of the developers were becoming modular (Openbravo became modular with Openbravo ERP Version 2.50), CI was not able to maintain the pace and provide similar help for the module testing.&lt;br /&gt;&lt;br /&gt;To set things in place we enabled our developers to integrate and test their modules using new &lt;a href="http://modules.builds.openbravo.com"&gt;CI&lt;/a&gt; even after committing even a single changeset to their module repository.&lt;br /&gt;&lt;br /&gt;According to me the goal or I will say the purpose of this whole effort was to enable a developer to have a nice and sound sleep after he pushes his commit to the module repository.&lt;br /&gt;Sounds confusing?&lt;br /&gt;&lt;br /&gt;Let me explain it.&lt;br /&gt;Earlier developers use to develop a module and used to do time consuming small manual testing to make sure that their code is bug free.&lt;br /&gt;From a developers perspective he cannot sleep properly until his module is tested and deployed properly.&lt;br /&gt;&lt;br /&gt;To enable CI for modules and save developers time (from manual testing) we created the setup which will help developers to directly configure a new job in Hudson to test their changesets. This new setup empowers them to do:&lt;br /&gt;- Sanity Check&lt;br /&gt;- Source compilation check and Create OBX&lt;br /&gt;- Database consistency test&lt;br /&gt;- Module's JUnit test&lt;br /&gt;- Installation of the generated OBX&lt;br /&gt;- Un-Installation of the installed module&lt;br /&gt;- Selenium test (module smoke)&lt;br /&gt;- Upgrade the module from previous published version in CR (Central Repository) to generated OBX&lt;br /&gt;Even for a single new changeset in the module's repository.&lt;br /&gt;&lt;br /&gt;And still it has endless possibilities, where we can integrate new test cases to this.&lt;br /&gt;&lt;br /&gt;We have also created a template job (which is pre-configured with all these test cases) to help developers configure and run tests for their modules easily.&lt;br /&gt;Developers will just have to copy the template job to a &lt;a href="http://wiki.openbravo.com/wiki/ERP_module_integration_with_CI#New_job"&gt;new  job&lt;/a&gt;, change the variables to their modules related variables and then run the job. We have also created a simplified &lt;a href="http://wiki.openbravo.com/wiki/ERP_module_integration_with_CI"&gt;wiki&lt;/a&gt; for step by step instructions.&lt;br /&gt;&lt;br /&gt;* Currenty Openbravo developers working on any Modules can take benefits of this tool (but sky is the limit, maybe someday we can allow partners/community to take advantage of this tool).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-8112831949322561302?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/8112831949322561302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2010/07/module-integration-with-ci-hudson.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/8112831949322561302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/8112831949322561302'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2010/07/module-integration-with-ci-hudson.html' title='Module Integration with CI (Hudson)'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-4753215644793277188</id><published>2010-01-07T04:12:00.000-08:00</published><updated>2010-01-12T23:02:02.894-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Openbravo'/><title type='text'>RM Updates: Amazon backup stratergy, Mantis Upgrade, Establish automatic process for releasing 2.40, OB@OB</title><content type='html'>These are the latest news from the Openbravo's &lt;a href="http://wiki.openbravo.com/wiki/Release_Management"&gt;Release Management Team&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Backup Strategy: EBS boot.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Amazon has a new feature ebs boot, this helps us to keep our root partition in ebs volume and also allows us to have data up to 1TB in root partition. This helps us in the following way : better backup strategy and from now we can pause &amp; re-start an instance and thus saving cost. My colleague gnuyoga has a &lt;a href="http://gnuyoga.wordpress.com/2009/12/28/ec2-instance-store-to-ebs-boot/"&gt;blog&lt;/a&gt; about the same.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Mantis Upgrade: Upgrade issues.openbravo.com to mantis-1.2.0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you know our existing issue tracker is based on mantis 1.1.8. With the release of mantis 1.2.0, it promises lot of interesting productivity boosters. We are migrating our current mantis to latest. This involves quiet bit of challenge. In this sprint we address customization like SSO (Single Sign On, etc), and custom css. If you want to be a beta tester to testing our new mantis please drop us an email for us to give you a test account.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Continuous release of 2.40 branch&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So the mantra of 2.40 branch is continuous release as detailed in my colleague juan pablo's &lt;a href="http://jpabloae.wordpress.com/2009/12/23/openbravo-erp-2-40-continuous-releases/"&gt;blog post&lt;/a&gt;. Now this task is complete and for details see &lt;a href="http://builds.openbravo.com/view/stable-2.40/job/erp_stable_2.40-tag-mps/"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;OB@OB: Documentation and Linux tool&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This task was about &lt;a href="http://wiki.openbravo.com/wiki/Release_Management/Testing_environments/Production_to_testing_replication"&gt;documenting&lt;/a&gt; the process of replicating production environment to testing environment and creating a new &lt;a href="http://code.openbravo.com/tools/rm/testing-environments/"&gt;tool&lt;/a&gt; that automates this process in linux.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-4753215644793277188?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/4753215644793277188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2010/01/these-are-latest-news-from-release.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/4753215644793277188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/4753215644793277188'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2010/01/these-are-latest-news-from-release.html' title='RM Updates: Amazon backup stratergy, Mantis Upgrade, Establish automatic process for releasing 2.40, OB@OB'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-8494975132441116384</id><published>2009-12-01T01:41:00.000-08:00</published><updated>2009-12-01T08:25:21.280-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><title type='text'>HTTP Basic Auth</title><content type='html'>As while working with apache many of us feel like having a secure way to access our data.&lt;br /&gt;Simple but effective &lt;span style="font-weight: bold;"&gt;http basic auth&lt;/span&gt; is probably the quickest and the easiest answer.&lt;br /&gt;&lt;br /&gt;Setting it up requires only two things:&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;htpasswd&lt;/span&gt; file (containing valid user name and password)&lt;br /&gt;- And apache configuration file to read it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Creating a htpasswd file:&lt;br /&gt;- htpasswd -cm &lt;span style="font-weight: bold;"&gt;&lt;&lt;/span&gt;/Path/tp/htpasswd-file&gt; &lt;span style="font-weight: bold;"&gt;&lt;&lt;/span&gt;username&gt;&lt;br /&gt;- While adding more users just remove &lt;span style="font-weight: bold;"&gt;c&lt;/span&gt; from the above command.&lt;br /&gt;&lt;br /&gt;Configuring apache:&lt;br /&gt;- Add this to default (vhost file) configuration file&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;       &lt;span style="font-weight:bold;"&gt;&lt;&lt;/span&gt;location&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                Allow from all&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                AuthType Basic&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                AuthName "Restricted Area"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                AuthUserFile &lt;span style="font-weight:bold;"&gt;&lt;&lt;/span&gt;/Path/to/htpasswd-file&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                Require valid-user&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;        &lt;span style="font-weight:bold;"&gt;&lt;&lt;/span&gt;/location&gt;&lt;br /&gt;&lt;br /&gt;- Now reload apache and enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-8494975132441116384?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/8494975132441116384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2009/12/http-basic-auth.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/8494975132441116384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/8494975132441116384'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2009/12/http-basic-auth.html' title='HTTP Basic Auth'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-1067363528069501210</id><published>2009-11-17T22:56:00.000-08:00</published><updated>2009-11-23T03:43:59.139-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Openbravo'/><title type='text'>RM updates: Automation and upgrade of Mantis @ Openbravo</title><content type='html'>We are almost close to achieve milestone 2 of &lt;a href="http://wiki.openbravo.com/wiki/Release_Management/Continuous_Integration_Vision#MileStone_2"&gt;Continuous Integration&lt;/a&gt;. The team is working really hard on finding a solution for existing challenges as well as proposing ways to automate current repetitive tasks.&lt;br /&gt;&lt;br /&gt;Last sprint we have completed one of the most challenging tasks "automated code migration from pi - main". Now we have obx generated from main branch if all the &lt;a href="http://builds.openbravo.com/view/devel-int/"&gt;tests&lt;/a&gt; are successful. Plans to generate an obx on every commit are heavily debated within the team.&lt;br /&gt;&lt;br /&gt;Now we have tecnicia14 resurrected. This will help our developers as well as our QA team to see the code changes in the live environment (&lt;a href="http://live.builds.openbravo.com"&gt;live&lt;/a&gt; and &lt;a href="http://liveqa.builds.openbravo.com"&gt;liveqa&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Apart from the CI infrastructure, we have also upgraded the &lt;a href="http://issues.openbravo.com"&gt;Issue Tracker&lt;/a&gt; version to 1.1.8 which is the latest stable &lt;a href="http://www.mantisbt.org/bugs/changelog_page.php"&gt;mantis&lt;/a&gt; version available. We are also in the process of ensuring we have a &lt;a href="http://aws.amazon.com/importexport/"&gt;hard backup&lt;/a&gt; of all the important instances running in Amazon ec2.&lt;br /&gt;&lt;br /&gt;For a complete list of the on-going stories that we are working on, please check the Sprint 28 page of our &lt;a href="http://spreadsheets.google.com/ccc?key=pPWZAST9Jg5Ft0n3RnGcwFg&amp;hl=en"&gt;Scrum spreadsheet&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-1067363528069501210?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/1067363528069501210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2009/11/rm-updates-automation-and-upgradation.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/1067363528069501210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/1067363528069501210'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2009/11/rm-updates-automation-and-upgradation.html' title='RM updates: Automation and upgrade of Mantis @ Openbravo'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-495959085313511182</id><published>2009-06-29T05:31:00.000-07:00</published><updated>2009-06-30T03:01:22.275-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UML'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtual OS'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='User Mode Linux'/><title type='text'>UML (User Mode Linux)</title><content type='html'>In this Blog I will take you to a tour to a new dimension of Virtualization. That is the world of UML.&lt;br /&gt;&lt;br /&gt;Many of us have spent time using VMware, VBox, Qemu etc, or debugging on how to start Xen/OpenVZ.&lt;br /&gt;But the truth of above two is, applications like VMware are heavy on system resources and applications like Xen are a bit tricky (kernel should be Xen specific).&lt;br /&gt;&lt;br /&gt;One thing I will admit, that I was also amongst the people who have spent a huge amount of time on different Virtualization technologies, until here at Openbravo I was given an opportunity to setup virtual environment on Amazon servers.&lt;br /&gt;&lt;span style="font-size:75%;"&gt;* For those who haven't worked with Amazon servers, Amazon servers are like domU of Xen virtual environment.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The aim was to setup an Openbravo instance (which can be made available on demand) on the top of an Amazon instance.&lt;br /&gt;The main problem in working with amazon server is that you don't have access to host (domO) and neither Amazon people allow you to use custom kernel for domU (custom kernel: so that we can build another xen domU over it).&lt;br /&gt;So taking these things in to account we were left with options like VMware but looking upon their load on system we needed something light and usable.&lt;br /&gt;In our hunt for a perfect virtual environment my manager told me about UML. And truly speaking it turned up to be the perfect tool (it matched all our requirements and expectations).&lt;br /&gt;&lt;br /&gt;UML works very differently from all other Virtualization techniques, all it needs to work smoothly is uml-utilities package, one kernel (binary script) and a block device(which contains minimal/full OS).&lt;br /&gt;It is like doing chroot to a directory and installing a full OS in that.&lt;br /&gt;It has many other features like&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Mounting host filesystem.&lt;/li&gt;&lt;li&gt;Adding a COW (copy on write) file.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;etc.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;This COW file is used if you want to use same block device (filesystem) for more than one Virtual system. This COW file writes the difference to a separate file (just like a diff patch).&lt;br /&gt;&lt;br /&gt;The use of UML gave us one more flexibility, that was using Xen image (pre-installed Openbravo instance) with UML kernel.&lt;br /&gt;And an advantage over Xen (i.e. access over host system is not required in UML).&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;&lt;a href="http://user-mode-linux.sourceforge.net/"&gt;UML Howto&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/User-mode_Linux"&gt;UML Wiki&lt;/a&gt;&lt;br /&gt;&lt;a href="http://uml.nagafix.co.uk/"&gt;Download Page&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-495959085313511182?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/495959085313511182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2009/06/uml-user-mode-linux.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/495959085313511182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/495959085313511182'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2009/06/uml-user-mode-linux.html' title='UML (User Mode Linux)'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-1050529062283974718</id><published>2009-06-15T22:54:00.000-07:00</published><updated>2009-06-29T22:58:31.526-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DAlbum'/><category scheme='http://www.blogger.com/atom/ns#' term='Hudson screenshots'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Album'/><title type='text'>Screenshots and DAlbum</title><content type='html'>In one of my recent tasks I explored a couple of tools available to publish screen shots (Web Based).&lt;br /&gt;&lt;br /&gt;The aim was to get the screen shots when Hudson (CI tool) is running a build and to publish them using some web based gallery creator, for later reference of the developer or QA team.&lt;br /&gt;&lt;br /&gt;Well the task was not tough but was a bit tricky, as the screen shot took by Xvnc plugin of Hudson was not sufficient (it took the screen shot at the end of the build, mostly an empty screen), so we decided to get a command line tool to get screen shots. And in the hunt for a command line tool we got ImageMagic and discovered that Xvnc plugin was also using the same tool.&lt;br /&gt;Now by running a &lt;span style="font-weight: bold;"&gt;FOR loop&lt;/span&gt; in the background (when required) gave us a directory full of relevant screen shots.&lt;br /&gt;&lt;br /&gt;Now the job remaining was to publish them, for that lot of tools are available in opensource world, basically most of them are either python or php based, but we wanted some thing which required less/no installation (extra) and could run on Apache, so we choose DAlbum (php based). Selecting this tool was not enough as it required placing the images in to it's root directory and clicking or executing &lt;span style="font-weight: bold;"&gt;Reindex.php&lt;/span&gt; script. Here also we made some changes as doing it with the above mentioned script increased disk usage, it created 3 copies of each screen shot (1 for thumbnail, 2nd for full screen view and the 3rd for downloading).&lt;br /&gt;&lt;br /&gt;We overcome this issue by creating our own script which did the same job but now the size of all the three images were defined by us, the script (bash) converted the screen shot in to three different sized imaged (using ImageMagic) and then placed them into the respective directory required by DAlbum.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is sample command we used to get the screen shots&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;import -window root -display $display $screenshotpath/screenshot$i.jpg&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;DAlbum looks like this&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_NfmyMpYAx_Y/SjdBAlBMsSI/AAAAAAAAABo/WsdRnWxm-U8/s1600-h/show.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 242px;" src="http://4.bp.blogspot.com/_NfmyMpYAx_Y/SjdBAlBMsSI/AAAAAAAAABo/WsdRnWxm-U8/s320/show.png" alt="" id="BLOGGER_PHOTO_ID_5347814560718696738" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For more information on ImageMagic click &lt;a href="http://www.imagemagick.org/script/index.php"&gt;here&lt;/a&gt;.&lt;br /&gt;For more information on DAlbum click &lt;a href="http://www.dalbum.org/"&gt;here&lt;/a&gt;.&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-1050529062283974718?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/1050529062283974718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2009/06/screenshots-and-dalbum.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/1050529062283974718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/1050529062283974718'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2009/06/screenshots-and-dalbum.html' title='Screenshots and DAlbum'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_NfmyMpYAx_Y/SjdBAlBMsSI/AAAAAAAAABo/WsdRnWxm-U8/s72-c/show.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-4044767793644434056</id><published>2009-06-03T23:40:00.000-07:00</published><updated>2009-06-29T23:23:27.070-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Muninlite'/><category scheme='http://www.blogger.com/atom/ns#' term='M/monit'/><category scheme='http://www.blogger.com/atom/ns#' term='Monit'/><category scheme='http://www.blogger.com/atom/ns#' term='Munin'/><category scheme='http://www.blogger.com/atom/ns#' term='Monitoring Amazon servers.'/><title type='text'>Monitoring system with munin/monit</title><content type='html'>&lt;span style="font-size:130%;"&gt;Munin with Muninnode or Muninlite&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;Recently while deploying monitoring system on Amazon servers I came across a new tool Muninlite, I would rather prefer to call it a script.&lt;br /&gt;And the hands on experience of this script forced me to think on to which one is better (muninnode / muninlite) and to write this blog so that it can be of help to others.&lt;br /&gt;The goal was to monitor several Amazon servers from one centralized Master and do the resource planning based on the usage graphs.&lt;br /&gt;So we decided to do the job using munin (as front end) and muninnode as client nodes to collect data from different servers.&lt;br /&gt;While exploring on how to deploy and take the best use of the setup we came across &lt;a href="https://sourceforge.net/projects/muninlite/"&gt;muninlite&lt;/a&gt;, it's a bash script which works just similar to muninnode, but as name suggests it's light on system resources and has has less response time.&lt;br /&gt;&lt;br /&gt;To go through the installation steps for munin and muninnode click &lt;a href="http://www.howtoforge.com/server_monitoring_monit_munin"&gt;here&lt;/a&gt;.&lt;br /&gt;And if looking for a better and lighter way to replace muninnode click &lt;a href="https://sourceforge.net/projects/muninlite/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The resultant graph produced by munin looks like this&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_NfmyMpYAx_Y/Sie2rJcgZiI/AAAAAAAAABg/3ieWdMnsSZA/s1600-h/1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 242px; height: 320px;" src="http://2.bp.blogspot.com/_NfmyMpYAx_Y/Sie2rJcgZiI/AAAAAAAAABg/3ieWdMnsSZA/s320/1.png" alt="" id="BLOGGER_PHOTO_ID_5343440335284495906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.howtoforge.com/server_monitoring_monit_munin"&gt;&lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;span class="down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;img src="http://www.blogger.com/img/blank.gif" alt="Link" class="gl_link" border="0" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Monit and M/Monit&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;While accomplishing the job mentioned above we also deployed monit, it has proven itself in the terms of alerts  (i.e sending mails etc. as alerts at specified times).&lt;br /&gt;Despite of monitoring system as a whole (CPU load, memory usage etc.) monit is also capable of monitoring services eg. apache, ssh, mysql etc.&lt;br /&gt;It also has an extended hand as M/Monit which gives a cool dashboard to manage and monitor different monit instances, but the worst part is yet to come this (M/Monit) is not free.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;To go through the installation steps of monit click &lt;a href="http://www.howtoforge.com/server_monitoring_monit_munin_p2"&gt;here&lt;/a&gt;.&lt;br /&gt;And if you need a demo version of M/Monit click &lt;a href="http://mmonit.com/"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;In a web browser monit looks like this&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_NfmyMpYAx_Y/SiexDP4URZI/AAAAAAAAABI/9tuQlQObml0/s1600-h/2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 162px;" src="http://2.bp.blogspot.com/_NfmyMpYAx_Y/SiexDP4URZI/AAAAAAAAABI/9tuQlQObml0/s320/2.png" alt="" id="BLOGGER_PHOTO_ID_5343434152258848146" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;And M/Monit something like this&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_NfmyMpYAx_Y/SiexR69kdsI/AAAAAAAAABQ/QhCRVHHdKfI/s1600-h/mmonit_details.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 241px; height: 223px;" src="http://1.bp.blogspot.com/_NfmyMpYAx_Y/SiexR69kdsI/AAAAAAAAABQ/QhCRVHHdKfI/s320/mmonit_details.png" alt="" id="BLOGGER_PHOTO_ID_5343434404341774018" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I think one thing I left out to share is as we were working on the domU of Amazon servers the only thing that would have worked for us was the thing which can read the desired data from proc files.&lt;br /&gt;As during the process of finalizing munin and monit as our tools we stopped on cacti also for sometime as it had more features and to collect data it used SNMP (Simple Network Management Tool), which gives it a great flexibility to work on almost every linux environment, but it failed in our case.&lt;br /&gt;&lt;br /&gt;Even it was not useful for me at that instance but I can share a veiw of &lt;a href="http://www.cacti.net/"&gt;cacti&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_NfmyMpYAx_Y/Sie1wXCTyNI/AAAAAAAAABY/YkZptFlNc9o/s1600-h/get_image.php.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 284px;" src="http://2.bp.blogspot.com/_NfmyMpYAx_Y/Sie1wXCTyNI/AAAAAAAAABY/YkZptFlNc9o/s320/get_image.php.png" alt="" id="BLOGGER_PHOTO_ID_5343439325320431826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-4044767793644434056?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/4044767793644434056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2009/06/monitoring-system-with-muninmonit.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/4044767793644434056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/4044767793644434056'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2009/06/monitoring-system-with-muninmonit.html' title='Monitoring system with munin/monit'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_NfmyMpYAx_Y/Sie2rJcgZiI/AAAAAAAAABg/3ieWdMnsSZA/s72-c/1.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-7716878612071676119</id><published>2008-11-23T00:09:00.000-08:00</published><updated>2009-06-29T23:24:07.199-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux Kernel'/><category scheme='http://www.blogger.com/atom/ns#' term='Compiling Kernel'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Compiling Linux Kernel 2.6.27</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;How to: Compile Linux kernel 2.6.27&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Compiling custom kernel has its own advantages and disadvantages. However, new Linux user / admin find it difficult to compile Linux kernel. Compiling kernel needs to understand few things and then just type couple of commands. This step by step howto covers compiling Linux kernel version 2.6.xx under Debian GNU Linux. However, instructions remains the same for any other distribution except for apt-get command.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Step # 1 Get Latest Linux kernel code&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Visit http://kernel.org/ and download the latest source code. File name would be linux-x.y.z.tar.bz, where x.y.z is actual version number. For example file&lt;br /&gt;linux-2.6.27.tar.bz represents 2.6.27 kernel version. Use wget command to download kernel source code:&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;$ cd /tmp&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-x.y.z.tar.bz&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Note: Replace x.y.z with actual version number.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Step # 2 Extract tar (.tar.bz) file&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Type the following command:&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;# tar -xzvf linux-2.6.27.tar.bz -C /usr/src&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;# cd /usr/src&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Step # 3 Configure kernel&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Before you configure kernel make sure you have development tools (gcc compilers and related tools) are installed on your system. If gcc compiler and tools are not installed then use apt-get command under Debian Linux to install development tools.&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;# apt-get install gcc &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now you can start kernel configuration by typing any one of the command:&lt;br /&gt;&lt;br /&gt;  * &lt;span style="color: rgb(255, 0, 0);"&gt;$ make menuconfig&lt;/span&gt; - Text based color menus, radiolists &amp;amp; dialogs. This option also useful on remote server if you wanna compile kernel remotely.&lt;br /&gt;  * &lt;span style="color: rgb(255, 0, 0);"&gt;$ make xconfig&lt;/span&gt; - X windows (Qt) based configuration tool, works best under KDE desktop&lt;br /&gt;  * &lt;span style="color: rgb(255, 0, 0);"&gt;$ make gconfig&lt;/span&gt; - X windows (Gtk) based configuration tool, works best under Gnome Dekstop.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For example make menuconfig command launches following screen:&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;$ make menuconfig&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You have to select different options as per your need. Each configuration option has HELP button associated with it so select help button to get help.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Step # 4 Compile kernel&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Start compiling to create a compressed kernel image, enter:&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;$ make&lt;/span&gt;&lt;br /&gt;Start compiling to kernel modules:&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;$ make modules&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Step # 5 Install kernel&lt;/span&gt;&lt;/span&gt; &lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;modules&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Install kernel modules (become a root user, use su command):&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;$ su -&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;# make modules_install&lt;br /&gt;&lt;/span&gt;It will install all the module under /lib/modules/ directory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Step # 6 Install kernel&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;So far we have compiled kernel and installed kernel modules. It is time to install kernel itself.&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;# make install&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It will install three files into /boot directory as well as modification to your kernel grub configuration file:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    * System.map-2.6.27&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    * config-2.6.27&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    * vmlinuz-2.6.27&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;OR&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;But if don't want to install the kernel on the same machine as on which it i being compiled then.&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;# make bzImage&lt;/span&gt;&lt;br /&gt;Where bzImage is a files created after step 4 in the current working directory.&lt;br /&gt;&lt;br /&gt;It will create the three files into current directory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Step # 7: Create an initrd image&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Type the following command at a shell prompt:&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;# cd /boot&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;# mkinitramfs -o initrd.img-2.6.27 2.6.27&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If using fedora/redhat type the following command at a shell prompt:&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;# mkinitrd -o initrd.img-2.6.27 2.6.27&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;initrd images contains device driver which needed to load rest of the operating system later on. Not all computer requires initrd, but it is safe to create one.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Step # 8 Modify Grub configuration file - /boot/grub/menu.lst&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Open file using vi:&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;# vi /boot/grub/menu.lst&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;title           Debian GNU/Linux, kernel 2.6.27 Default&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;root            (hd0,0)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;kernel          /boot/vmlinuz-2.6.27 root=/dev/hdb1 ro&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;initrd          /boot/initrd.img-2.6.27&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;boot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Remember to setup correct root=/dev/hdXX device. Save and close the file. If you think editing and writing all lines by hand is too much for you, try out update-grub command to update the lines for each kernel in /boot/grub/menu.lst file. Just type the command:&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;# update-grub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Neat. Huh?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Step # 9 : Reboot computer and boot into your new kernel&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Just issue reboot command:&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;# reboot&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-7716878612071676119?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/7716878612071676119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2008/11/compiling-linux-kernel-2627.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/7716878612071676119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/7716878612071676119'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2008/11/compiling-linux-kernel-2627.html' title='Compiling Linux Kernel 2.6.27'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-5779244997110187601</id><published>2008-11-20T03:44:00.000-08:00</published><updated>2009-06-29T23:25:02.711-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Networking'/><category scheme='http://www.blogger.com/atom/ns#' term='Firewalls'/><category scheme='http://www.blogger.com/atom/ns#' term='Basic Networking'/><category scheme='http://www.blogger.com/atom/ns#' term='IPtables'/><category scheme='http://www.blogger.com/atom/ns#' term='Networking'/><title type='text'>Networking Basics</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="font-size:180%;"&gt;&lt;span style="font-weight: bold;"&gt;Networking Basics&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Basic Networking Funda&lt;br /&gt;The traffic/data leaves one machine, goes towards the Gateway, which is then redirected towards the destination by the Gateway.&lt;br /&gt;* In this process first routing table in the source machine should point towards the correct Gateway.&lt;br /&gt;* The Gateway should have correct route, IPtables and natting rules pointing towards the destination.&lt;br /&gt;* The destination machine should have correct IPtables to accept the data comming from that source.&lt;br /&gt;&lt;br /&gt;In general Networking depends on three things.&lt;br /&gt;&lt;br /&gt;* Routing&lt;br /&gt;* Nating&lt;br /&gt;* IPtables/Firewalls&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Routing&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;It tells tell the system about where to send a packet for any destination.&lt;br /&gt;Routing is the process of selecting paths in a network along which to send network traffic. Routing is performed for many kinds of networks, including the telephone network, electronic data networks (such as the Internet), and transportation (transport) networks. This article is concerned primarily with routing in electronic data networks using packet switching technology.&lt;br /&gt;&lt;br /&gt;In packet switching networks, routing directs forwarding, the transit of logically addressed packets from their source toward their ultimate destination through intermediate nodes; typically hardware devices called routers, bridges, gateways, firewalls, or switches. Ordinary computers with multiple network cards can also forward packets and perform routing, though they are not specialized hardware and may suffer from limited performance. The routing process usually directs forwarding on the basis of routing tables which maintain a record of the routes to various network destinations. Thus constructing routing tables, which are held in the routers' memory, becomes very important for efficient routing. Most routing algorithms use only one network path at a time, but multipath routing techniques enable the use of multiple alternative paths.&lt;br /&gt;&lt;br /&gt;Routing, in a more narrow sense of the term, is often contrasted with bridging in its assumption that network addresses are structured and that similar addresses imply proximity within the network. Because structured addresses allow a single routing table entry to represent the route to a group of devices, structured addressing (routing, in the narrow sense) outperforms unstructured addressing (bridging) in large networks, and has become the dominant form of addressing on the Internet, though bridging is still widely used within localized environments.&lt;br /&gt;&lt;br /&gt;To explore it more you should stop reading and take a look at the routing table in you system&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* route -n&lt;/span&gt;&lt;br /&gt;This command will give you a table ex.&lt;br /&gt;&lt;br /&gt;Kernel IP routing table.&lt;br /&gt;&lt;table width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Destination&lt;/td&gt; &lt;td&gt;Gateway&lt;/td&gt;    &lt;td&gt;Genmask&lt;/td&gt; &lt;td&gt;Flags&lt;/td&gt; &lt;td&gt;Metric&lt;/td&gt; &lt;td&gt;Ref &lt;/td&gt;   &lt;td&gt;Use&lt;/td&gt; &lt;td&gt;Iface&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;192.168.20.0&lt;/td&gt;    &lt;td&gt;192.168.20.1&lt;/td&gt;    &lt;td&gt;255.255.255.0&lt;/td&gt;   &lt;td&gt;UG&lt;/td&gt;    &lt;td&gt;0&lt;/td&gt;      &lt;td&gt;0&lt;/td&gt;        &lt;td&gt;0&lt;/td&gt; &lt;td&gt;tap0&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;192.168.1.0&lt;/td&gt;     &lt;td&gt;0.0.0.0&lt;/td&gt;         &lt;td&gt;255.255.255.0&lt;/td&gt;   &lt;td&gt;U&lt;/td&gt;     &lt;td&gt;0 &lt;/td&gt;     &lt;td&gt;0&lt;/td&gt;        &lt;td&gt;0&lt;/td&gt; &lt;td&gt;eth0&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;0.0.0.0&lt;/td&gt;         &lt;td&gt;192.168.1.5&lt;/td&gt;     &lt;td&gt;0.0.0.0&lt;/td&gt;         &lt;td&gt;UG&lt;/td&gt;    &lt;td&gt;0&lt;/td&gt;      &lt;td&gt;0&lt;/td&gt;        &lt;td&gt;0&lt;/td&gt; &lt;td&gt;eth0&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;To add a route to this table type&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* route add -net 192.168.1.0/24 gw 192.168.1.1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can replace 192.168.1.0/24 with network ip to which you want to send data and 192.168.1.1 with the gateway through which that network is connected.&lt;br /&gt;&lt;br /&gt;To delete a route to this table type&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* route del -net 192.168.1.0/24 gw 192.168.1.1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Natting&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;In computer networking, network address translation (NAT) is the process of modifying network address information in datagram packet headers while in transit across a traffic routing device for the purpose of remapping a given address space into another.&lt;br /&gt;&lt;br /&gt;Most often today, NAT is used in conjunction with network masquerading (or IP masquerading) which is a technique that hides an entire address space, usually consisting of private network addresses , behind a single IP address in another, often public address space. This mechanism is implemented in a routing device that uses stateful translation tables to map the "hidden" addresses into a single address and then rewrites the outgoing Internet Protocol (IP) packets on exit so that they appear to originate from the router. In the reverse communications path, responses are mapped back to the originating IP address using the rules ("state") stored in the translation tables. The translation table rules established in this fashion are flushed after a short period without new traffic refreshing their state.&lt;br /&gt;&lt;br /&gt;As described, the method only allows transit traffic through the router when it is originating in the masqueraded network, since this establishes the translation tables. However, most NAT devices today allow the network administrator to configure translation tables entries for permanent use. This feature is often referred to as "static NAT" or port forwarding and allows traffic originating in the 'outside' network to reach designated hosts in the masqueraded network.&lt;br /&gt;&lt;br /&gt;Because of the popularity of this technique, see below, the term NAT has become virtually synonymous with the method of IP masquerading.&lt;br /&gt;&lt;br /&gt;Network address translation has serious consequences (see below, Drawbacks &amp;amp; Benefits) on the quality of Internet connectivity and requires careful attention to the details of its implementation. As a result, many methods have been devised to alleviate the issues encountered. See article on NAT traversal.&lt;br /&gt;&lt;br /&gt;Nating can be taken care off in 2 ways one is through the router and the other way is if you are dealing with Linux machines it can be done using IPtables.&lt;br /&gt;&lt;br /&gt;To check nating tables on a Linux machine type&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -nvL -t nat&lt;/span&gt;&lt;br /&gt;This command will give you a table ex.&lt;br /&gt;&lt;br /&gt;Chain PREROUTING (policy ACCEPT 3791 packets, 359K bytes)&lt;br /&gt;&lt;table width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;pkts&lt;/td&gt; &lt;td&gt;bytes&lt;/td&gt; &lt;td&gt;target&lt;/td&gt;     &lt;td&gt;prot&lt;/td&gt; &lt;td&gt;opt&lt;/td&gt; &lt;td&gt;in&lt;/td&gt;     &lt;td&gt;out&lt;/td&gt;     &lt;td&gt;source&lt;/td&gt;               &lt;td&gt;destination&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Chain POSTROUTING (policy ACCEPT 6573 packets, 406K bytes)&lt;br /&gt;&lt;table width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;pkts&lt;/td&gt; &lt;td&gt;bytes&lt;/td&gt; &lt;td&gt;target&lt;/td&gt;     &lt;td&gt;prot&lt;/td&gt; &lt;td&gt;opt&lt;/td&gt; &lt;td&gt;in&lt;/td&gt;     &lt;td&gt;out&lt;/td&gt;     &lt;td&gt;source&lt;/td&gt;               &lt;td&gt;destination&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Chain OUTPUT (policy ACCEPT 6405 packets, 394K bytes)&lt;br /&gt;&lt;table width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;pkts&lt;/td&gt; &lt;td&gt;bytes&lt;/td&gt; &lt;td&gt;target&lt;/td&gt;     &lt;td&gt;prot&lt;/td&gt; &lt;td&gt;opt&lt;/td&gt; &lt;td&gt;in&lt;/td&gt;     &lt;td&gt;out&lt;/td&gt;     &lt;td&gt;source&lt;/td&gt;               &lt;td&gt;destination&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;NAT or DNAT&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Address translation occurs before routing. Facilitates the transformation of the destination IP address to be compatible with the firewall's routing table. Used with NAT of the destination IP address, also known as destination NAT or DNAT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;SNAT&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Address translation occurs after routing. This implies that there was no need to modify the destination IP address of the packet as in pre-routing. Used with NAT of the source IP address using either one-to-one or many-to-one NAT. This is known as source NAT, or SNAT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;PACKET FLOW UNDER NAT&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;* The packet is first examined by rules in the  PREROUTING chain, if any. It is then inspected by the rules in the nat table's PREROUTING chain to see whether the packet requires DNAT. It is then routed.&lt;br /&gt;&lt;br /&gt;*If the packet is destined for a protected network, then it is filtered by the rules in the FORWARD chain of the filter table and, if necessary, the packet undergoes SNAT in the POSTROUTING chain before arriving to the network.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;Masquerading (Many to One NAT)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Masquerading is another name for what many call many to one NAT.  Traffic from all devices on one or more protected networks will appear as if it originated from a single IP address on the Internet side of the firewall.&lt;br /&gt;&lt;br /&gt;Note: The masquerade IP address always defaults to the IP address of the firewall's main interface. The advantage of this is that you never have to specify the NAT IP address.&lt;br /&gt;&lt;br /&gt;You can configure many to one NAT to an IP alias, using the POSTROUTING and not the MASQUERADE statement. An example of this can be seen in the static NAT section that follows.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;Port Forwarding Type NAT&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;In many cases home users may get a single DHCP public IP address from their ISPs. If a Linux firewall is also your interface to the Internet and you want to host a Web site on one of the NAT protected home servers, then you will have to use port forwarding&lt;br /&gt;&lt;br /&gt;Port forwarding is handled by the PREROUTING chain of the nat table&lt;br /&gt;&lt;br /&gt;examples:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -t nat -A PREROUTING -p tcp -i eth0 -d $external_ip --dport 80 -j DNAT --to 192.168.1.200:8080&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This rule allows the port forwarding for traffic destined to port 80 of the firewall's IP address to be forwarded to port 8080 on server 192.168.1.200&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SNAT&lt;br /&gt;----&lt;br /&gt;&lt;br /&gt;SNAT is used to NAT all other outbound connections initiated from the protected network to appear to come from single IP address.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;POSTROUTING 1 to 1&lt;br /&gt;------------------&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -t nat -A POSTROUTING -s 192.168.1.100 -o eth0 -j SNAT --to-source 97.158.253.26&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Many to 1&lt;br /&gt;---------&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT -o eth0 --to-source 97.158.253.29&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* DNAT ----- Used to do destination network address translation. ie. rewriting the destination IP address of the packet&lt;br /&gt;&lt;br /&gt;* SNAT ----- Used to do source network address translation rewriting the source IP address of the packet The source IP                   address is user defined&lt;br /&gt;&lt;br /&gt;* MASQUERADE  Used to do Source Network Address Translation.By default the source IP address is the same as that used by the              firewall's interface&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NOTE:&lt;br /&gt;&lt;br /&gt;ipforwarding should be enabled..then only your rules will work&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;cat /proc/sys/net/ipv4/ip_forward&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This should give 1.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;IPtables/Firewalls&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;iptables is a user space application program that allows a system administrator to configure the tables provided by Xtables (which in turn uses Netfilter) and the chains and rules it stores. Because iptables requires elevated privileges to operate, it must be executed by user root, otherwise it fails to function. On most Linux systems, iptables is installed as /usr/sbin/iptables and documented in its man page [1], which can be opened using "man iptables" when installed. iptables is also commonly used to inclusively refer to the kernel-level component Xtables that does the actual table traversal and provides an API for kernel-level extensions.&lt;br /&gt;&lt;br /&gt;iptables works with Linux kernels 2.4 and 2.6. Older Linux kernels use ipchains (Linux 2.2) and ipfwadm (Linux 2.0).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The source of the packet determines which chain it traverses initially. There are three predefined chains (INPUT, OUTPUT, and FORWARD) in the "filter" table. Predefined chains have a policy, for example DROP, which is applied to the packet if it reaches the end of the chain. The system administrator can create as many other chains as desired. These chains have no policy; if a packet reaches the end of the chain it is returned to the chain which called it. A chain may be empty.&lt;br /&gt;&lt;br /&gt;Each rule in a chain contains the specification of which packets it matches. It may also contain a target. As a packet traverses a chain, each rule in turn examines it. If a rule does not match the packet, the packet is passed to the next rule. If a rule does match the packet, the rule takes the action indicated by the target, which may result in the packet being allowed to continue along the chain or it may not.&lt;br /&gt;&lt;br /&gt;The packet continues to traverse the chain until either (1) a rule matches the packet and decides the ultimate fate of the packet (for example by calling one of the ACCEPT or DROP targets); or (2) a rule calls the RETURN target, in which case processing returns to the calling chain; or (3) the end of the chain is reached.&lt;br /&gt;&lt;br /&gt;This example shows an already-configured workstation firewall. The command "iptables -L" is executed by user root to display the firewall configuration.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -nvL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Chain INPUT (policy DROP)&lt;br /&gt;target     prot opt source               destination&lt;br /&gt;ACCEPT     all  --  localhost.localdomain  localhost.localdomain&lt;br /&gt;ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED&lt;br /&gt;REJECT     all  --  anywhere             anywhere  &lt;br /&gt;&lt;br /&gt;Chain FORWARD (policy DROP)&lt;br /&gt;target     prot opt source               destination&lt;br /&gt;&lt;br /&gt;Chain OUTPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Before proceeding further one should be aware of the three predefined chains of IPtables.&lt;br /&gt;* INPUT&lt;br /&gt;* OUTPUT&lt;br /&gt;* FORWARD&lt;br /&gt;&lt;br /&gt;INPUT&lt;br /&gt;As the name explains this chain comes into picture when any packet is destined towards the system.&lt;br /&gt;&lt;br /&gt;OUTPUT&lt;br /&gt;This chain has to be configured when thinking of sending packet to other machines in the network.Usually we don't configure this chain.As it's default policy is ACCEPT.&lt;br /&gt;&lt;br /&gt;FORWARD&lt;br /&gt;This chain comes into picture when any packet in the network travels from 1 system 2 the other via the gateway, then FORWARD chain on the gateway has to be configured in such a way that it should accept the packets for forwarding.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Adding rules to IPTABLES&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -I INPUT -s 192.168.20.0/24 -j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -I FORWARD -s 192.168.20.0/24 -j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -A FORWARD -s 192.168.20.0/24 --dport 80 -j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -I FORWARD -d 192.168.20.0/24 -j DROP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(Where I/A are to specify the priority of the ip rule, I is the inserting to the highest priority and A is appending it to the last)&lt;br /&gt;&lt;br /&gt;Deleting rules from IPTABLES.&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -D INPUT -s 192.168.20.0/24 -j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -D FORWARD -s 192.168.20.0/24 -j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -D FORWARD -s 192.168.20.0/24 --dport 80 -j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -D FORWARD -d 192.168.20.0/24 -j DROP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(Remember the rule should be in the same format as it was added only change is the  -D)&lt;br /&gt;&lt;br /&gt;To check if you are connected to your network properly commands like ping. telnet and traceroute will help.&lt;br /&gt;See man pages of these commands for more help.&lt;br /&gt;Use tcpdump to view the flow of packets FOR BETTER RESULTS.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-5779244997110187601?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/5779244997110187601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2008/11/networking-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/5779244997110187601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/5779244997110187601'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2008/11/networking-basics.html' title='Networking Basics'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-4501006860656225944</id><published>2008-11-04T05:28:00.000-08:00</published><updated>2009-06-29T23:26:00.773-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TUN/tap'/><category scheme='http://www.blogger.com/atom/ns#' term='Bridging'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtual Networking'/><title type='text'>Network Bridging</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="font-size:180%;"&gt;TAP (Network Bridging)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;In computer networking, TUN and TAP are virtual network kernel drivers. They implement network devices that are supported entirely in software, which is different from ordinary network devices that are backed up by hardware network adapters.&lt;br /&gt;&lt;br /&gt;TAP (as in network tap) simulates an Ethernet device and it operates with layer 2 packets such as Ethernet frames. TUN (as in network TUNnel) simulates a network layer device and it operates with layer 3 packets such as IP packets. TAP is used to create a network bridge, while TUN is used with routing.&lt;br /&gt;&lt;br /&gt;Packets sent by an operating syst/sbin/modprobe tunem via a TUN/TAP device are delivered to a user-space program that attaches itself to the device. A user-space program may also pass packets into a TUN/TAP device. In this case TUN/TAP device delivers (or "injects") these packets to the operating system network stack thus emulating their reception from an external source.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;TUN is mostly used for OpenVPN, VTun.&lt;br /&gt;Where as TAP is used for bridging Virtual Machines to the host machine.&lt;br /&gt;&lt;br /&gt;We have one more concept that is BRIDGE an this is used if you want to put a number of Virtual Machines into a 1 single subnet.&lt;br /&gt;Else with tap devices you can not do that.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Configuring Network Bridges.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:130%;"&gt;TAP&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;To configure tap you need to install uml-utilities, to do this -&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* apt-get install uml-utilities&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will give you tunctl command, which is further used to build tap interface.&lt;br /&gt;To build tap interface run -&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* tunctl&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will give you (Set 'tap0' persistent and owned by uid 0).&lt;br /&gt;&lt;br /&gt;You can see this interface with &lt;&lt;span style="color: rgb(255, 102, 0);"&gt;ifconfig -a&lt;/span&gt;&gt; command.&lt;br /&gt;Now when the interface is ready give it an ip, make it up and link it to your Virtual Machine.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* ifconfig tap0 192.168.1.1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The ip which you assign to tap0 should be of different subnet as your host network.&lt;br /&gt;&lt;br /&gt;Just remember doing this will not solve your full problem of networking in Virtual Machines, to make it fully up and running it requires routing, iptables and nating(NAT) to be configured properly.&lt;br /&gt;You can expect these things to be covered in some of my later posts.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:130%;"&gt;Bridge&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Bridge comes into picture when you have more than 1 Virtual Machine.&lt;br /&gt;It helps to get all the Virtual Machines in 1 single network which is not possible with TAP alone.&lt;br /&gt;With this one can also get the Virtual Machines into the same network as the host.&lt;br /&gt;&lt;br /&gt;To configure Bridge you need to install bridge-utils, to do this -&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* apt-get install bridge-utils&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will give you brctl command, which is further used to build tap interface.&lt;br /&gt;Running brctl alone will give a list of option which can be used with this command.&lt;br /&gt;But for now run -&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* brctl addbr br0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will add a bridging interface named br0.Now add an ip to it.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* ifconfig br0 192.168.1.1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here comes a time to select the scenario that either you need a different network or the same net work for VM(Virtual Machines).&lt;br /&gt;&lt;br /&gt;If you need the network to be same then.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* brctl addif br0 eth0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* brctl addif br0 tap0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* ifconfig eth0 0.0.0.0&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* ifconfig tap0 0.0.0.0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will add eth0 and tap0 interfaces to bridge br0.&lt;br /&gt;&lt;br /&gt;And if their is no need of the same network then.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* brctl addif br0 tap0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will add tap0 interface to bridge br0.&lt;br /&gt;In this case to make network live and working configure routing, iptables and nating(NAT) on the host machine.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That it.&lt;br /&gt;Hope it helps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-4501006860656225944?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/4501006860656225944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2008/11/network-bridging.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/4501006860656225944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/4501006860656225944'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2008/11/network-bridging.html' title='Network Bridging'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-8867715346404407949</id><published>2008-11-04T03:27:00.000-08:00</published><updated>2010-07-28T12:40:20.214-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='Xen'/><category scheme='http://www.blogger.com/atom/ns#' term='Qemu'/><title type='text'>Vitualization</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="font-size:180%;"&gt;Virtualization&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;To start with Virtualization I can say it is the one of the most helpful technology known to man. The basics which make it a great technology is the feature that user can have more than one machine at the cost of one single machine.&lt;br /&gt;Or for a software guy he can get a number of machines to test his development.&lt;br /&gt;&lt;br /&gt;In Virtualization we have 2 different types.&lt;br /&gt;They are -&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;* Full Virtualization.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;* Para Virtualization&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Full Virtualization&lt;/span&gt;, in computer science, is a Virtualization technique used to implement a certain kind of virtual machine environment: one that provides a complete simulation of the underlying hardware. The result is a system in which all software capable of execution on the raw hardware can be run in the virtual machine. In particular, this includes all operating systems. (This is different from other forms of Virtualization – which allow only certain or modified software to run within a virtual machine.)&lt;br /&gt;Some examples of such are VMware/QEMU/KVM.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Para Virtualization&lt;/span&gt;, In computing, paravirtualization is a Virtualization technique that presents a software interface to virtual machines that is similar but not identical to that of the underlying hardware.&lt;br /&gt;&lt;br /&gt;Paravirtualization may allow the virtual machine monitor (VMM) to be simpler or virtual machines that run on it to achieve performance closer to non-virtualized hardware. However, operating systems must be explicitly ported to run on top of a paravirtualized VMM.&lt;br /&gt;&lt;br /&gt;And according to me I personally prefer this due to its feature of not using too much of RAM and other resources, as it uses host's resources and that too when required.&lt;br /&gt;Some examples of such are XEN/OpenVZ.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How to?&lt;br /&gt;In terms of how to do virtualization it can be done through GUI or Command line. I prefer Command line for doing the job.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Full Virtualization&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I will start explaining this hoping that you have QEMU installed.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;QEMU&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;qemu-img create -f raw image.img 5G&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will create a blank image named image.img you can define the size of the image by changing the 5G option to any size.&lt;br /&gt;Now it's time to boot it with a cdrom to give it an Operating System. To do this you need either a CDROM on host machine o an ISO image.&lt;br /&gt;If you have an ISO image then enter this command -&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;qemu -cdrom linux/windows.iso -hda image.img -m 600 -boot d&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Where linux/windows.iso is your ISO image, image.img is the disk image you just created,-m 600 is the RAM you want to allocate to the Virtual Machine and -boot d is to tell the Virtual Machine to boot from the CDROM.&lt;br /&gt;&lt;br /&gt;After the installation is over then run the Virtual Machine with the following command -&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;qemu -hda image.img -m 600 -net tap -net nic&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Where -net tap tell it to connect to a virtual interface(tap device -- tap0/tap1 etc) on the host and -net nic defines 1 network card present on the Virtual Machine.&lt;br /&gt;And if you don't know how to configure tap device you can refer my next post which will be TAP/TUN.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Para Virtualization.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 102, 204);"&gt;XEN&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Under this I will go on with XEN, to have virtualization with xen you need to have the kernel which supports XEN virtualization.&lt;br /&gt;I now suppose that you have upgraded your kernel to support XEN.&lt;br /&gt;&lt;br /&gt;To start with XEN you must be familiar with two terms which we will be using a number of times.&lt;br /&gt;* dom0 -&gt; this refers to the host on which the Virtual Machine or the domU is situated.&lt;br /&gt;* domU -&gt; this refers to the guest machine which we are going to create now.&lt;br /&gt;&lt;br /&gt;Now if you have upgraded your kernel of the host machine to support XEN, this means yours dom0 is ready.&lt;br /&gt;And it's time to create domU but before that just reboot your machine to boot into the upgraded kernel.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt; &lt;span style="font-size:130%;"&gt;Creating - domU&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;File Based Setup of Virtual Disk&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* mkdir -p /home/haps/&lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;* dd if=/dev/zero of=/home/haps/diskimage.img bs=1024k count=5000&lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;* dd if=/dev/zero of=/home/haps/swapimage.img bs=1024k count=512 &lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;&lt;br /&gt;* mkfs.ext3 /home/haps/diskimage.img&lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;* mkswap /home/haps/swapimage.img&lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;&lt;br /&gt;* mount -o loop /home/haps/diskimage.img /mnt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Debootstrap New OS onto Virtual Disk&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* debootstrap --arch i386 lenny /mnt http://ftp.de.debian.org/debian/&lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;&lt;br /&gt;* mv /mnt/lib/tls /mnt/lib/tls.disabled&lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;&lt;br /&gt;* cp /etc/apt/sources.list /mnt/etc/apt/&lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;* vi /mnt/etc/apt/sources.list&lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;&lt;br /&gt;* cp -a /lib/modules/2.6.16-1-xen-k7/ /mnt/lib/modules/&lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;&lt;br /&gt;* cp /etc/resolve.conf /mnt/etc/&lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;&lt;br /&gt;* cp /etc/network/interfaces /mnt/etc/network/&lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;* vi /mnt/etc/network/interfaces &lt;span style="color: rgb(0, 0, 0);"&gt;(and make it look like this)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    #To use Specific IP address - edit the /mnt/etc/network/interfaces manually.&lt;br /&gt;    #To use DHCP, edit and include the following:&lt;br /&gt;        # The loopback network interface&lt;br /&gt;        auto lo&lt;br /&gt;        iface lo inet loopback&lt;br /&gt;        # The primary network interface&lt;br /&gt;        auto eth0&lt;br /&gt;        iface eth0 inet dhcp&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;&lt;br /&gt;* vi /mnt/etc/hostname &lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;br /&gt;&lt;br /&gt;* vi /mnt/etc/fstab &lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(and make it look like this)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    proc            /proc       proc    defaults    0 0&lt;br /&gt;    /dev/sda1       /           ext3    defaults    0 0&lt;br /&gt;    /dev/sda2       none        swap    sw          0 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Setup domU Xen Config&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* vi /etc/xen/haps &lt;/span&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(and make it look like this)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    kernel = "/boot/vmlinuz-2.6.16-1-xen-k7"&lt;br /&gt;    ramdisk = "/boot/initrd.img-2.6.16-1-xen-k7"&lt;br /&gt;    memory = 192&lt;br /&gt;    name = "haps"&lt;br /&gt;    vif = ['bridge=xenbr0']&lt;br /&gt;    ip = "ip 192.168.1.5"&lt;br /&gt;    gateway = "ip add"&lt;br /&gt;    netmask = "255.255.0.0"&lt;br /&gt;    root = "/dev/sda1 rw"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* ln -s /etc/xen/haps /etc/xen/auto/haps&lt;/span&gt;&lt;br /&gt;//link in the config file so that the Virtal Machine starts on Bootup of Dom0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt; Run and Update DomU&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* xm create haps -c&lt;/span&gt;&lt;br /&gt;// CTRL + ]  Gets out of the Console&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;All going well you should see domU booting up. Login as "root" with no password. Execute the following commands to update:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* passwd&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* apt-get update&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* apt-get upgrade &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* apt-get install module-init-tools   //for iptables&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* apt-get install iptables&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;* iptables -L&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For other commands on xen do &lt;man&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thats it.&lt;br /&gt;Hope this helps a lot of people.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-8867715346404407949?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/8867715346404407949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2008/11/vitualization.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/8867715346404407949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/8867715346404407949'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2008/11/vitualization.html' title='Vitualization'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-2851777212501223992</id><published>2008-10-15T10:42:00.000-07:00</published><updated>2009-06-29T23:27:19.282-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Backtrack'/><title type='text'>BackTrack3 How To</title><content type='html'>1.     Boot the Live CD&lt;br /&gt;&lt;br /&gt;2.     Open Terminal&lt;br /&gt;&lt;br /&gt;3.     Partition the disks&lt;br /&gt;           a.     fdisk /dev/hda  # The name of the hard disk depends on your configuration&lt;br /&gt;           b.       Press &lt;span style="font-style: italic; font-weight: bold;"&gt;n &lt;/span&gt;for new partition &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;p &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;for Primary partition&lt;br /&gt;               Partition number (1-4): 1 (for first partition)&lt;br /&gt;            c.  Starting cylinder  number and  Size specification  (+4000M for 4Gb)&lt;br /&gt;            d. Create one more partition for SWAP area with Partition ID as &lt;span style="font-weight: bold; font-style: italic;"&gt;82&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;4. mkfs.ext3 /dev/sda1&lt;br /&gt;&lt;br /&gt;5.     mkswap /dev/sda2&lt;br /&gt;&lt;br /&gt;6.    swapon /dev/sda2&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;7.     mkdir /mnt/backtrack&lt;br /&gt;&lt;br /&gt;8.     mount /dev/sda1 /mnt/backtrack/&lt;br /&gt;&lt;br /&gt;9.     mkdir /mnt/backtrack/boot&lt;br /&gt;&lt;br /&gt;10.     cp --preserve -R /{bin,dev,home,pentest,root,usr,etc,lib,opt,sbin,var} /mnt/backtrack/&lt;br /&gt;&lt;br /&gt;11.    mkdir /mnt/backtrack/{mnt,proc,sys,tmp}&lt;br /&gt;12.    mount --bind /dev/ /mnt/backtrack/dev/&lt;br /&gt;13.    mount -t proc proc /mnt/backtrack/proc/&lt;br /&gt;14.    cp /boot/vmlinuz /mnt/backtrack/boot/&lt;br /&gt;15.     Edit /mnt/backtrack/etc/lilo.conf file. The&lt;br /&gt;                 lba32&lt;br /&gt;               boot = /dev/hda&lt;br /&gt;               prompt&lt;br /&gt;               timeout = 60&lt;br /&gt;               change-rules&lt;br /&gt;               reset&lt;br /&gt;               vga = 773&lt;br /&gt;               image = /boot/vmlinuz&lt;br /&gt;               root = /dev/hda1&lt;br /&gt;               label = Backtrack_Final&lt;br /&gt;               read-only&lt;br /&gt;&lt;br /&gt;16.    chroot /mnt/backtrack/ /bin/bash&lt;br /&gt;&lt;br /&gt;17.    lilo -v&lt;br /&gt;And if you have another OS running with grub then you have to install either grub to BackTrack or add lilo to that OS.&lt;br /&gt;&lt;br /&gt;18.    exit&lt;br /&gt;&lt;br /&gt;19.    reboot&lt;br /&gt;&lt;br /&gt;10.  Remove the CD&lt;br /&gt;&lt;br /&gt;20. Enjoy H@CK!NG&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-2851777212501223992?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/2851777212501223992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2008/10/backtrack3-how-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/2851777212501223992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/2851777212501223992'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2008/10/backtrack3-how-to.html' title='BackTrack3 How To'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-4988850332387900347</id><published>2008-09-17T02:25:00.002-07:00</published><updated>2009-06-29T23:28:06.653-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Terminal Server Project'/><category scheme='http://www.blogger.com/atom/ns#' term='Thin client'/><category scheme='http://www.blogger.com/atom/ns#' term='LTSP'/><title type='text'>LTSP(Linux Terminal Server Project)</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;LTSP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;To define LTSP I can only say, it's an efficient and most usable technology which one could have seen till now.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;As the name denotes it is a Linux terminal or to be more precise i can say that it is a client terminal and a light weight too, it means that it neither uses much of your workstations memory nor the LAN's bandwidth.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-size:130%;" &gt;Working&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; When a client boots from a local boot device (like a hard disk, CD-ROM or USB disk), it loads a small Linux kernel from that device which initializes the system and all of the peripherals that it recognizes. When configured for network booting the client first requests its own IP address and the IP address for the LTSP server via DHCP and loads the Linux kernel from a preconfigured Linux image on the LTSP server via the Trivial File Transfer Protocol (TFTP) service running on the LTSP server.&lt;br /&gt;&lt;br /&gt;During this process the client makes a (new) DHCP request for the IP address of the LTSP server and the path to its chroot environment. When this information is retrieved, the client mounts the path on its root file system via the Network File System (NFS) service running on the LTSP server.&lt;br /&gt;&lt;br /&gt;The client loads Linux from the NFS mounted root file system and finally starts the X windowing system. The client connects to the XDMCP login manager on the LTSP server. From this point forward, all programs are started on the LTSP server, but displayed and operated from the client.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-weight: bold;"&gt;&lt;span style="color: rgb(255, 0, 0);font-size:130%;" &gt;Prerequisites&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;    &lt;span style="color: rgb(51, 255, 51);"&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;Server&lt;/span&gt;:&lt;/span&gt;    A system with enough RAM and hard disk to support as many systems as you want to run.&lt;br /&gt;  &lt;span style="color: rgb(51, 255, 51);"&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;Workstations&lt;/span&gt;:&lt;/span&gt; A system with no hard disk, only RAM and other basic parts are required.&lt;br /&gt;  &lt;span style="color: rgb(51, 255, 51);"&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;Connection&lt;/span&gt;:&lt;/span&gt; Cable and switch&lt;br /&gt;&lt;br /&gt;The basic requirements to run LTSP on your system you need :-&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;DHCP     - This is required to allocate IP's to the client machines.&lt;/li&gt;&lt;li&gt;TFTP     - This is required to copy kernel image from host to the client, which helps the client to boot up.&lt;/li&gt;&lt;li&gt;NFS      - This is required to mount a file system on the client which has no memory of its own.&lt;/li&gt;&lt;li&gt;GDM     -  This is required to give Thin Clients Display Manager.&lt;/li&gt;&lt;/ul&gt;  &lt;br /&gt;&lt;br /&gt;Isn't this sounds great running workstations with no hard-disk, no OS.&lt;br /&gt;I think it is an ideal setup for schools, colleges and other places where you don't have much to store and with this you can cut down the cost also.&lt;br /&gt;And if some one is worried about the crashing of the server then he/she can go for RAID disks, which can save you from loosing your data at least.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-size:130%;" &gt;Installation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;    As far as installation is considered I am using Debian machine,&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If you have a DHCP server already up and running on your network: &lt;apt-get&gt;&lt;/apt-get&gt;&lt;blockquote style="font-style: italic; font-weight: bold;"&gt;apt-get install ltsp-server openssh-server&lt;/blockquote&gt;       Otherwise, if you want your LTSP server to function as the DHCP server: &lt;blockquote style="font-style: italic; font-weight: bold;"&gt;apt-get install ltsp-server-standalone openssh-server&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Build the LTSP client environment: &lt;blockquote style="font-style: italic; font-weight: bold;"&gt;ltsp-build-client&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;If you change the IP data after you have done the initial setup and run ltsp-update-sshkeys on the server.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Configure /etc/dhcp3/dhcpd.conf: &lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt; See examples in /usr/share/doc/ltsp-server/examples/dhcpd.conf or /etc/ltsp/dhcpd.conf and adapt to your network.&lt;/span&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Add next server to dhcpd.conf and Restart dhcpd: &lt;blockquote style="font-weight: bold;"&gt;/etc/init.d/dhcpd3-server restart.&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;And if you are running your DNS server on the same machine then you may have to configure /etc/dnsmasq.conf: &lt;blockquote style="font-weight: bold;"&gt;See example in&lt;br /&gt;/usr/share/doc/ltsp-server/examples/dhcpd-dnsmasq&lt;br /&gt;and adapt to your network.&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;If you configured your DNS then Restart dnsmasq: &lt;blockquote style="font-weight: bold;"&gt;/etc/init.d/dnsmasq restart&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;Configure /etc/exports: &lt;blockquote style="font-weight: bold;"&gt;/opt/ltsp/i386 *(ro,no_root_squash,async,no_subtree_check)&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;This tells the NFS server to export this particular directory.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Restart nfs: &lt;blockquote style="font-weight: bold;"&gt;/etc/init.d/nfs-kernel-server restart&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;And if required you can export the file system through exportfs (man exportfs for further details).&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;apt-get&gt;Start tftpd: &lt;/apt-get&gt;&lt;blockquote style="font-weight: bold;"&gt;/etc/init.d/tftpd-hpa start&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;But a change has to be made in edit /etc/default/tftpd-hpa:&lt;run_daemon="yes"&gt;&lt;/run_daemon="yes"&gt;&lt;blockquote style="font-weight: bold;"&gt;RUN_DAEMON="yes"&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;run_daemon="yes"&gt;Restart tftpd: &lt;/run_daemon="yes"&gt;&lt;blockquote style="font-weight: bold;"&gt;/etc/init.d/tftpd-hpa restart&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;You can also check if the tftp server is running: &lt;blockquote style="font-weight: bold;"&gt;type tftp and press enter you will get tftp prompt(tftp&gt;)&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;apt-get&gt;&lt;apt-get&gt;&lt;ltsp-build-client&gt;        &lt;see example="" in="" usr="" share="" doc="" server="" examples="" dnsmasq="" and="" adapt="" to="" your=""&gt;&lt;/see&gt;&lt;br /&gt;  &lt;/ltsp-build-client&gt;&lt;/apt-get&gt;&lt;/apt-get&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-weight: bold; font-style: italic;font-size:100%;" &gt;&lt;type&gt;And most important thing i.e. to start a GDM session &lt;/type&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;font-size:130%;" &gt;Troubleshooting&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;  &lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;DHCP:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;No DHCP or poxyDHCP offers were received.&lt;/li&gt;&lt;/ul&gt;This error can be due to many reasons, few of which I was able to cover were:&lt;br /&gt;                                * Network not connected.&lt;br /&gt;                                * DHCP server is down.&lt;br /&gt;                                * Faulty dhcpd.conf file.&lt;br /&gt;          To solve this kind of problem start step-by-step ensuring that it won't happen again:&lt;br /&gt;                 * Check the network cable (if it is connected properly or not).&lt;br /&gt;                                * Check if the DHCP server is running: &lt;ps&gt;&lt;br /&gt;                                * Check if the dhcpd.conf file is configured properly&lt;br /&gt;                    i.e. every thing from subnet to ip range is set&lt;br /&gt;                    properly(refer the sample file).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ps&gt;        &lt;ps&gt;&lt;br /&gt;&lt;/ps&gt;&lt;div style="text-align: center;"&gt;&lt;ps&gt;    &lt;span style="font-weight: bold;"&gt;TFTP:&lt;/span&gt;&lt;/ps&gt;&lt;br /&gt;&lt;ps&gt;&lt;/ps&gt;&lt;/div&gt;&lt;ps&gt;      &lt;br /&gt;&lt;/ps&gt;&lt;ul&gt;&lt;li&gt;&lt;ps&gt;Connection timed out.&lt;/ps&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ps&gt;This error can occur due to firewalls/iptables blocking TFTP server's path to connect to the system.&lt;br /&gt;          And can be resolved by removing the corresponding reject rules from the firewalls/iptables.&lt;br /&gt;&lt;br /&gt;&lt;/ps&gt;&lt;ul&gt;&lt;li&gt;&lt;ps&gt;ARP timed out&lt;/ps&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ps&gt;            It's a problem which can make one think even thought the solution to his is very simple.&lt;br /&gt;          This occurs due to Network is not able to resolve the servers MAC address,&lt;br /&gt;          and can be solved by connecting a switch(layer 2 device) in the network.&lt;br /&gt;          Switch maintains a ARP table which helps the systems to Know the MAC address of the system which it wants to&lt;br /&gt;          connect.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ps&gt;&lt;div style="text-align: center;"&gt;&lt;ps&gt;    &lt;span style="font-weight: bold;"&gt;NFS:&lt;/span&gt;&lt;/ps&gt;&lt;br /&gt;&lt;ps&gt;&lt;/ps&gt;&lt;/div&gt;&lt;ps&gt;      &lt;br /&gt;&lt;/ps&gt;&lt;ul&gt;&lt;li&gt;&lt;ps&gt;Mounting file system timed out.&lt;/ps&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ps&gt;            I found only one error of such kind and that also didn't bothered me for a long time.&lt;br /&gt;          This was due to wrong path in the /etc/exports file i.e. the path of the exported Dir is wrong&lt;/ps&gt;.&lt;br /&gt;          And as you may guess the solution is as simple as it seems go to the /etc/exports and change the path.&lt;br /&gt;       &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-weight: bold;"&gt;&lt;span style="color: rgb(255, 0, 0);font-size:130%;" &gt;Initialization&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;    Restart DHCP, TFTP and NFS server and check if they are running properly.&lt;/li&gt;&lt;li&gt;Change the bios setting on the client machine to boot from the network.&lt;/li&gt;&lt;li&gt;Create users to access the client as you can not login as root.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-4988850332387900347?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/4988850332387900347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2008/09/ltsplinux-terminal-server-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/4988850332387900347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/4988850332387900347'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2008/09/ltsplinux-terminal-server-project.html' title='LTSP(Linux Terminal Server Project)'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-1537079637157750311</id><published>2008-09-17T02:25:00.001-07:00</published><updated>2009-06-29T23:28:51.568-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Directory Server'/><title type='text'>Fedora-DS</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;To start with one can follow some simple steps&lt;/span&gt;----------------&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1&gt;    get installation file of fedora-ds.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2&gt;    install fedora-ds.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3&gt;    configure fedora-ds.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4&gt;    buid schema file as required.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5&gt;    configure replication(as required).&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6&gt;    add required tree structure to the fedora-ds database(i.e. nodes like addressbooks and groups).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;All these points are in details in next lines&lt;/span&gt;-----------------&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1&gt;&lt;/span&gt; Get fedora-ds either by direct downloading or wget &lt;span style="color: rgb(255, 0, 0);"&gt;http://directory.fedoraproject.org/download/fedora-ds-1.0.4-1.FC5.i386.opt.rpm&lt;/span&gt;&lt;br /&gt;It is recomended to download the compatible version from &lt;span style="color: rgb(255, 0, 0);"&gt;http://directory.fedoraproject.org/wiki/Download&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2&gt;&lt;/span&gt; Installing fedora-ds is like any other RPM package.&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;rpm -ivh fedora-ds-1.0.4-1.FC5.i386.opt.rpm&lt;/span&gt;&lt;br /&gt;If you are planning to run console on the same machine on which the server is then you also have to install the java.&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;rpm -ivh jre-6u6-linux-i586.rpm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3&gt;&lt;/span&gt; To configure fedora-ds run---&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;/opt/fedora-ds/setup/setup&lt;/span&gt;&lt;br /&gt;before running this make a user for fedora-ds(this is to avoid giving root user as fedora-ds user).&lt;br /&gt;On running this we have to give certain required specifications like domainname, fedora-ds user, admin login, manager login, suffix etc&lt;br /&gt;if the setup succeds only then start-admin will apear in dir(/opt/fedora-ds/)&lt;br /&gt;And if fails the possible reason may be wrong specification sgiven at the time of setup.&lt;br /&gt;At the end of the configuration it will give you command to run console.&lt;br /&gt;to run it first---&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;cd /opt/fedora-ds&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;./start-admin&lt;/span&gt;&lt;br /&gt;that command------&gt;(&lt;span style="color: rgb(51, 102, 255);"&gt;./startconsole -u root -a http://yourdomain.com:(port no.)/&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4&gt;&lt;/span&gt; To buid schema file one should have sufficient knoledge of fedora-ds or the simple way is to do this via console.&lt;br /&gt;Go to the console click directory server ----&gt; config ----&gt; schemas ----&gt; first buid atributes then object classes.&lt;br /&gt;the additions you make can be seen in the form of ldif file &lt;span style="color: rgb(51, 102, 255);"&gt;/opt/fedora-ds/slapd-(yourdomain)/config/schema/99user.ldif&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5&gt;&lt;/span&gt; As per replication is considered this can be done only via console.&lt;br /&gt;To do this go to the directory server config ----&gt; replication ----&gt; first activate replication here ----&gt; now select the suffix you wan tto replicate ---&gt;&lt;br /&gt;now configure its replication requirements like binddn(i.e. the dn which have sufficient previlleges to access the database) , replication type(master-consumer/multi-master) etc&lt;br /&gt;After that build the replication agreements of that suffix by doing right click on the suffix under replication.&lt;br /&gt;On agreement has to buid for each machine with which you want it to replicate it's data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6&gt;&lt;/span&gt; This step is as per requirement of your organization andit can b edone by both commandline using ldap-utils(ldapadd, ldapmodify etc) or through console.&lt;br /&gt;&lt;br /&gt;#####################################################&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this installation some OS specific dependencies may occur that can be solved by installing some helping-utils which you can reffer from link given billow&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;http://directory.fedoraproject.org/wiki/Download&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#####################################################&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-1537079637157750311?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/1537079637157750311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2008/09/fedora-ds.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/1537079637157750311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/1537079637157750311'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2008/09/fedora-ds.html' title='Fedora-DS'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-3235536260674535643</id><published>2008-09-17T02:23:00.000-07:00</published><updated>2009-06-29T23:29:24.356-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LDAP'/><category scheme='http://www.blogger.com/atom/ns#' term='Directory Server'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenLDAP'/><title type='text'>Openldap</title><content type='html'>&lt;div class="wikipage searchable" space="preserve"&gt;                    &lt;p&gt; sudo apt-get install slapd ldap-utils phpldapadmin libnss-ldap libpam-ldap&lt;br /&gt;&lt;br /&gt;dpkg-reconfigure slapd&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;vim /etc/ldap/slapd.conf&lt;br /&gt;include -------------------&gt; all required scema files(build them if u can)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And now for client configuration. &lt;/p&gt; &lt;pre class="wiki"&gt;vim /etc/ldap/ldap.conf&lt;br /&gt;&lt;/pre&gt;&lt;pre class="wiki"&gt;HOST 127.0.0.1&lt;br /&gt;BASE o=example.net&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;&lt;br /&gt;To do rest in GUI mode. &lt;/p&gt; &lt;pre class="wiki"&gt;http://localhost/phpldapadmin/&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Create the database(account book), you can do it in GUI also. &lt;/p&gt; &lt;pre class="wiki"&gt;vim ****.ldif&lt;br /&gt;&lt;/pre&gt;&lt;p&gt; to create authenticated user under admin group&lt;br /&gt;&lt;/p&gt; &lt;pre class="wiki"&gt;dn: uid=***,cn=admin,dc=example,dc=net&lt;br /&gt;uid: ****&lt;br /&gt;objectClass: account&lt;br /&gt;objectClass: simpleSecurityObject&lt;br /&gt;objectClass: top&lt;br /&gt;userPassword: ******&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;to create authenticated user under other groups &lt;/p&gt; &lt;pre class="wiki"&gt;dn: uid=***,ou=****,dc=example,dc=net&lt;br /&gt;uid: ****&lt;br /&gt;objectClass: account&lt;br /&gt;objectClass: simpleSecurityObject&lt;br /&gt;objectClass: top&lt;br /&gt;userPassword: ******&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;to create objectclass like organizationalUnit&lt;br /&gt;&lt;/p&gt;&lt;p&gt;{{&lt;br /&gt;&lt;/p&gt;&lt;p&gt;dn: ou=admin,dc=example,dc=net objectclass: organizationalunit ou: admin&lt;br /&gt;&lt;/p&gt;&lt;p&gt;}}}&lt;br /&gt;to create normal addressbook entries under any group &lt;/p&gt; &lt;pre class="wiki"&gt;dn: cn=***,ou=***,dc=example,dc=net&lt;br /&gt;objectClass: organizationalRole&lt;br /&gt;cn: ***&lt;br /&gt;roleOccupant: cn=***,dc=example,dc=net&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt; Now to add entries either add them from GUI or by comand line &lt;/p&gt; &lt;pre class="wiki"&gt;ldapadd -x -f *.ldif -vD "cn=***,dc=example,dc=net" -w ***&lt;br /&gt;&lt;/pre&gt;&lt;p&gt; And to test the directory try searching &lt;/p&gt; &lt;pre class="wiki"&gt;ldapsearch -x -b 'dc=example,dc=net' '(objectclass=*)'&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt; To give permmisions to authenticated users &lt;/p&gt; &lt;pre class="wiki"&gt;vim /etc/ldap/slapd.conf\&lt;br /&gt;&lt;/pre&gt;&lt;pre class="wiki"&gt;access to *&lt;br /&gt;     by dn="cn=admin,dc=example,dc=net" write&lt;br /&gt;     by dn="uid=***,cn=admin,dc=example,dc=net" write&lt;br /&gt;     by * read&lt;br /&gt;&lt;br /&gt;* line no. 2 of permissions was to give the user full permissions.&lt;br /&gt;      read --------&gt; to see&lt;br /&gt;&lt;br /&gt;      write--------&gt; to edit add delete&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;h1 id="pam-nss-ldap"&gt;pam-nss-ldap&lt;/h1&gt;&lt;br /&gt;PAM is an intermediator which provides the application the required information about the user.&lt;br /&gt;and helps him clearing authentication without changing it in applications configuration files.&lt;br /&gt;What it does is , it checks for the authentication(user name and password) into the system files then into the programs data.&lt;br /&gt;And lets the user login if it gets the required information from any of the source.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;server---------------------&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt; client--------------------&gt;&lt;br /&gt;&lt;br /&gt;install&lt;br /&gt;&lt;/p&gt; &lt;pre class="wiki"&gt;sudo apt-get install ldap-auth-client&lt;br /&gt;sudo apt-get install ldap-utils libpam-ldap libnss-ldap nscd&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt; edit /etc/ldap/ldap.conf&lt;br /&gt;to look like this--&gt; &lt;/p&gt; &lt;pre class="wiki"&gt;host 10.10.5.3&lt;br /&gt;base dc=example,dc=net&lt;br /&gt;pam_filter objectclass=prosixaccount&lt;br /&gt;pam_login_attribute uid&lt;br /&gt;pam_member_attribute memberuid&lt;br /&gt;pam_password crypt&lt;br /&gt;ssl on&lt;br /&gt;sslpath /etc/ssl/certs&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;Now edit pam.conf&lt;br /&gt;to look like this--&gt; &lt;/p&gt; &lt;pre class="wiki"&gt;login   auth sufficient /usr/lib/security/pam_ldap.so.1&lt;br /&gt;login   auth required   /usr/lib/security/pam_unix.so.1 try_first_pass&lt;br /&gt;login   auth required   /usr/lib/security/pam_dial_auth.so.1&lt;br /&gt;&lt;br /&gt;telnet  auth sufficient /usr/lib/security/pam_ldap.so.1&lt;br /&gt;telnet  auth required   /usr/lib/security/pam_unix.so.1 try_first_pass&lt;br /&gt;&lt;br /&gt;rlogin  auth sufficient /usr/lib/security/pam_rhosts_auth.so.1&lt;br /&gt;rlogin  auth sufficient /usr/lib/security/pam_ldap.so.1&lt;br /&gt;rlogin  auth required   /usr/lib/security/pam_unix.so.1 try_first_pass&lt;br /&gt;&lt;br /&gt;dtlogin auth sufficient /usr/lib/security/pam_ldap.so.1&lt;br /&gt;dtlogin auth required   /usr/lib/security/pam_unix.so.1 try_first_pass&lt;br /&gt;&lt;br /&gt;rsh     auth required   /usr/lib/security/pam_rhosts_auth.so.1&lt;br /&gt;&lt;br /&gt;other   auth sufficient /usr/lib/security/pam_ldap.so.1&lt;br /&gt;other   auth required   /usr/lib/security/pam_unix.so.1 try_first_pass&lt;br /&gt;&lt;br /&gt;login   account required /usr/lib/security/pam_ldap.so.1&lt;br /&gt;login   account required /usr/lib/security/pam_unix.so.1&lt;br /&gt;&lt;br /&gt;dtlogin account required /usr/lib/security/pam_ldap.so.1&lt;br /&gt;dtlogin account required /usr/lib/security/pam_unix.so.1&lt;br /&gt;&lt;br /&gt;other   account required /usr/lib/security/pam_ldap.so.1&lt;br /&gt;other   account required /usr/lib/security/pam_unix.so.1&lt;br /&gt;&lt;br /&gt;other   session required /usr/lib/security/pam_unix.so.1&lt;br /&gt;&lt;br /&gt;other   password required /usr/lib/security/pam_ldap.so&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;Now edit /etc/nsswitch.cong&lt;br /&gt;to look like this--&gt; &lt;/p&gt; &lt;pre class="wiki"&gt;passwd:         files   ldap&lt;br /&gt;group:          files   ldap&lt;br /&gt;shadow:         files   ldap&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;Now edit /etc/nscd.conf&lt;br /&gt;to look like this--&gt; &lt;/p&gt; &lt;pre class="wiki"&gt; enable-cache            passwd          yes&lt;br /&gt;      positive-time-to-live   passwd          600&lt;br /&gt;      negative-time-to-live   passwd          20&lt;br /&gt;      suggested-size          passwd          211&lt;br /&gt;      check-files             passwd          yes&lt;br /&gt;      persistent              passwd          yes&lt;br /&gt;      shared                  passwd          yes&lt;br /&gt;      max-db-size             passwd          33554432&lt;br /&gt;      auto-propagate          passwd          yes&lt;br /&gt;&lt;br /&gt;      enable-cache            group           yes&lt;br /&gt;      positive-time-to-live   group           3600&lt;br /&gt;      negative-time-to-live   group           60&lt;br /&gt;      suggested-size          group           211&lt;br /&gt;      check-files             group           yes&lt;br /&gt;      persistent              group           yes&lt;br /&gt;      shared                  group           yes&lt;br /&gt;      max-db-size             group           33554432&lt;br /&gt;      auto-propagate          group           yes&lt;br /&gt;&lt;br /&gt;enable-cache            hosts           no&lt;br /&gt;      positive-time-to-live   hosts           3600&lt;br /&gt;      negative-time-to-live   hosts           20&lt;br /&gt;      suggested-size          hosts           211&lt;br /&gt;      check-files             hosts           yes&lt;br /&gt;      persistent              hosts           yes&lt;br /&gt;      shared                  hosts           yes&lt;br /&gt;      max-db-size             hosts           33554432&lt;br /&gt;&lt;br /&gt;      enable-cache            services        yes&lt;br /&gt;      positive-time-to-live   services        28800&lt;br /&gt;      negative-time-to-live   services        20&lt;br /&gt;      suggested-size          services        211&lt;br /&gt;      check-files             services        yes&lt;br /&gt;      persistent              services        yes&lt;br /&gt;      shared                  services        yes&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;Restart the server &lt;/p&gt; &lt;pre class="wiki"&gt;service slapd restart&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;restart nscd &lt;/p&gt; &lt;pre class="wiki"&gt;servive nscd restart&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt; the configuration is done just check if u can modify the data from the same client and other clients. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="wiki"&gt;&lt;br /&gt;&lt;/pre&gt;                         &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-3235536260674535643?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/3235536260674535643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2008/09/openldap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/3235536260674535643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/3235536260674535643'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2008/09/openldap.html' title='Openldap'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-209239832072312413</id><published>2008-09-05T04:31:00.001-07:00</published><updated>2009-06-29T23:59:21.382-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Snort'/><category scheme='http://www.blogger.com/atom/ns#' term='Snort and Base'/><category scheme='http://www.blogger.com/atom/ns#' term='Base'/><category scheme='http://www.blogger.com/atom/ns#' term='Barnyard'/><category scheme='http://www.blogger.com/atom/ns#' term='Mysql'/><title type='text'>Snort+Barnyard+MySQL+Base+RRD-Snort</title><content type='html'>&lt;h2 id="Index:-"&gt;Index:-&lt;a title="Link to this section" href="http://trac.xnapworks.com/dev/wiki/MySpaceHapsSnort#Index:-" class="anchor"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;br /&gt;1&gt; Snort &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt; a&gt; install and configure snort.&lt;br /&gt;b&gt; configure snort to give binary output. &lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt; 2&gt; Barnyard &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt; a&gt; install and configure barnyard.&lt;br /&gt;b&gt; run two instences of barnyard to get output in local as well as remort machine. &lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt; 3&gt; Mysql &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt; a&gt; install and configure mysql.&lt;br /&gt;b&gt; install mysql on both local as well as remote machine.&lt;br /&gt;c&gt; configure remote mysql to get data from more than 1 machine. &lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt; 4&gt; Base &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt; a&gt; install and configure base on the remort machine.&lt;br /&gt;b&gt; configure it to generate report of data got from several machines.&lt;br /&gt;&lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt; 5&gt; RRD-Snort &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt; a&gt; install and configure rrd-snort.&lt;br /&gt;b&gt; configure rrd to generate graph of mysql-snort data. &lt;/p&gt; &lt;/blockquote&gt; &lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;h1 id="Snort"&gt;Snort&lt;a title="Link to this section" href="http://trac.xnapworks.com/dev/wiki/MySpaceHapsSnort#Snort" class="anchor"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/h1&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt; &lt;strong&gt; To start witth install snort depending on the machine you are running.&lt;/strong&gt;&lt;br /&gt;1&gt; tar -xvzf snort*.tar.gz&lt;br /&gt;2&gt; rpm -ivh snort*.rpm&lt;br /&gt;3&gt;                      *.deb&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;pre class="wiki"&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;mkdir /var/log/snort&lt;/span&gt;&lt;span style="font-size:130%;"&gt;  ----------&gt; for snort to log snort.log files.&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt; &lt;strong&gt; Configure snort.conf. &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; Edit these lines of your snort.conf file. &lt;/strong&gt; &lt;/p&gt; &lt;pre style="color: rgb(255, 0, 0);" class="wiki"&gt;&lt;span style="font-size:130%;"&gt;var HOME_NET (your ip)&lt;br /&gt;&lt;br /&gt;var RULE_PATH (TO THE DIR. WHERE YOU HAVE YOUR RULES FILES)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# unified: Snort unified binary format alerting and logging&lt;br /&gt;&lt;br /&gt;output alert_unified: filename snort.alert, limit 128&lt;br /&gt;output log_unified: filename snort.log, limit 128&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt; &lt;strong&gt; Starting snort. &lt;/strong&gt; &lt;/p&gt; &lt;pre class="wiki"&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;snort -c /etc/snort/snort.conf -i eth0 -l /var/log/snort&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt; -c -----&gt; for snort to look into this configuration file.&lt;br /&gt;-i -----&gt; for snort to look into the packages comming from this intrphase.&lt;br /&gt;-l ----&gt; for snort to log the alert file into this dir.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;h1 id="Barnyard"&gt;Barnyard&lt;a title="Link to this section" href="http://trac.xnapworks.com/dev/wiki/MySpaceHapsSnort#Barnyard" class="anchor"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;&lt;br /&gt;&lt;strong&gt; To start with barnyard install barnyard . &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; Comile it either with mysql or get a pre compiled rpm or deb package(compiled with mysql). &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;1&gt; tar -xvzf barnyard*.tar.gz&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;pre style="color: rgb(102, 51, 255);" class="wiki"&gt;&lt;span style="font-size:130%;"&gt;cp barnyard.conf to 2 places  ---------&gt; to run 2 instences of barnyard.&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt; &lt;strong&gt; Configure barnyard.conf. &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; Edit these lines in barnyard.conf file to give data to mysql on local machine &lt;/strong&gt; &lt;/p&gt; &lt;pre style="color: rgb(255, 0, 0);" class="wiki"&gt;&lt;span style="font-size:130%;"&gt;output alert_acid_db: mysql, sensor_id 1, database snort, server localhost, user root, password root&lt;br /&gt;output log_acid_db: mysql, database snort, server localhost, user root, password root&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt; &lt;strong&gt; Edit second barnyard.conf file to give data to mysql on remote machine. &lt;/strong&gt; &lt;/p&gt; &lt;pre style="color: rgb(255, 0, 0);" class="wiki"&gt;&lt;span style="font-size:130%;"&gt;output alert_acid_db: mysql, sensor_id 1, database snort, server remorthost, user root, password root&lt;br /&gt;output log_acid_db: mysql, database snort, server remotehost, user root, password root&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt; &lt;strong&gt; Starting barnyard. &lt;/strong&gt; &lt;/p&gt; &lt;pre style="color: rgb(204, 102, 204);" class="wiki"&gt;&lt;span style="font-size:130%;"&gt;barnyard -c /etc/snort/barnyard.conf -g /etc/snort/gen-msg.map -s /etc/snort/sid-msg.map -d /var/log/snort -f snort.log -w /var/log/snort/barnyard.waldo&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt; -c -----&gt; for barnyard to look into this configuration file.&lt;br /&gt;-g -----&gt; for barnyard to look into this gen.map file.&lt;br /&gt;-s -----&gt; for barnyard to look into this sid.map file.&lt;br /&gt;-d -----&gt; for barnyard to look into dir. for the alert files logged by snort.&lt;br /&gt;-f -----&gt; for barnyard to look for files with name starting with.&lt;br /&gt;-w -----&gt; for barnyard to log the temp. dta into the file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;h1 id="Mysql"&gt;Mysql&lt;a title="Link to this section" href="http://trac.xnapworks.com/dev/wiki/MySpaceHapsSnort#Mysql" class="anchor"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;&lt;br /&gt;&lt;strong&gt; Install mysql using apropriate package. &lt;/strong&gt; &lt;/p&gt; &lt;p&gt; &lt;strong&gt; Configure mysql. (on both machines) &lt;/strong&gt; &lt;/p&gt; &lt;pre class="wiki"&gt;&lt;span style="font-size:130%;"&gt;1&gt; &lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);font-size:130%;" &gt;mysql -u root -p&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;2&gt; create database snort;&lt;br /&gt;3&gt; grant all on snort.* to ***@***** identified by 'password'&lt;br /&gt;4&gt; quit;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="wiki"&gt;&lt;span style="font-size:130%;"&gt;zcat (make_mysql file) | mysql -u root -p snort&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="wiki"&gt;&lt;span style="font-size:130%;"&gt;1&gt; &lt;/span&gt;&lt;span style="color: rgb(204, 102, 204);font-size:130%;" &gt;mysql -u root -p&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;2&gt; use snort;&lt;br /&gt;3&gt; show tables;&lt;br /&gt;4&gt; quit;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;i&gt; (FOR REMOTE MACHINE) &lt;/i&gt;&lt;br /&gt;&lt;strong&gt; you can make more than 1 database as required &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1&gt; either to get data in a single database from diff. machines.&lt;br /&gt;2&gt; or to get dat from diff. machines into diff. databases.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;h1 id="Base"&gt;Base&lt;a title="Link to this section" href="http://trac.xnapworks.com/dev/wiki/MySpaceHapsSnort#Base" class="anchor"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;&lt;br /&gt;&lt;strong&gt; To make base working first install php, adodb, apache, libapache-mod-php, php-pear. php-mysql, php-gd, libphp-adodb.(look for compatible versions for your machine) &lt;/strong&gt; &lt;/p&gt; &lt;p&gt; &lt;strong&gt; Install base using appropriate version. &lt;/strong&gt; &lt;/p&gt; &lt;p&gt;&lt;br /&gt;&lt;strong&gt; Configure base_conf.php. &lt;/strong&gt; &lt;/p&gt; &lt;pre style="color: rgb(102, 255, 153);" class="wiki"&gt;&lt;span style="font-size:130%;"&gt;cp base_conf.php.dist base_conf.php&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt; &lt;strong&gt; Edit these lines in your base_conf.php file. &lt;/strong&gt; &lt;/p&gt; &lt;pre style="color: rgb(255, 0, 0);" class="wiki"&gt;&lt;span style="font-size:130%;"&gt;$BASE_urlpath = '/base';  (path where apache server look for files  ex. -&gt;http://localhost/base)&lt;br /&gt;&lt;br /&gt;$DBlib_path = '/var/www/adodb5'; (path to adodb libraries)&lt;br /&gt;&lt;br /&gt;$alert_dbname   = 'snort';&lt;br /&gt;$alert_host     = 'localhost';&lt;br /&gt;$alert_port     = '';&lt;br /&gt;$alert_user     = 'mysql-snort-user';&lt;br /&gt;$alert_password = 'mysql-snort-password';&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;strong&gt; Running base. &lt;/strong&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt; &lt;strong&gt; go to a browser-----&gt; &lt;/strong&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt; &lt;strong&gt; and type the ip of your system. &lt;/strong&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt; &lt;strong&gt; There after you can see diff. files to choose from---&gt; &lt;i&gt;click on the base. &lt;/i&gt; &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;h1 id="RRD-Snort"&gt;RRD-Snort&lt;a title="Link to this section" href="http://trac.xnapworks.com/dev/wiki/MySpaceHapsSnort#RRD-Snort" class="anchor"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;&lt;br /&gt;&lt;strong&gt; To get rrd-snort working first install rrdtool. &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt; Then get rd-snort.pl file. &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt; always run rrd-snort in the dir where you want it to place the resulting graph. &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt; run rrd-snort. &lt;/strong&gt; &lt;/p&gt; &lt;pre class="wiki"&gt;&lt;span style="color: rgb(204, 102, 204);font-size:130%;" &gt;perl rrd-snort.pl -H hostip -u (mysql-snort-user) -p(snort-user-password)                 &lt;/span&gt;&lt;input name="action" value="edit" type="hidden"&gt;                       &lt;input value="Edit this page" type="submit"&gt;                 &lt;/pre&gt;                                                   &lt;form method="get" action="/dev/wiki/MySpaceHapsSnort"&gt;              &lt;br /&gt;&lt;/form&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-209239832072312413?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/209239832072312413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2008/09/snortbarnyardmysqlbaserrd-snort.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/209239832072312413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/209239832072312413'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2008/09/snortbarnyardmysqlbaserrd-snort.html' title='Snort+Barnyard+MySQL+Base+RRD-Snort'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-767845241484768052.post-1039419325674719912</id><published>2008-09-04T03:52:00.000-07:00</published><updated>2009-06-29T23:59:53.183-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Snort'/><title type='text'>Snort Basics</title><content type='html'>To start with you can get snort from &lt;a href="http://www.snort.org/dl/"&gt;www.snort.org.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the first part of our discussion we will configure snort on an ubuntu machine.&lt;br /&gt;And in the later blogs we will procede towards others like Redhat or Deb.&lt;br /&gt;&lt;br /&gt;The main problem which one faces in installing snort is meeting dependences.&lt;br /&gt;&lt;br /&gt;So to solve this i think we should start first.&lt;br /&gt;start with -----&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 255, 255);"&gt;tar -xvzf snort-2.8.1.tar.gz&lt;/span&gt;&lt;br /&gt;cd snort-2.8.1&lt;br /&gt;&lt;span style="color: rgb(102, 255, 255);"&gt;./configure&lt;/span&gt;                                    -------------------&gt; (for IDS)&lt;br /&gt;&lt;span style="color: rgb(102, 255, 255);"&gt;./configure --enable-inline&lt;/span&gt;                    -------------------&gt; (for IPS)&lt;br /&gt;&lt;br /&gt;You can add &lt;span style="font-weight: bold;"&gt;&lt;span style="color: rgb(102, 255, 255);"&gt;--enable-mysql&lt;/span&gt;&lt;/span&gt; to any one of them to push your snort alerts to mysql database.&lt;br /&gt;&lt;br /&gt;Generally you wont find any error while configuring IDS.&lt;br /&gt;&lt;br /&gt;So hoping your IDS does not gave you a trouble we end it here and even if it gives they wont be different from IPS, that means you can refer to them if you find one(trouble).&lt;br /&gt;&lt;br /&gt;To start snort with IDS first get rules&lt;br /&gt;(that too you can get from &lt;a href="http://www.snort.org/pub-bin/downloads.cgi"&gt;www.snort.org&lt;/a&gt;).&lt;br /&gt;Untar then at /etc/snort/ DIR.&lt;br /&gt;now&lt;br /&gt;&lt;span style="color: rgb(102, 255, 255);"&gt;cp snort-2.8.1/* /etc/snort/&lt;/span&gt;&lt;br /&gt;this makes it convenient as you(and your system) get all files at one place reducing the chances of error.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 255, 255);"&gt;mkdir /var/log/snort&lt;/span&gt; ----------&gt; for snort to log its alert files.&lt;br /&gt;&lt;br /&gt;Now make some changes to your snort.conf file lying in /etc/snort DIR.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;var HOME_NET localhost&lt;/span&gt; ----------&gt;this should be valid ip of your system.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;var RULE_PATH /etc/snort/rules&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now initiate snort:&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 255, 255);"&gt;snort -c /etc/snort/snort.conf -i eth0 -l /var/log/snort&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can also put &lt;span style="font-weight: bold;"&gt;-A console&lt;/span&gt; to get alerts on screen or put &lt;span style="font-weight: bold;"&gt;-D&lt;/span&gt; to run snort in deamon mode.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now its time we should be concentrating on IPS with or without mysql.&lt;br /&gt;&lt;br /&gt;Start with trying to compile snort by---------------&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;tar snort-2.8.1.tar.gz&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;cd snort-2.8.1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;./configure --enable-inline --enable-mysq&lt;/span&gt;l&lt;br /&gt;&lt;br /&gt;at this you are likely to get an error i.e.&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;libipq.h not found&lt;/span&gt;&lt;br /&gt;This can be eliminated by&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;copy libipq.h    to /usr/include/&lt;/span&gt;&lt;br /&gt;And if incase u don't have libipq.h file&lt;br /&gt;then do--------------&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;apt-cache search libipq.h&lt;/span&gt;&lt;br /&gt;And install the package which provides you the file&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;apt-get install *&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Other errors include errors like-----------&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;libpcap not found&lt;/span&gt;&lt;br /&gt;same  is to deal with these kids of errors.&lt;br /&gt;&lt;br /&gt;But to do it with --enable-mysql you have to get some   prerequisites.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="system"&gt;Libpcap0.8-dev &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="system"&gt;libmysqlclient15-dev &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="system"&gt;mysql-client-5.0 &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="system"&gt;mysql-server-5.0 &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;After this i don't think it will give you any kind of trouble.&lt;br /&gt;&lt;br /&gt;To get snort-inline working you have to get iptables up&lt;br /&gt;And add rules to iptables in such a way that packets stand in a queue.&lt;br /&gt;Such as---------&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;iptables -A INPUT -p tcp -j QUEUE&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;iptables -A INPUT -p icmp -j QUEUE&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;iptables -A INPUT -p udp -j QUEUE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can do this for any chain of iptables, depending upon what kind of work you want from your snort to perform.&lt;br /&gt;&lt;br /&gt;To initiate snort-inline just use--------------------&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;snort -QC&lt;/span&gt; &lt;span style="color: rgb(102, 255, 255);"&gt;/etc/snort/snort.conf -i eth0 -l /var/log/snort&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can also put &lt;span style="font-weight: bold;"&gt;-A console&lt;/span&gt; to get alerts on screen or put &lt;span style="font-weight: bold;"&gt;-D&lt;/span&gt; to run snort in deamon mode.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/767845241484768052-1039419325674719912?l=linuxgazettes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxgazettes.blogspot.com/feeds/1039419325674719912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxgazettes.blogspot.com/2008/09/snort-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/1039419325674719912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/767845241484768052/posts/default/1039419325674719912'/><link rel='alternate' type='text/html' href='http://linuxgazettes.blogspot.com/2008/09/snort-basics.html' title='Snort Basics'/><author><name>Harpreet's layout</name><uri>http://www.blogger.com/profile/06414334772502616705</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://4.bp.blogspot.com/_NfmyMpYAx_Y/S8cc3rSwIUI/AAAAAAAAAC4/UX0QzYfIIpw/S220/haps-.jpg'/></author><thr:total>0</thr:total></entry></feed>
