See all listening ports with which processes using them for linux

December 13th, 2011

Use the following command to list all open ports and associated programs:

sudo netstat -tulpn

Good sight for hardening your linux servers

http://www.cyberciti.biz/tips/linux-security.html

Add Password / Passphrase to OpenVPN certificate

December 12th, 2011

Command used on Vyatta router:-

openssl rsa -in .key -out .key -des3

Link where i got this info from.

http://openvpn.net/archive/openvpn-users/2004-06/msg00175.html

Running minimum amount of services in CentOS

October 15th, 2011

This article describes the various services that CentOS runs by default and what all we can disable.

http://anchorite.org/blog/2006/11/13/minimal-services-on-centos-44-mini-howto/

Enabling And Disabling Services During Start Up In GNU/Linux

October 15th, 2011

Excellent write up on how to enable and disable services in Linux using the command line and also discusses generic methods (that which are not dependent on the distribution)

http://linuxhelp.blogspot.com/2006/04/enabling-and-disabling-services-during_01.html

Installing Sphinx Search on CentOS 5.6

October 15th, 2011

Quick write up on how to install Sphinx on a new installation of CentOS.

-After installing CentOS first thing to do is to update everything. So yum -y upgrade

-Download the Sphinx Tarball and untar it (wget http://sphinxsearch.com/files/sphinx-2.0.1-beta.tar.gz)

-Download the libstemmer library (the download link is in the INSTALL file, wget http://snowball.tartarus.org/dist/libstemmer_c.tgz)

-Make sure yum -y install gcc-c++ kernel-devel

-Also yum -y install mysql-devel

-Then do ./configure –with-libstemmer

-make -j4 install

And that’s it…the installation of Sphinx Search is complete!

Now you need to configure the sphinx.conf file. There is an excellent wiki available at http://sphinxsearch.com/wiki/doku.php

Install VMware Tools on CentOS 5.6

October 15th, 2011

yum -y install gcc-c++ kernel-devel
mount /dev/cdrom /mnt
tar -C /tmp -zxvf /mnt/VMwareTools*
umount /mnt
cd /tmp/vmware-tools-distrib
./vmware-install.pl

Taken from this website

http://jameshouse.org/2011/05/25/install-vmware-tools-on-centos-5-6-with-yum/

Setting up SSL or HTTPS on WAMP

August 11th, 2011

Excellent write up here.

List SSH command line history with timestamp

August 8th, 2011

Found an interesting trick at http://linux.byexamples.com/archives/467/list-command-line-history-with-timestamp/

All you need to do is run export HISTTIMEFORMAT="%F %T " at the command line and you are done! Now run history and you’ll get your history with timestamps!

create a user for SDM through CLI IOS

October 17th, 2010

You need three commands to add a user so that someone can log in through the built-in http server on cisco.

First command is :-
ip http server

This enables the http server

Second command is :-
username admin privilege 15 password password

This creates the user admin with password “password” and full priviliges.

Third command is :-
ip http authentication local

This enables the authentication to take place through the above created username and password

That’s it! After this you should be able to log in through the web portal

Search file names in Windows 7

July 21st, 2010

One of the many quirks in Windows 7 is the inability to search for file names. By default it searches for file contents. One simple way to JUST look for filenames is to prefix “name:” without quotes to your file name search. So instead of searching for readme.txt, search for name:readme.txt

Hope this helps somebody!