Generating A Self Signed Certificate For IIS
Generate the CA key:
openssl genrsa -des3 -out ca.key 1024
Generate the CA certificate:
openssl req -new -key ca.key -x509 -days 1095 -out ca.crt
Generate the IIS certificate by using the CSR generated from IIS:
openssl x509 -req -days 1095 -in certreq.txt -CA ca.crt -CAkey ca.key -CAcreateserial -out cer.crt
Export the CA certificate to DER encoded binary format if needed to be installed on a WM5 device:
openssl x509 -in ca.crt -outform DER -out ca.cer
Calling JAVA code from Oracle
To run java code from oracle do the following:
1. Create the java code on the server:
CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "hello" AS
public class hello {
public static String world() {
return "Hello World";
}
}
/
2. Create the oracle function on the server:
CREATE OR REPLACE FUNCTION hellofunction RETURN VARCHAR2 AS
LANGUAGE JAVA NAME 'hello.world() return java.lang.String';
/
3. Call the function using a SELECT:
SELECT hellofunction() from DUAL;
Testing SSL Services
Testing SSL services by connecting to it is possible using the following command:
openssl s_client -connect host:port -state
Using Sendmail’s mailertable
Edit sendmail.mc and add the following:
FEATURE(`mailertable')dnl
Run:
m4 sendmail.mc > sendmail.cf
Create /etc/mail/mailertable and add the incoming mail to route as in:
example.com smtp:[192.168.0.1]
Run:
makemap hash /etc/mail/mailertable < /etc/mail/mailertable
Restart sendmail.
Setting Up Sendmail To Act As An MX Backup Server
Edit or create /etc/mail/relay-domains and add the domains you want to have MX backup for one on each line.
Using Radius For System Authentication With PAM
Download pam_radius ftp://ftp.freeradius.org/pub/radius/ and run the following:
tar -xvf pam_radius*.tar
cd pam_radius*
make
cp pam_radius_auth.so /lib/security
Edit /etc/raddb/server and add the following:
127.0.0.1 secret 1
Under Gentoo edit /etc/pam.d/system-auth and add the following line:
auth sufficient pam_radius_auth.so skip_passwd
After:
auth sufficient pam_unix.so likeauth nullok
Make sure you add the users locally on the machine as well as the radius is just used for the password authentication.
Enjoy.
Installing Oracle 10g (10.2.0.1.0) On Gentoo 2005.1
Before installing add the following to /etc/sysctl.conf:
kernel.shmall = 3279547
kernel.shmmax = 4294967295
kernel.sem = 256 32000 100 142
fs.file-max = 327679
net.ipv4.ip_local_port_range = 10000 65000
kernel.msgmni = 2878
kernel.msgmnb = 65535
And get a compatible libaio by doing the following (tip from http://gentoo-wiki.com/HOWTO_Install_Oracle_10g):
wget ftp://ftp.suse.com/pub/suse/i386/9.1/suse/src/libaio-0.3.98-17.src.rpm
rpm2targz libaio-0.3.98-17.src.rpm
tar zxf libaio-0.3.98-17.src.tar.gz
tar jxf libaio-0.3.98.tar.bz2
cd libaio-0.3.98
make
make install
The rest is straight forward.
Update: ln -s /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libstdc++.so.5 /usr/lib/libstdc++.so.5 is also needed to be done.
IE HTML 4.01 Specification Bug?
While developing the new WiFi system I think I found a bug. Apperntly IE is not following the HTML specifications. In the OPTION tag for a SELECT you don’t really need to specify value as it is implied and uses the content of the OPTION tag (link) but IE requires the value if you want to use the value in a JavaScript. Spent a whole hour to find that out! Lesson learned: Always use value in the OPTION tag.
Netscreen 5XP Default Factory Reset
Was messing with this for like 15 minutes to get it right. To reset a
Netscreen 5xp to the default configuration connect to the console and
press the reset button with a paper clip for 4-6 seconds. When it says
that it is waiting for a 2nd push remove the clip, wait for 1-2 seconds
then press the button again till it resets.