Fwknopd with SPA, Part 2.

View both keys with gpg –list-keys

$ gpg –list-keys
pub 1024D/AAAAAAAA 2008-03-07
uid test fwknop
sub 2048g/DDDDDDDD 2008-03-07

Export both keys from remote and local terminals.

gpg -a --export AAAAAAAA > remote.asc
gpg -a --export BBBBBBBB > local.asc
where AAAAAAAA is the remote key id and BBBBBBBB is the local key id.

securely transfer remote.asc to local terminal.
securely transfer local.asc to remote terminal.

import and signed both keys, you will need to enter the correct passphrase when signing both keys.

on local terminal

$ gpg --import remote.asc
$ gpg --edit-key AAAAAAAA
Command> sign
Command> save

on remote terminal

$ gpg --import local.asc
$ gpg --edit-key BBBBBBBB
Command> sign
Command> save

Posted in Embedded system | Leave a comment

fwknopd with SPA Part.1

Generate gpg keys on both remote and local terminal :

gpg --gen-key
Please select what kind of key you want:
Select (1) DSA and Elgamal (default)

What keysize do you want? (2048)
Choose default 2048(just press enter)

Key is valid for? (0)
press enter key does not expire

Is this correct? (y/N)
press y

Real name:
enter key name e.g: term-Gpg

Email address:
enter email…

Comment:
optional press enter if none

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit?
press O and enter

You need a Passphrase to protect your secret key.
enter your ultra duper secure passpharse.

generate some activity on the terminal,move your mouse or search for a file. while it generates random
bytes.

finally if all goes well… the ff will be shown.

public and secret key created and signed.

gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
pub 1024D/YYYYXXXX 2011-06-03
Key fingerprint = 1111 2222 3333 4444 5555 6666 7777 8888 9999 aaaa
uid Term7-Gpg
sub 2048g/XXXXYYY 2011-06-03

Posted in Embedded system | Leave a comment

installing oflademo on red5


wget http://trac.red5.org/downloads/1_0/red5-1.0.0-RC1.tar.gz

tar xvzf red5-1.0.0-RC1.tar.gz

cd red5-1.0.0/webapps/
mkdir oflaDemo
cd oflaDemo
wget http://red5.googlecode.com/svn-history/r3990/snapshots/oflaDemo-r3989-java6.war
unzip oflaDemo-r3989-java6.war
cd ../..
./red5.sh

Posted in Embedded system | Leave a comment

Kernel not loading usbserial on Huawei modems

remove pl2303 and usb_storage driver
rmmod pl2303
rmmod usb_storage

then reinsert huawei modem again

Posted in Embedded system | Leave a comment

Common AT commands

Read all SMS in text mode:
AT+CMGF=1 (set TEXT MODE)
AT+CMGL=”ALL”

Read single sms in text mode:
AT+CMGF=1 (set TEXT MODE)
AT+CMGR=1 (location index)

Delete single sms:
AT+CMGD=1 (location index)

Sending SMS in text mode:
AT+CMGF=1 (set TEXT MODE)
AT+CMGS=”0912xxxyyyy”
> test message
Press Ctrl+z
Press Enter

Read Sim Number:
AT+CPBS=”ON”
AT+CPBR=1
+CPBR: 1,”+63948xxxyyyy”,145,”"

Posted in Embedded system | Leave a comment

setup apache to handle Eric Blue’s Document Browser 1.0

download doc_browser http://eric-blue.com/projects/docbrowser/doc_browser_1_0.zip

extract contents to a directory named projects/docbrowser

create the ff. doc.conf inside apache conf.d

Alias /projects /var/www/projects


Order allow,deny
Allow from all


Options +ExecCGI
AddHandler cgi-script .cgi .pl

ensure that list.cgi and convert.cgi have execute permission enabled.

those script requires the ff. perl module
perl-HTML-Entities-Numbered (centos 5.6 base repo)
perl-Log-Log4perl (rpmforge)

Posted in Embedded system | Leave a comment

Allow normal user to run smartd in pfsense 1.2.3

chmod 4555 /usr/local/sbin/smartctl

Posted in Embedded system | Leave a comment

SMARTD on zabbix

UserParameter=system.smartd[*],sudo smartctl -A $1| grep $2| tail -1| cut -c 88-|cut -f1 -d’ ‘

zabbix ALL=NOPASSWD: /usr/sbin/smartctl

download template here

Posted in Embedded system | Leave a comment

lm_sensors 3.20 w/ coretemp using CENTOS 5.5 on GA-G31M-E2SL w/ it8718 chip

1. add elrepo to your repositories
2. yum –enablerepo=elrepo install kmod-coretemp # this will install lm_sensor 2.10.8 as its dependencies.
3. lsmod | grep coretemp # coretemp should be loaded by now
4. download latest lm_sensors 3.20 source, compile and install
5. edit /etc/init.d/lm_sensors entry
from : PSENSORS=/usr/bin/sensors
to: PSENSORS=/usr/local/bin/sensors
8. chkconfig lm_sensors on
9. done

modinfo it87
modinfo coretemp

optional
1. add the ff. to your zabbix_agent.conf
UserParameter=sensors[*],/usr/local/bin/sensors | grep “$1″ | head -$2 | tail -1 | awk “{print $”$3″}” | sed ‘s/[-!@#\$%^&*()°+a-zA-Z]//g’
2. add the ff to your sensors3.conf under the chip it87 entry
label fan1 “CPU Fan”

Posted in Embedded system | Leave a comment

battery operated fan

found this on city hardware, great during frequent earth day here in puerto
IMG325

Posted in Embedded system | Leave a comment