This is simple code to grep file … This code using by other to grep squid configurations and other like apache.conf. # cat /etc/squid/squid.conf | sed ‘/ *#/d; /^ *$/d’ (thanks to kotnik for small sed trick) to safe file use this # cat /etc/squid/squid.conf | sed ‘/ *#/d; /^ *$/d’ > /etc/squid/squid.conf-new to view or search [...]
Archive for the ‘archlinux’ Category
Exporting Mysql database results in garbage characters ’
Posted: April 5, 2011 in archlinux, Debian, Joomla, Slackwaremysql -u username -p –default-character-set=utf8 “database” < backup.sql
THANKS TO BRO HARIS !!! Untuk high performance network rules dia :- 1) Pakai cat6 dan pastikan hubungan server dan switch menggunakan 1GB/s (Gigabit switch). 2) pakai OS 64bit 3) Perlu buat kernel tunning terutama TCP tunning, files limit dan process limit http://people.redhat.com/alikins/system_tuning.html http://www.performancewiki.com/linux-tuning.html Yang ni yang paling saya suka walaupun untuk Oracle http://www.puschitz.com/TuningLinuxForOracle.shtml
root@web:~# pico /skrip/ip root@web:~# pico /skrip/ipsub root@web:~# pico /skrip/block ####################### PUT THIS ON /skrip/block ################## BLOCKDB=’/skrip/ip’ IPS=$(grep -Ev “^#” $BLOCKDB) for i in $IPS do iptables -A INPUT -s $i -j DROP iptables -A OUTPUT -d $i -j DROP iptables -A INPUT -p tcp -s $i –dport 21 -j DROP iptables -A INPUT -p tcp [...]
Lighttpd – configure simple vhost multiple domain
Posted: February 12, 2011 in archlinux, Debian, Freebsd, SlackwareI’am suing Lighttpd for serve multiple domain … Always forget how to configure …. ## For 1 domain simple-vhost.server-root = “/var/www/servers/” simple-vhost.default-host = “kami337fm.com” simple-vhost.document-root = “pages” $HTTP["host"] == “kami337fm.com” { server.document-root = “/var/www/servers/news2.example.org/pages/” } ## For host www and without www (www.kami337fm.com & kami337fm.com) $HTTP["host"] =~ “(^|\.)kami337fm\.com$” { server.document-root = “/var/www/servers/news2.example.org/pages/” } ## For [...]
Using netstat find all proses and port root@firewall:~# netstat -tulpn find proses by port root@firewall:~# netstat -tulpn | grep :80 Using fuser command find out PID that open port ex: 80 root@firewall:~#fuser 80/tcp output 80/tcp: 539 and find proses name based on PID root@firewall:~# ls -l /proc/539/exe output lrwxrwxrwx 1 root root 0 2011-01-04 [...]
Forward root mail from localhost to your gmail or whatever … *nix server always sent email about cron or anything than you have to read it. but how … ssh and issued this command bsd# mail than you can read your email. but if you wanna forward your email to gmail or yahoo or whatever. [...]
DNS Servers For Main ISPs In Malaysia
Posted: July 17, 2010 in archlinux, Debian, Freebsd, Slackware, WindowS SeveNTmNet DNS servers 202.188.1.5 202.188.0.133 202.188.1.4 202.188.0.132 Jaring DNS servers 192.228.128.20 192.228.128.18 192.228.128.16 161.142.227.17 61.6.38.139 161.142.2.17 161.142.212.17 TimeNet DNS servers 203.121.16.85 203.121.16.120 Open DNS Server (overseas) 208.67.222.222 208.67.220.220 add from http://blog.datakl.com/2009/05/dns-isp/
Botnet merupakan perkataan yang digunakan bagi koleksi perisian robot atau bot yang dijana secara automatik. Ia bergerak dalam komputer ‘zombie‘ yang dikawal secara mudah alih oleh penggodam. Proses mencuri sumber perkomputeran sebagai hasil sistem digabungkan menjadi botnet juga dikenali sebagai scrumping. Perkataan botnet boleh digunakan untuk merujuk kepada satu kumpulan bot seperti IRC bot, iaitu perkataan [...]
This is how you secure your linux box. 1. Account Locking Account locking for multiple failed tries puts extra burden on the system administrators but it also puts some responsibility on the user to remember his passwords. Additionally, locking allows the administrator to track the accounts that have potential hack attempts against them and to [...]

