Archive

Archive for the ‘Sys Admin’ Category

CentOS 5 – add dag repo

October 22nd, 2009

rpm -Uvh http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Show pre-shared-key on ASA

October 21st, 2009

This command will show you the pre-shared-key configured on your ASA

more system:run | be tunnel-group ip.add.re.ss

Linux HA – CRM commands

July 22nd, 2009

Small reminder as I always tend to forget these :

Dump the CRM cib db :

cibadmin -Q > cib.backup.xml

Modify a resource , dump the cib, modify the xml for the resources and then import using cibadmin -M

cibadmin -V -M -o resources -x modified_resources.xml

Add a resource , create the xml for the resource and them use -C

cibadmin -V -C -o resources -x new_resource.xml

Move resource from one location to another, -f to force it …

crm_resource -M -r resource -H host
crm_resource -M -r resource -H host -f

swaks – mail server testing tool

July 8th, 2009

If you dont like using telnet to test a remote or local smtp server , swaks is a neat little tool to do the job for you.
its also available ( suprise suprise … ) in the freebsd ports : /usr/ports/mail/swaks.

found it first here

control ip access to apache via .htaccess

July 6th, 2009

1. Allow only specific ip address :

order allow,deny
deny from all
allow from 192.168.1.1
allow from 192.168.1.2

2. Block specific ip address :

order deny,allow
allow from all
deny from 192.168.1.1
deny from 192.168.1.2

you can substitute ip for :

subnet -> deny from 192.168.1.0/24
subnet wild cards -> deny from 192.168.*.*
domain -> deny from domain\.com

you can also combine ip’s on one line:

deny from 192.168.1.1 192.168.2.1