July 2012
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories

July 2012
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

VPN Server With OpenVPN

Depending on your circumstances you may want to run the VPN from your home, or you may want to rent a VPS to run it from. If you’re just trying to get into your home network, an SSH tunnel might be easier; I will write something about SSH tunneling later. For the purposes of this […]

JBoss AS Clustering

Java Download wget http://download.oracle.com/otn-pub/java/jdk/6u33-b04/jdk-6u33-linux-i586.bin

Create a bash script to set JAVA_HOME and add Java executables to the path.

vim /etc/profile.d/java.sh

export JAVA_HOME=/opt/jdk1.6.0_26/ export PATH=$JAVA_HOME/bin:$PATH

5. Source you new script so exports take effect

source /etc/profile.d/java.sh

6. Setup Java to be used by the alternatives system (if you want, or if you have an existing install […]

Central Syslog Server

It’s so easy if you want to have logs centrally. So you need to decide which server will be syslog server, and then do this:

1. On the server edit: /etc/sysconfig/syslog

Make the settings like:

SYSLOGD_OPTIONS=”-m 0 -r”

2. On the client edit: /etc/syslog.conf

Add this line:

*.* @syslog_server_ip_address

Thats all, your clients will send […]

Open Source Alternatives for Server Software

According to a recent study by Stanford University consulting professor Jonathon Koomey, there are approximately 31.6 million servers installed around the world, including about 11.5 million in the United States. If organizations had to use only proprietary software for all of those systems, the resulting costs would be astronomical.

Fortunately, the open source community has […]

Mod_rewrite

Turn Mod_Rewrite On

Mod_rewrite is used through your .htaccess file. Place the following code at the beginning of your .htaccess file to turn mod_rewrite on:

RewriteEngine on

(Don’t forget that .htaccess commands are case-sensitive.) This code needs to be entered at the beginning of any .htaccess file using mod_rewrite. The Basic Mod_Rewrite Layout

The basic […]

.htaccess – Authentication from File and LDAP or other sources at the same time

.htaccess – Authentication from File and LDAP or other sources at the same time

Sometimes you may need to authenticate a user against different credentials stores, like standard files (.htpasswd), databases, ldap, … With Apache, you can use these more authentication sources by defining them in the AuthBasicProvider property.

The configuration bellow will authenticate a […]

.htaccess – Redirect to SSL (HTTPS) before Basic Authentication

.htaccess – Redirect to SSL (HTTPS) before Basic Authentication

 

I prefer running a site in HTTP only mode when there are no confidential information transferred (username, password, credit card number, etc.). It saves some of the CPU time because there is no need to do data encryption. But I strongly recommend to use HTTPS […]

free -m

free -m Use ‘free -m’ utility to get REAL memory usage. [u…@server /]# free -m total used free shared buffers cached Mem: 3876 3557 319 0 212 1083 -/+ buffers/cache: 2261 1615 Swap: 0 0 0 That means I have 3876MB total used memory. 2261MB of it is allocated and needed. 1083MB is cached (mostly […]

Tcpdump

Tcpdump is one of the best network analysis-tools ever for information security professionals. Tcpdump is for everyone for hackers and people who have less of TCP/IP understanding. Many prefer to use higher-level analysis tools such Wireshark, but I believe it is a mistake. With tcpdump you can decode layers 2-7 of OSI model. The first […]

ssl secure https and redirection

ssl secure https and redirection

NameVirtualHost *:80 NameVirtualHost *:443

<VirtualHost *:80>

DocumentRoot /usr/share/webmail ServerName webmail.rmohan.com RewriteEngine on RewriteCond %{HTTPS} !^on$ [NC] RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L] </VirtualHost>

<VirtualHost *:443> SSLEngine on SSLCertificateFile /etc/ssl/apache2/otherserver.crt SSLCertificateKeyFile /etc/ssl/apache2/otherserver.key ServerName webmail.rmohan.com SSLOptions StrictRequire SSLProtocol all -SSLv2 </VirtualHost>