Iklan Berbahasa Indonesia

Redhat 9 certified

oDesk Certified Redhat Linux 9.0 General Administrator

IP v6 Nubie

IPv6 Certification Badge for rito

Rabu, Desember 29, 2010

always show icmpSend: send: (96) Destination address required

this is another history that i use squid. after install squid on my solaris box. i'm facing another problem. my cache.log always show warning like this,

2010/12/28 18:22:01| icmpSend: send: (96) Destination address required
2010/12/28 18:22:02| icmpSend: send: (96) Destination address required
2010/12/28 18:22:02| icmpSend: send: (96) Destination address required
2010/12/28 18:22:02| icmpSend: send: (96) Destination address required
2010/12/28 18:22:03| icmpSend: send: (96) Destination address required



oh no, with this, i can not see more information in log. I have to find why this happen, and how to make this solve.

after asking to friend and also googling it, I found the problem.
problem come from file that call pinger. this is one of squid program that you can find in libexec directory. by default, this program is in read and executable permission. so, it need to be change into 4555 permission.
here is the step
go to libexec on your squid directory, and make sure pinger is exis in there. after that, change the permission. remember, you must login as a root.
chmod 4555 pinger
after change the permission, you have to restart your squid. since i'm using solaris, there is a litle bit different to change it. i use this command to restart squid.

svcadm restart sun-squid

so simple and easy.

done, wait for a while until squid finish restart. and try again check your cache.log. you will find no more warning
icmpSend: send: (96) Destination address required

Problem running out of filedescriptors

This time, I would like tell how we handled running out of filedescriptors on squid. as we know, squid is a proxy server. as a proxy server, squid will try to cache all web that access by client.

for the server which handle so much client, there will be problem with file descriptor. as far as i know, by default, today operating system could handled 1024 file descriptor, and squid follow by default that rule. you can see how much your operating system handled maximum file open by using ulimit command
ulimit -Hn
65536

right now, I use solaris 10. for x86 operating system. If I run ulimit command, it will show 65536. that's mean, my server can handled maximum 65536.

but yesterday, i got my squid log warning like this
WARNING! Your cache is running out of filedescriptors

well searching on google, I found that i have to recompiled my squid. preety weird you know, since I 'm not compile squid from the source. I use webstack squid. so, I tried to add single script on squid.conf. I just wrote
max_filedesc 40960

that's it. just type that, save your squid.conf, and then restart your squid. after that, I never get warning running out again. I'm not sure, how much squid handled maximum file descriptor. If I assume it will follow from the OS, it should be use 65536. but in fact, it is not. maybe it use under 1024.

well, that's enough for know. that's is one of my experience using squid.

Sabtu, Oktober 02, 2010

cara membuat paket rpm di redhat/fedora/centos secara offline

ini langkah-langkahnya ...

untuk yang ingin install paket nya secara offline
1. buat direktory sendiri

# mkdir /usr/local/paket
# cd /usr/local/paket

2. download dulu paket rpm nya (ambil dari kambing.vlsm.org)
# wget -r [url]http://kambing.vlsm.org/centos/5.4/[/url]

3. setelah download selesai, buat file baru di /etc/yum.repos.d/
contohtnya spt ini

more /etc/yum.repos.d/update.repo
[master]
enabled = 1
name = master centos
baseurl = file:///usr/local/paket/master

[update]
enabled = 1
name = update si centos
baseurl = file:///usr/local/paket/centos/kambing.vlsm.org/centos/5.4/centosplus/
i386/
gpgcheck = 0

[update1]
name=update2
enabled=1
baseurl=file:///usr/local/paket/centos/kambing.vlsm.org/centos/5.4/extras/i386/

[update2]
name=update3
enabled=1

5. setelah selesai, jalankan command yum check-update

done

Kamis, Agustus 26, 2010

Pidato Bung Karno

Kalau kita lapar itu biasa
Kalau kita malu itu juga biasa
Namun kalau kita lapar atau malu itu karena Malaysia, kurang ajar!
Kerahkan pasukan ke Kalimantan hajar cecunguk Malayan itu!
Pukul dan sikat jangan sampai tanah dan udara kita diinjak-injak oleh Malaysian keparat itu

Doakan aku, aku kan berangkat ke medan juang sebagai patriot Bangsa, sebagai martir Bangsa dan sebagai peluru Bangsa yang tak mau diinjak-injak harga dirinya.
Serukan serukan keseluruh pelosok negeri bahwa kita akan bersatu untuk melawan kehinaan ini kita akan membalas perlakuan ini dan kita tunjukkan bahwa kita masih memiliki Gigi yang kuat dan kita juga masih memiliki martabat.

Yoo...ayoo... kita... Ganjang...
Ganjang... Malaysia
Ganjang... Malaysia
Bulatkan tekad
Semangat kita badja
Peluru kita banjak
Njawa kita banjak
Bila perlu satoe-satoe!
Soekarno.

Rabu, Juli 14, 2010

Cara membangun DNS Filter (mari berantas pornografi)

Kebutuhan :
1. dns server, pilihan yang baik menggunakan powerdns, karena saya rpm base, maka silakan di download di :

http://downloads.powerdns.com/releases/rpm/pdns-static-2.9.22-1.i386.rpm

download powerdns sebagai authoritative server

2. linux box, pastinya.
3. database situs-situs yang ingin di blok, bisa didownload di

http://urlblacklist.com/cgi-bin/commercialdownload.pl?type=download&file=bigblacklist

pilih situs porno

4. web server

saya asumsikan di sini, kita akan menyimpan databasenya dalam bentuk file. powerdns bisa menyimpannya dalam database, salah satu yang telah saya coba adalah mysql. namun pada tutorial ini, yang saya bahas adalah menggunakan file.

di dalam database tersebut, terdapat kategori porn, nah pilih kategori tersebut. lalu pilih file domain.

ide dari dns filtering ini adalah "memaksa" suatu domain, katakanlah situs porno tadi, ke suatu ip yang telah kita assign. ip tersebut, bisa di server dns filter ini. misalnya dns filter ini, ipnya 192.168.0.1. kita perlu mengedit sedikit baris ini. tool favorit saya adalah yang terdapat di shell

kita akan menggunakan format record zone pada bind, yaitu
record IN A ip_address

dimana :
record : nama domain
A : Alias IP Address
ip_address : ip address dari web server yang ingin kita buat

command untuk membuat spt itu

# awk '{print $1". IN A 192.168.0.1"}' domains > record.db
# awk '{print "*."$1". IN A 192.168.0.1"}' domains >> record.db


keterangan :
# : root shell
awk '{print $1" IN A 192.168.0.1"}' domains > record.db : tambahkan baris pertama lalu diikuti IN A 192.168.0.1 pada baris domain, kemudian disimpan ke dalam file bernama record.db

awk '{print "*."$1" IN A 192.168.0.1"}' domains > record.db : tambahkan "*." baris pertama lalu diikuti IN A 192.168.0.1 pada baris domain, kemudian disimpan ke dalam file bernama record.db


selanjutnya install powerdns
yum install powerdns.paket.rpm

setelah terinstall, edit file pdns.conf, konfigurasi file pdns.conf
berikut adalah isi konfigurasi yang bisa diedit

#izinkan melakukan rekursor
allow-recursion=0.0.0.0/0

#ambil konfigurasi bind
launch=bind
bind-config=/etc/named.conf

#proses recursif dilakukan jika domain yang dimaksud tidak ada di dalam nya
lazy-recursion=yes
wildcards=yes

#tambahkan ip dns ISP Anda
recursor=xxx.xxx.xxx.xxx


isi dari /etc/named.conf

zone "." in{
type master;
file "record.db";
};


pada dns filter ini, kita akan membuat server kita sebagai root server, dan juga sebagai authoritative server.

kita perlu memodifikasi sedikit untuk file record.db
tambahkan di baris paling depan dari file record.db sebagai berikut :

$TTL 1d
@ IN SOA ns1. hostmaster. (
1234567899
3600
3600
3600
3600
)
IN NS ns1.
ns1. IN A 192.168.0.1



setelah itu, hidupkan service powerdns
/etc/init.d/pdns start

tahap selanjutnya adalah menghidupkan web server. mungkin kitga bisa membuat html sederhana, isinya mungkin kalimat,
Maaf, halaman yang Anda Akses tidak dapat kami buka karena mengandung konten pornografi

Hostmaster

menghidupkan web server
/etc/init.d/httpd start

selesai, silakan menerapkan tutorial ini, dan mari kita lindungi anak-anak Indonesia dari pornografi.