Sunday, August 28, 2011

csf on openvz [ another reference ]

still no luck. trying another way:

this is detailed instruction:


vzctl set VEID --iptables ipt_REJECT --iptables ipt_tos --iptables ipt_TOS --iptables ipt_LOG --iptables ip_conntrack --iptables ipt_limit --iptables ipt_multiport --iptables iptable_filter --iptables iptable_mangle --iptables ipt_TCPMSS --iptables ipt_tcpmss --iptables ipt_ttl --iptables ipt_length --iptables ipt_state --iptables iptable_nat --iptables ip_nat_ftp --save

others:

http://piyecarane.wordpress.com/2009/08/30/how-to-enable-csf-on-openvz-container/

On the node server :
Modify IPTABLES_MODULES on /etc/sysconfig/iptables-config

IPTABLES_MODULES="ip_conntrack_netbios_ns ipt_conntrack ipt_LOG ipt_owner ipt_state ip_conntrack_ftp iptable_nat ip_nat_ftp ip_tables ipt_multiport iptable_filter ipt_limit"

then launch : service iptables restart
to restart iptables services

Then modify IPTABLES on /etc/vz/vz.conf

IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp ip_tables ipt_conntrack ip_conntrack_ftp ipt_LOG ipt_owner"

then launch : /etc/init.d/vz restart

Thursday, August 25, 2011

iptables csf with openvz container

required modules

iptable_filter
iptable_mangle
ipt_limit
ipt_multiport
ipt_tos
ipt_TOS
ipt_REJECT
ipt_TCPMSS
ipt_tcpmss
ipt_ttl
ipt_LOG
ipt_length
ip_conntrack
ip_conntrack_ftp
ip_conntrack_irc
ipt_conntrack
ipt_state
ipt_helper
iptable_nat
ip_nat_ftp
ip_nat_irc

How to test?
perl /etc/csf/csftest.pl
read more: http://kb.parallels.com/en/746

Monday, August 15, 2011

optimizing large database

http://viralpatel.net/blogs/2009/08/fast-data-copy-with-create-table-select-from-in-plsql.html

mysqli tutorial

moving from procedural coding style to OOP this article telling basic information and maybe helpfull


Getting some info on the result from the mysql database:
 
 $mysqli = new mysqli('localhost','db_user','my_password','mysql'); // Get all the MySQL users and their hosts $sql = "SELECT user, host FROM user"; // If the query goes through if ($result = $mysqli->query($sql)) { // If there are some results if ($result->num_rows > 0) { // Let's show some info echo 'There were '.$result->num_rows.' rows returned. '; echo 'We selected '.$result->field_count.' fields in our query. '; echo 'Our thread ID is '.$mysqli->thread_id.' '; // Ok, let's show the data while ($row = $result->fetch_object()) { echo 'Username: '.$row->user.' :: Host: '.$row->host.' '; } // end while loop } else { echo 'There are no results to display. Odd how we connected to this database and there are no users.'; } // end else } else { // Notice the error would be within the mysqli class, rather than mysql_result printf("There has been an error from MySQL: %s",$mysqli->error); } // end else // Close the DB connection $mysqli->close(); ?>

also read mysql performance

Sunday, August 14, 2011

php tutorials

http://www.askaboutphp.com/

recently browsing about date and time manipulation


this website was bookmark here and there are another new thing to explore like codeigniter and jquery. nice step by step tutorial.

Saturday, August 13, 2011

interesting tool: visual traceroute

http://www.yougetsignal.com/tools/visual-tracert/

also know which website is shared in your shared hosting


good luck.

send email using telnet

http://www.rdpslides.com/webresources/FAQ00035.htm

You do/type thisServer responds with
Telnet to hostname on port 25220 (then identifies itself - possibly with several lines of 220 + text)
HELO your_domain_name or whatever250 (followed by human readable message)
MAIL FROM:you@hostname.com (ie, your email address)250 is syntactically correct (or similar)
RCPT TO:them@someplace_else.com (email address you want to send to)250 is syntactically correct
DATATells you to send data then CRLF period CRLF at end
You type your message then CRLF period CRLF (ie, type a period on a line by itself then hit ENTER)250
QUITSignoff message
Related Posts Plugin for WordPress, Blogger...