Tuesday, June 17, 2008

Moving a Certificate from Apache to a Windows IIS Server.

1.) Back up your certificate:

To import your certificate to Windows, you will first need to combine your primary certificate, Intermediate (CA) Certificate, and your private key file into a .pfx type backup file. To do this, use the following command:

openssl pkcs12 -export -out DigiCertBackup.pfx -inkey your_private_key_file.txt -in your_domain_name.crt -certfile DigiCertCA.crt

This creates a backup of your primary certificate called DigiCertBackup.pfx. Copy this file to your IIS Server.

2.) Import the .pfx file to your Windows server
Once you have copied the .pfx file to your Windows server, follow the instructions for importing your .pfx file to Windows IIS server

Source

Wednesday, June 11, 2008

Nagios for network and service monitoring

Introduction
Nagios is a open source service and network monitoring program.

Installation

Install the following rpms

nagios-2.9-1.el5.rf.i386.rpm
nagios-plugins-1.4.9-1.el5.rf.i386.rpm


Configuration

Add users nagios to cgi.cfg for the following attributes

authorized_for_system_information=nagios
authorized_for_configuration_information=nagios
authorized_for_all_services=nagios
authorized_for_all_hosts=nagios
authorized_for_all_service_commands=nagios
authorized_for_all_host_commands=nagios

Web user setup
Add nagios to /path/to/nagios.htpasswd Add the following to /etc/httpd/conf.d/nagios

Options ExecCGI
AllowOverride None
order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /path/to/nagios.htpasswd
Require valid-user


Alias /nagios/ /usr/share/nagios/

Options None
AllowOverride None
order allow,deny
Allow from all
AuthType Basic
AuthName "Nagios Access"
AuthUserFile /path/to/nagios.htpasswd
Require valid-user

Add Hosts and Services to /etc/nagios/localhost.cgi Follow the example configuration
Any questions or problems put them in the comments, I will try to help

Tuesday, June 3, 2008

Create your own SSL certificate

Here is a quick document on creating SSLs of your own.
List of steps summarized just in case the original site goes down

$ openssl genrsa -des3 -rand file1:file2:file3:file4:file5 -out server.key 1024
To create a key file1-file5 are random compressed files.

$ openssl rsa -in server.key -out server.pem
To delete the password from the key

$ openssl req -new -key server.key -out server.csr
To create a certificate signing request

$ openssl x509 -req -days 60 -in server.csr -signkey server.key -out server.crt
To create a self signed certificate.


SSL Certificate

Wednesday, May 14, 2008

Short Tutorial on screen

If you are like me using Putty or any ssh client to connect to many servers and are looking for a cleaner approach use screen window manager.

Screen Tutorial

Gathering System Information

For Solaris
Refer : Short Notes

Important commands to remember.
/usr/sbin/psrinfo -pv
To get physical processor information
/usr/sbin/prtconf
System Configuration

Linux
CPU Info
look in /proc/cpuinfo
or search for Physical Processor ID"

System architecture could be obtained by using
$uname -a

Monday, April 7, 2008

Force user to change password on login Linux

To force a user to change his password at login use
#chage -d 0 username

It is the same as passwd -t username in solaris.

Tuesday, April 1, 2008

How to find whether Solaris is 32 or 64 bit

Had to search for this today and found that
# isainfo -vk
will give you what you are looking for. The same information a linux machine can be obtained by the following command
$ uname -m