Archive for April, 2009

online site to gen passwords

good online site to gen passwords

good tools to manage your passwords

we can also use the following script:

cat /dev/urandom| tr -dc ‘0-9a-zA-Z!@#$%^&*_+-‘|head -c 10;echo

No Comments

tips on ssh tunneling

tips on ssh tunneling

ssh -L 8080:destination_ip/dns:80 local_net/other

now you can visit the destination_ip/dns by visit


more details:


vi/vim is a good tool to edit the files

vi/vim is a good tool to edit the files for sys admin and programmer.
I don’t mean to offend the emacs guys. just my opinion. 🙂

if you want to learn and have any questions, just use this link.
so you don’t need to search on the internet.

the pdf is good book for the new learner.

No Comments

tips about rpmbuild

tips about rpmbuild

we need clamav’s libraries for havp-0.90-1.x86_64.rpm
the library file is
and don’t want the update make havp crash ( havp is rpmbuild rebuilt from source)
so when I rebuild the rpm i use the following options(edit havp.spec):

Requires: clamav

firstly meet the clamav then match;
so we won’t care the clamav version, just if it provides the we can use it.

more details on rpmbuild

No Comments

Tool to analysis the squid logs

Tool to analysis the squid logs

No Comments

install hping hping needs pcap.h

install hping
hping needs pcap.h, bpf.h, we should install libpcap-devel

there is sth need to change
ln -s /usr/include/pcap-bpf.h /usr/include/bpf.h

vi libpcap_stuff.c script.c
change the net/bpf.h into bpf.h

./configure && make && make install

but it is easy in FreeBSD
cd /usr/ports/net/hping-devel
make && make install

hping has much features to test the network!


No Comments

focus on security of Linux this weekend

focus on security of Linux this weekend.

APF (Advanced Policy Firewall) and more tools
there are all written in shell, such as APF based on iptables. good example in sys admin with shell.

OSSEC is an Open Source Host-based Intrusion Detection System.
It performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response.It runs on most operating systems, including Linux, MacOS, Solaris, HP-UX, AIX and Windows.
it is C/S model, just one server and server agentd, can monitor the system.

Some tips on optimize the MySQL database

MySQL Performance Tuning Primer Script –

MySQLTuner –

MONyog – MySQL Monitor and Advisor –

More links:


No Comments

squidclient -p 3128 -h squid_ip_address

squidclient -p 3128 -h squid_ip_address mgr:info@PASSWORD

get the squid manager infomation from it.
we should enable the client access cache manager
edit /etc/squid/{squid.conf, cachemgr.conf}
add your ip address to access. default manager can only access by localhost.

use a different port for cache manager
http_port 80 defaultsite=want_to_access_ip_address/hostname :80
http_port 8001 # this is for cache manager

No Comments

mod_evasive/security to secure Apache

mod_evasive/security to secure Apache server

No Comments

Drupal Optimize Tips

Drupal Optimize Tips also good for Php Optimization

No Comments