Protein Production
293FT, 293E, CHO

Truly Functional Protein
95% Purity
1-10 mg in 2 weeks

GeneExpressoMax™
293Expresso™

Transfection Reagents
* 90% Efficiency
* 95% Viability
* No sera interference
* Simple protocol
* High-throughput
* Only $98/ml

Baculovirus
Functional Protein
95% Purity
Fast turnaround
1-10 mg from Sf9 cells

Adenovirus, AAV
& Lentivirus

ORF or shRNA
* High Titer
* Cre, FLP, ΦC31
* Protein Kinases
* Transcription Factors
* Luciferases, GFP, RFP
* Protein Production
* Stable Cell Line


Excellgen

Archive for March, 2008

How to redirect http to https (SSL) using .htaccess and mod_rewrite with Apache web server

If you want to use https (SSL) for the entire web site, edit .htaccess and add the following lines:


RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.my-site.com/$1 [R,L]

if you want to enforece https (SSL) for a paticular directory (and sub-directories), create an .htaccess file with the following lines:



RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} my_directory
RewriteRule ^(.*)$ https://www.my-site.com/my_directory/$1 [R,L]

Make sure you turn on RewriteEngine in your httpd.conf file:

RewriteEngine on

Then restart apache

apachectl restart

Tags:

Comments

March 28, 2008 at 11:38 am ·

Easy way to upgrade PHP 5.1 to 5.2 and install XCache on CentOS 5

Comments

March 24, 2008 at 4:16 pm ·

Protect Your Web Server from Security Attacks using ModSecurity

1, install httpd-devel, and subversion-devel

yum install httpd-devel

yum install subversion-devel

2, Downlaod and install ModSecurity

wget http://www.jasonlitka.com/media/EL4/i386/mod_security-2.5.0-jason.2.i386.rpm

or wget http://www.jasonlitka.com/media/EL5/i386/mod_security-2.1.4-1.jason.2.i386.rpm

rpm -i mod_security-2.5.0-jason.2.i386.rpm

rpm -i mod_security-2.1.4-1.jason.2.i386.rpm

3, Check if the module is installed:

ls -la /usr/lib/httpd/modules/mod_security2.so

4, restart apache

apachectl restart

5, Regularly monitor log files :

/var/log/httpd/modsec_audit.log

/var/log/httpd/modsec_debug.log

6, If you installed wrong version, use the following command to remove the wrong version/module

yum remove mod_security

7, You can use yum install mod_security command to install mod_security if you create a file /etc/yum.repos.d/utterramblings.repo with the following lines

[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

but this won’t allow you to select which version to install.

mod_security-2.5.0 is not compatible with PHP 5.1, so for PHP5.1 you need to install mod_security-2.1.4-1.

Jason Litka’s PHP 5.2.5 has a bug with SSL, so if you have a shopping cart (Zen Cart) it will break your shopping cart.

Note:

Ref:

http://www.modsecurity.org/

http://www.jasonlitka.com/yum-repository/

http://www.jasonlitka.com/2007/08/24/mod-security-packages-now-available/

http://www.jasonlitka.com/2008/01/23/recent-repo-updates-modsecurity-xcache-httpd/

http://www.jasonlitka.com/media/EL5/i386/

http://www.g-loaded.eu/2006/08/24/modsecurity-overview/

http://www.eth0.us/mod_security

http://www.gotroot.com/tiki-index.php?page=Setting+up+mod_security

http://www.gotroot.com/tiki-index.php?page=mod_security+rules

Tags:

Comments

March 23, 2008 at 6:53 pm ·

Protect Your Web Server from Spam Bots and Brute Force Attacks

1, Instal Ruby

see: http://www.my-whiteboard.com/linux-admin/how-to-install-ruby-on-rails-on-centos.html

gem install mysql

2, Create a table hosts_ban in a MySQL database, e.g.,badip.

CREATE TABLE `hosts_ban` (
`id` int(11) NOT NULL auto_increment,
`ip` varchar(19) NOT NULL,
`power` int(11) NOT NULL default '1',
`ban_time` int(11) NOT NULL default '5',
`expiry` datetime NOT NULL,
`last_access` datetime NOT NULL,
`reason` varchar(200) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ip` (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

3, create two php files, password.php and badrobot.php

/* File: password.php */

<?php
$username="xx";
$password="sec";

?>

/* File: badrobot.php */
<?php

include "/home/marketing/password.php";
echo "Bad Robot! You fell into a honey pot.";
exec("/bin/touch /tmp/badrobot");

# Change this line to match your MySQL configuration
$db = mysql_connect(“localhost”, “username”, “password”);
mysql_select_db(“badip”, $db);

$ip = $_SERVER['REMOTE_ADDR'];

# How long should the IP be banned?
$ban_time = 600; // seconds = 10 minutes

# Describe the reason for ban
$reason = “Fell in Honeypot: “.$_SERVER['HTTP_USER_AGENT'];

$sql = “INSERT INTO hosts_ban (ip, reason, ban_time, expiry, last_access) VALUES(‘$ip’,'$reason’, ‘$ban_time’, NOW() + INTERVAL ‘$ban_time’ SECOND, NOW()) ON DUPLICATE KEY UPDATE power = power + 1, expiry = NOW() + INTERVAL (POWER(2,(power-1))*ban_time) SECOND, last_access = NOW();”;
mysql_query($sql);
?>

4, create a robots.txt to lure spambots

# File: robots.txt
# Some honeypots to trap bad robots
User-agent: *
Disallow: /guestbook-emails/
Disallow: /top-secret/

5, create a security.inc file

# File: security.inc
# Allow web access to the security directory
<Directory /home/security/webapps>
Order deny,allow
Deny from all
Allow from all
</Directory>

Alias /robots.txt /home/marketing/webapps/robots.txt

RewriteEngine On

# Honeypot for bad robots
RewriteCond %{REQUEST_URI} ^/(guestbook-emails|top-secret)(/)?$
RewriteRule ^.* /security/badrobot.php [PT,L]

# Uncomment the following lines to permit IP access via WWW. Create ‘badrobot_ipaccess.php’ first
# RewriteCond %{SERVER_NAME} 123.123.123.123 # Your server’s IP address here.
# RewriteCond %{REQUEST_URI} !favicon.ico
# RewriteRule ^.* /security/badrobot_ipaccess.php [PT,L]

# Uncomment to ban by user agent. Create ‘badrobot_useragent.php’ first.
# RewriteCond %{HTTP_USER_AGENT} ^EmailCollector [OR]
# RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon
# RewriteRule ^.* /security/badrobot_useragent.php [PT,L]

# Place your own bad robot directives here…

# This must follow your last bad robot directive
Alias /security /home/security/webapps/

6, create directories

mkdir /home/security

mkdir /home/security/webapps

7, edit virtual_host file to include the following:

Include "/etc/httpd/conf/security.inc"

8, Create a ruby file:

#!/usr/bin/env ruby

# This is the Badrobot daemon.
# Version 1.1
# Released under the Public Domain

require 'rubygems'
require 'mysql'

# -- Configuration -- #

# MySQL database:
@db_host = "localhost"
@db_name = "badrobot"
@db_user = "badrobot"
@db_password = ""

# The user your web server runs under:
www_user = "apache"

# Your iptables firewall startup script: (Empty string for none)
firewall_script = ""

# Location of touchfile that gets notified when the database changes:
ban_touchfile = "/tmp/badrobot"

# Check touchfile every n seconds:
loop_time = 1

# -- Don't change below this line unless you know what you are doing -- #

# Initial values
last_ban = 0
@current_chain = 0
@next_expiry = nil

# Restart Firewall to clean up the mess me may have made
system(firewall_script) if firewall_script

# Create touch file, if necessary
system("touch #{ban_touchfile} && chown #{www_user}.root #{ban_touchfile}")

# The IP blocking method
def ipblock
# Alternate chains
@old_chain = @current_chain
@current_chain = (@current_chain == 1) ? 0 : 1
# Flush chain
system("iptables -N banned_ips#{@current_chain} 2>/dev/null")
system("iptables -F banned_ips#{@current_chain}")
dbh = Mysql.real_connect(@db_host, @db_user, @db_password, @db_name)
# Get all banned IPs
result = dbh.query("SELECT ip, expiry FROM hosts_ban WHERE expiry > NOW()")
while row = result.fetch_hash do
# Add IP to chain
system("iptables -A banned_ips#{@current_chain} -s #{row["ip"]} -j DROP")
end
result.free if result
# Get next expiry date
result = dbh.query("SELECT MIN(expiry) AS next_expiry FROM hosts_ban WHERE expiry > NOW()")
if row = result.fetch_hash and row["next_expiry"]
t = row["next_expiry"].split(/-|:|\s/)
@next_expiry = Time.mktime(t[0], t[1], t[2], t[3], t[4], t[5])
else
@next_expiry = nil
end
dbh.close if dbh
# Insert chain in INPUT
system("iptables -I INPUT -j banned_ips#{@current_chain}")
# Delete old chain
system("iptables -D INPUT -j banned_ips#{@old_chain} 2>/dev/null")
system("iptables -F banned_ips#{@old_chain}")
system("iptables -X banned_ips#{@old_chain}")
end

# Main loop
loop do
# IP block
if File.mtime(ban_touchfile) != last_ban or (@next_expiry and Time.now > @next_expiry)
ipblock
last_ban = File.mtime(ban_touchfile)
end
# Wait loop_time seconds
sleep(loop_time)
end

Ref:

http://www.rubyrobot.org/article/protect-your-web-server-from-spambots

http://forum.mamboserver.com/showthread.php?t=26406

http://michael.langley.id.au/blog/posts/28

http://kevin.vanzonneveld.net/techblog/article/block_brute_force_attacks_with_iptables/

http://howtoforge.com/fail2ban_debian_etch

Tags:

Comments

March 23, 2008 at 4:58 pm ·

How to Install Ruby on Rails On CentOS

1, Install Rails components:

yum install ruby ruby-devel ruby-libs irb rdoc ruby-mysql

2, install Gems

wget http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz

tar -xvzf rubygems-1.0.1.tgz

cd rubygems-1.0.1

ruby setup.rb
Ref:
http://wiki.rubyonrails.org/rails/pages/RailsOnCentos
Tags:

Comments

March 23, 2008 at 3:51 pm ·

Next Page » Next Page » Next »