Preventing remote access to datasources

Submitted by gunnar on

When you define a JDBC connection pool in Glassfish (AKA Sun Java System Application Server 9) and JDBC resources for it, you usually include a user name and password as pool properties.  You may think that this information is available only to deployed applications, but in fact anyone with IP access to the servers ORB port (3700 by default) can fetch the entire datasource definition using a simple JNDI lookup. If the database server is also accessible, then you have a security problem.

Editing crontab for QNAP, and making it stick

Submitted by gunnar on

If you have a QNAP you may want to run some scripts regularly. Editing the crontab seems to work but your changes don't survive a reboot. There is however a fairly simple solution:

During boot, the QNAP will mount the partition /dev/mtdblock5 in /tmp/config and execute the file autorun.sh in this directory, if it exists. The following steps show you how to create the file with the commands necessary to add a crontab entry:

First, mount the partition, cd into the config directory and edit or create the autorun.sh file:

The perfect egg

Submitted by gunnar on

Boiling an egg is easy. Boiling the perfect egg however, requires extensive research. After many months of boiling, testing and statistics gathering I've concluded the following:

Using Apache as a proxy to access a J2EE web application

Submitted by gunnar on

OK, you have created a great web application and now you want to expose it to the world, or perhaps a limited subset of it. You probably don't want to allow full access to your application server so you need a proxy.

The apache proxy module (mod_proxy) can be used with a simple configuration like below:

<IfModule mod_proxy.c>

Mailing files from Konqueror

Submitted by gunnar on
Question

I want to right click on one or more files in Konqueror and create a new mail with the files as attachments. Is this possible?

Answer

Yes, by creating a service menu entry.

In the directory .kde/share/apps/konqueror/servicemenus, relative to your home directory, create a file called sendto.desktop with the following contents:

[Desktop Entry]
Actions=SendToMailRcp
Encoding=UTF-8
ServiceTypes=all/allfiles
X-KDE-Priority=TopLevel
X-KDE-Submenu=Send To

[Desktop Action SendToMailRcp]
Name=Mail Recipient...
Exec=kmail --attach %F
Icon=kmail

Using KMail from Firefox

Submitted by gunnar on
Question

How do I get Firefox to open mailto-links with KMail and use KMail from Tools/New Message?

Answer

For some reason this IMO important configuration setting hasn't made it into the Preferences dialog but it is available:

  1. Open the "about:config" page.
  2. Type "mailto" in the filter field.

Specific NIC for bridged network

Submitted by gunnar on
Question

I have two NIC's and I don't want eth0 to be used for the bridged network. How do I specify which one to use?

Answer

Assuming you have already setup networking, run vmware-config to change your configuration. 

Eventually you will be asked if you want to keep or change your network setup. Below is a sequence of questions and answers that selects the NIC "lan" for bridged network: