INSTALL DAN KONFIGURASI CENTOS SERVER 4.4
CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor. CentOS conforms fully with the upstream vendors redistribution policy and aims to be 100% binary compatible. (CentOS mainly changes packages to remove upstream vendor branding and artwork.) CentOS is free.
Centos adalah turunan dari distro besar REDHAT. Yang akan ditulis disini adalah instalasi CENTOS versi server dimana fungsi utama adalah servis shating internet menggunakan squid dan transparent proxy. Untuk mendonload CentOS di indonesia silahkan http://kambing.vlsm.org/tuma/CentOS/ tapi sekarang linknya dah berubah jadi http://tuma.vlsm.org/iso/CentOS/ tapi disini CentOSnya dah versi 5 dan ada 6 CD. Yang menjadi kelebihan CentOS 4 Server adalah hanya satu CD installer saja jadi sangat memudahkan dalam proses instalasi.
Untuk menginstall sistem operasi ini dianjurkan untuk membuat partisi ext3 dan swap terlebih dahulu (bagi yang tdk terbiasa menggunakan diskdruid dr Redhat) dengan Partition Magic yang versi DOS saja jg bisa. Silahkan install seperti biasa tapi pada saat kita harus memilih paket silahkan pilih paket yang advance saja dan pilih sesuka anda. Tapi ingat karena ini versi server maka tidak ada gui disini sehingga hanya full console saja untuk mengkonfigurasinya. Tapi kalau Anda ingin menggunakan GUI dr twm (gui yang sederhana) silahkan install menggunakan perintah ini :
yum install -y xorg-x11-twm
Installnya tidak akan lama paling lama 5 menit saja.Untuk saya pribadi karena masih belajar menggunakan Redhat maka untuk firewall dan SELinux untuk sementara belum saya aktifkan menunggu hasil belajar yang mendalam terlebih dahulu. Maklum da ilmunya hanya segini2ninya aja.
Setelah restart silahkan login menggunakan user root dan password yang telah disetting pada saat instalasi. Untuk pertama-tama kita akan mengkonfigurasikan settingan jaringan terlebih dahulu. Karena menggunakan mode teks maka untuk mengedit konfigurasi jaringan kita bisa menggunakan vi saja (kalo di debian aku lebih seneng pake pico). Begini kodenya:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
Isinya ini:
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.10.255
HWADDR=00:0C:29:BE:01:B5
IPADDR=192.168.10.222
NETMASK=255.255.255.0
NETWORK=192.168.10.0
ONBOOT=yes
TYPE=Ethernet
Untuk menggunakan vi silahkan tekan insert untuk merubah, dan tekan esc :wq untuk menyimpan tulisan yang kita rubah tadi, atau esc :q! untuk keluar saja tanpa menyimpannya. Settingan di komputer server ini ada dua lancard yang terkoneksi, satu langsung ke gateway dan satu lagi ke switch hub untuk dibagikan kepada yang lain. Eth0 adalah kartu jaringan pertama yang terhubung ke gateway. Eth1 adalah kartu jaringan yang nanti akan meneruskan permintaan klien ke ethernet eth0. Jadi kofigurasi eth1 adalah sebagai berikut :
vi /etc/sysconfig/network-scripts/ifcfg-eth1
Yang isinya :
DEVICE=eth1
BOOTPROTO=static
BROADCAST=192.168.10.255
HWADDR=00:0C:29:BE:01:BF
IPADDR=192.168.10.46
NETMASK=255.255.255.0
NETWORK=192.168.10.0
ONBOOT=yes
TYPE=Ethernet
Kemudian jangan lupa untuk mengedit juga
/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=internetku.telkom.net
GATEWAY=192.168.10.111
Dan terakhir
/etc/resolv.conf
search telkom.net
nameserver 202.134.2.5
nameserver 203.130.169.5
Sori kebetulan disini aku pake satu range ip yaitu 192.168.10.xxx, ini karena aku masih nyoba di vmware. Biasanya untuk eth0 ipnya adalah
address 10.1.1.120
netmask 255.255.255.240
network 10.1.1.112
broadcast 10.1.1.127
Sekarang semua konfigurasi jaringan sudah selesai, silahkan restart network anda dengan perintah :
/etc/init.d/network restart
Maka akan ada pesan :
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: [ OK ]
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: [ OK ]
Berarti semua sudah ok untuk konfigurasi jaringan. Kita cek dulu apakah server kita ini sudah terkoneksi dengan internet. Mari kita ping ke www.yahoo.com.
ping www.yahoo.com
Maka akan ada pesan :
PING www.yahoo-ht3.akadns.net (69.147.114.210) 56(84) bytes of data.
64 bytes from f1.www.vip.re3.yahoo.com (69.147.114.210): icmp_seq=0 ttl=44 time=187 ms
64 bytes from f1.www.vip.re3.yahoo.com (69.147.114.210): icmp_seq=1 ttl=44 time=365 ms
64 bytes from f1.www.vip.re3.yahoo.com (69.147.114.210): icmp_seq=2 ttl=43 time=199 ms
64 bytes from f1.www.vip.re3.yahoo.com (69.147.114.210): icmp_seq=3 ttl=43 time=186 ms
Berarti server kita sudah terkoneksi dengan internet.
Setelah semua konfigurasi jaringan sudah jalan kita sekarang akan mengkonfigurasikan web proxy kita. Disini kita akan menggunakan squid, squid adalah web proxy yang paling terkenal didunia unix. Squid yang kita pakai adalah squid bawaan dari CentOS yaitu squid Version 2.5.STABLE6. Saya kira untuk sementara kita cukup dengan squid versi ini. Untuk konfigurasinya saya tinggal import dari konfigurasi server Debian saya yang sekarang lagi dipake. Tapi sebelum itu kita harus membuat direktori /cache terlebih dahulu. Direktori ini gunanya adalah untuk menyimpan cache dari squid yang akan kita gunakan. Codenya adalah:
cd /
mkdir /cache
chmod 777 /cache
kemudian kita ubah konfigurasi squid di /etc/squid/squid.conf menjadi :
http_port 3128
#http_port 8080
#============transparent proxy=====================
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
forwarded_for on
icp_port 3130
# TAG: hierarchy
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
# OPTIONS WHICH AFFECT THE CACHE SIZE
cache_mem 256 MB
#cache_swap_low 90
#cache_swap_high 95
maximum_object_size 256 MB
cache_replacement_policy heap GDSF
cache_dir ufs /cache 6000 16 256
#Recommended minimum configuration:
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
#===========Setingan untuk memblok situs porno=============
acl notsex url_regex -i “/etc/squid/bukansex”
http_access allow notsex all
acl sex url_regex -i “/etc/squid/sex”
http_access deny sex all
no_cache deny sex
acl ok src 192.168.10.1-192.168.10.79/32
http_access allow ok
acl ok2 src 192.168.10.81-192.168.10.255/32
http_access allow ok2
acl absensi src 192.168.10.80/32
http_access deny absensi
#Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Only allow purge requests from localhost
http_access allow purge localhost
http_access deny purge
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
http_access allow localhost
# And finally deny all other access to this proxy
http_access deny all
icp_access allow all
visible_hostname Squid_on_CentOS4.4
acl beurat url_regex -i \.mpg$ \.mpeg$ \.avi$ \.dat$ \.3gp$ \.mov$ \.mp4$ \.flv$ \.mpe$ \.wmv$ \.m1v$ \.asf$ \.m2v$ \.div$ \.divx$ \.vob$ \.aob$
delay_pools 1
delay_class 1 1
delay_parameters 1 1000/36000
delay_access 1 allow beurat
delay_access 1 deny ALL
Jangan lupa untuk membuat satu file teks di /etc/squid/sex dan /etc/squid/bukansex. Kedua file ini untuk mengontrol website mana saja yang tidak boleh diakses (sex) dan pengecualian dr sex yaitu bukansex. Isi file sex adalah:
.*.(praline|eroticworld|orion).de
.*.(theorgy|penthousemag|1stsex|lolita|sexpix|sexshop).*
.*.(smutland|hustler.onprod|hustler2.onprod|cybervixen|asiansex).*
ftp.netcom.com/pub/ac/acott
tvtoday.de:9600
.*.(carolcox|eroticbodies).*
.*.(cyberlustxxx|cyberporn|intersex).inter.net*
.*.(eroticxxx|sexy4you|hotsex|kinky|lesbos|porno|xpics).*
.*.(over21|regsex|sexnet|sextoy|smeggy|sordid).*
.*.(cybersex|hcabaret|livesex|sex4you|sexmall).*
.*.(lovesexy|nastysex|pantless|playware|showgirl).*
.*.(2xxxcite|dreamsex|futuresex|sover21sex|explaza).*
.*.(xxxparadise|playbabe|celebnude|greyhawks|sexfinder|xxx-video).*
.*.(sexaphone|beate-uhse|fantasysex|sexparlor|sexnetwork).*
.*.(cybervixen|internetsex|silverotica|erotica2000|ultimatexxx).*
.*.(xxx-rawsex-xxx|amateurs|amateursweb|erotica-toys|orion-erotic).*
.*.(sexy-jewelry|hollywoodxxx|cybererotica|sexfantasy).*
.*.(sexy-playmates|nastyhabits|sugarandspice|kathryn).*
.*.(persiankitty|adultplayground|supernudes|playsex).*
.*.(pinupmall|porn.byus|smutland|sizzle|heavyhangers).*
.*.(hardcorjunky|fetish|adultplayhouse|pornpics|asiansex).*
.*.(hustler|freepics|wetgirls|tropixxx|sex|pixxxcity).*
.*.(4adultsonly|peepshow|voulezvous|rated-x|69pornplace).*
.*.(shavedsluts|nudepalace|xxxguide|pics-xxx|naughty|thehotzone).*
.*.(nervemag|carolcox|snatches|freeporn|playgirlmag|cyberspice).*
.*.(erotica|afro-erotica).*
(teen|girls|xxxpic).*
#======website block========
friendster.com
bangbrosnetwork.com
straightcollegemen.com
boycrush.com
hornyboy.com
jakecruise.com/main.php
boygangs.com
manjam.com
vivid.com
famousbabes.com
free.cclb1.com
hollycelebs.com
celebclub.com
gogocelebrities.com
supermodels4free.com
hollywood-exposed.net
celebboobs.com
softgalleries.com
topcelebs.com
cz7.clickzs.com
celebritypictures.com
nudecelebritypics.com
wild-will.com
nude-celebs-center.com
vrouwen.com
free-nude-rare-celebs.com
findaceleb.com
hqscan.net
penthouse.com
hot-centerfolds.com
freecenterfoldpictures.com
mystiquegalleries.com
beautybabes.com
gallery–i4229q4j.usercash.com
usercash.com
xlsite.com
adultnavigate.info
siantarboys.blogspot.com
plentyofvideos.com
foto-gadis.com
galeri-foto.com
coastwebcam.com
morenonamanis.com
gayasmara.com
hiperseks.com
angels-archive.com
thaicuties.com
tinypearls.com
gangbanghole.com
pantieupskirt.com
leftofme.com
babecams.tv
pantymix.com
utopia-asia.com
amateurmatch.com
#===========================proxy
filterhide.com
bestproxysites.com
topwebproxies.com
proxystuff.com
proxy
proxie
prox
sneakbypass.com
gopast.net
surfall.net
hidemyass.com
#===========kata2===========
celeb
fuck
nude
rsipceritaseru
kamasutra
xxx
kondom
temantapimesra
lesbi
homo
freeones
vicidi
bedclip
cipok
#porn
dudes
adult
bokep
bugil
toket
ngentot
onani
masturbasi
telanjang
vagina
#penis
#seks
gadis
perawan
sexy
#—–crack porno —-
mscracks.com
enormousdating.com
banners.passion.com
adtology2.com
crack-cd.com
#———————
content.dollarrevenue.com
ugnkm.the-kkk.com
mqbdg.mayapada.com
.*.(gay|sex).*
mimitmamat.blogspot.com
sqm.msn.com/
content.dollarrevenue.com
runonce.msn.com/runonce2.aspx
jacivelasquez.com/
content.dollarrevenue.com/keyboard25.exe
content.dollarrevenue.com/defender26.exe
windowsmedia.com
redir.windowsmedia.com
pramuria.net
download.adobe.com
windowsupdate.com
free.88square.com
favos.nl
artis.at
lalatx.com
kh.google.com
.*.fun.nl
playmen.it/
gisa.it/sex/
iol.it/sexol/
globall.com/j/xxx/
hh.nl/n-m/pic/
pi.net/~pauze/
oden.se/~hedback/
aau.diasoft.ru/~hotsex/
donsworld.com/xadultx/
well.com/user/sexymate/
ftp.zippo.com/pictures/erotica/
mm.iit.uni-miskolc.hu/Data/ladies/
drn.zippo.com/zippo-bin/wwwdecode/
pilot.msu.edu/user/rozwadow/pamela
#——manual——–
pageseeker.com
temantapimesra.com
indonona.com
exoticazza.com
dewasex.com
extrajos.com
bopekindo.com
sanggrahan.org
sanggrahan.com
grahan.com
vicidi.com
17tahun.com
ceritaseru.org
ceritapanas.com
celebdirectory.com
hiburan.web1000.com
seeasians.com
nyamuk.adultnations.com
nyamuk.com
duniasex.com
hanyalelaki.com
Untuk file bukansex isinya seperti ini:
.*.msexchange.*
.*.msexcel.*
.*freetown.*
.*geek-girls.*
.*scsext.*
missingheart
documen
button
wirelessexcite
msexchange
msexcel
aids.lv
freetown
geek-girls
scsext
steen
adulteducation
sekst
newshits
glass
georgia
peet
chicag
speech
speed
speedtest
liputan6.com
expedia.com
mail.yahoo.com
google.com
hanyawanita.com
nasyidkita.com
processexplorer
gaya
closex
www.daniweb.com
http://wallinux.blogspot.com
blok-porno
http://rapidshare.de
http://dl16.rapidshare.de
Apabila sudah selesai kita akan mengaktifkan squid dengan perintah :
/etc/init.d/squid start
Apabila sudah aktif squidnya maka restart aja squidnya dengan perintah:
/etc/init.d/squid restart
Sekarang bagaimana supaya dr eth1 bs meneruskan paket ke eth0. Untuk hal ini kita akan menggunakan iptable. Silahkan edit dulu :
vi /etc/sysctl.conf
Di baris net.ipv4.ip_forward = 0 silahkan rubah nilainya menjadi 1.
Dan ketik di konsole :
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A POSTROUTING -j MASQUERADE -t nat -s 192.168.10.0/24 -o eth0
iptables -t nat -p tcp -A PREROUTING -s 192.168.10.0/24 -d 0/0 –dport 80 -j REDIRECT –to-ports 3128
Skrip diatas agar paket yang diterima oleh eth1 diteruskan ke eth0, disini juga sudah termasuk server ini menjadi transparent proxy. Agar script ini selalu diload disetiap restart silahkan masukan di /etc/rc.d/init.d/ . Kalau saya script ini saya sertakan di /etc/rc.d/init.d/squid jadi pasti dijalankan setiap startup.
#!/bin/bash
# squid This shell script takes care of starting and stopping
# Squid Internet Object Cache
#
# chkconfig: – 90 25
# description: Squid – Internet Object Cache. Internet object caching is \
# a way to store requested Internet objects (i.e., data available \
# via the HTTP, FTP, and gopher protocols) on a system closer to the \
# requesting site than to the source. Web browsers can then use the \
# local Squid cache as a proxy HTTP server, reducing access time as \
# well as bandwidth consumption.
# pidfile: /var/run/squid.pid
# config: /etc/squid/squid.conf
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A POSTROUTING -j MASQUERADE -t nat -s 192.168.10.0/24 -o eth0
iptables -t nat -p tcp -A PREROUTING -s 192.168.10.0/24 -d 0/0 –dport 80 -j REDIRECT –to-ports 3128
PATH=/usr/bin:/sbin:/bin:/usr/sbin
export PATH
# Source function library.
. /etc/rc.d/init.d/functions
=========================================================
Kita cek lagi apakah squidnya sudah jalan. Kita cek dari komputer lain dengan konfigurasi jaringannya:
IP Address : 192.168.10.x
Subnet : 255.255.255.0
Gateway : 192.168.10.46 (ip eth1 server)
Dns : 202.134.2.5 dan 203.130.169.5
Trus apakah proxy klient harus kita setting? Jawabannya tidak karena server kita sudah menggunakan transparent proxy.
Langkah selanjutnya adalah untuk setting sarg (Squid Analisys Report Generator) agar pemantauan log lebih mudah.
Sebelum kita install sarg kita pastikan dulu kalo service apache bs dijalankan
/etc/init.d/httpd start
Kemudian kita browse server kita:
192.168.10.222
Kalau tampil pesan dari apache berarti sudah terinstall dengan baik:
Ok agar welcome screen ini tidak selalu muncul maka edit file /etc/httpd/conf.d/welcome.conf, comment (#) semua isi file tersebut. Sehingga menjadi:
#
# This configuration file enables the default “Welcome”
# page if there is no default index page present for
# the root URL. To disable the Welcome page, comment
# out all the lines below.
#
#<LocationMatch “^/+$”>
# Options -Indexes
# ErrorDocument 403 /error/noindex.html
#</LocationMatch>
Ok, kita lihat dulu service httpd ini apakah sudah di onkan sebagai service kita lihat menggunakan chkconfig –list
Kita akan mendapatkan pesan seperti ini:
nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
mdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off
readahead_early 0:off 1:off 2:off 3:off 4:off 5:on 6:off
pcmcia 0:off 1:off 2:on 3:on 4:on 5:on 6:off
smartd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rawdevices 0:off 1:off 2:off 3:on 4:on 5:on 6:off
vncserver 0:off 1:off 2:off 3:off 4:off 5:off 6:off
bluetooth 0:off 1:off 2:off 3:off 4:off 5:off 6:off
named 0:off 1:off 2:off 3:off 4:off 5:off 6:off
isdn 0:off 1:off 2:on 3:on 4:on 5:on 6:off
dovecot 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rpcgssd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
diskdump 0:off 1:off 2:off 3:off 4:off 5:off 6:off
netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
xfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
portmap 0:off 1:off 2:off 3:on 4:on 5:on 6:off
netplugd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
irqbalance 0:off 1:off 2:off 3:on 4:on 5:on 6:off
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
acpid 0:off 1:off 2:off 3:on 4:on 5:on 6:off
dc_server 0:off 1:off 2:off 3:off 4:off 5:off 6:off
NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off
smb 0:off 1:off 2:off 3:off 4:off 5:off 6:off
readahead 0:off 1:off 2:off 3:off 4:off 5:on 6:off
rhnsd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off
tux 0:off 1:off 2:off 3:off 4:off 5:off 6:off
anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off
netdump 0:off 1:off 2:off 3:off 4:off 5:off 6:off
winbind 0:off 1:off 2:off 3:off 4:off 5:off 6:off
auditd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
mdmpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
cups 0:off 1:off 2:on 3:on 4:on 5:on 6:off
xinetd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
saslauthd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
microcode_ctl 0:off 1:off 2:on 3:on 4:on 5:on 6:off
messagebus 0:off 1:off 2:off 3:on 4:on 5:on 6:off
kudzu 0:off 1:off 2:off 3:on 4:on 5:on 6:off
autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off
dc_client 0:off 1:off 2:off 3:off 4:off 5:off 6:off
syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
ypbind 0:off 1:off 2:off 3:off 4:off 5:off 6:off
apmd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
nscd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
gpm 0:off 1:off 2:on 3:on 4:on 5:on 6:off
spamassassin 0:off 1:off 2:off 3:off 4:off 5:off 6:off
irda 0:off 1:off 2:off 3:off 4:off 5:off 6:off
cpuspeed 0:off 1:on 2:on 3:on 4:on 5:on 6:off
psacct 0:off 1:off 2:off 3:off 4:off 5:off 6:off
vsftpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
yum 0:off 1:off 2:off 3:off 4:off 5:off 6:off
ntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
squid 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rpcidmapd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
haldaemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off
atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
xinetd based services:
cups-lpd: off
daytime: off
eklogin: off
chargen-udp: off
echo-udp: off
time: off
time-udp: off
rsync: off
chargen: off
echo: off
klogin: off
daytime-udp: off
gssftp: off
kshell: off
krb5-telnet: off
[root@internetku ~]#
Jika masih off maka kita harus onkan dengan perintah: chkconfig httpd on
Install and Configure SARG to report against Dansguardian log files on CentOS
Go back to the main project page
By this point, you should already have DansGuardian and Squid cache installed, configured, and tested. If not, please visit the Open Source Web Content Filtering Project page to finish that part of the setup.
There is other settings I’m looking into with regards to DansGuardian. This is just a rough way to get SARG up and reporting.
Install Apache
<!–[if !supportLists]–>· <!–[endif]–>yum install httpd – install Apache if not already installed (sudah terinstall)
Add ports to firewall
<!–[if !supportLists]–>· <!–[endif]–>You may need to add a firewall rule to allow port 80
<!–[if !supportLists]–>· <!–[endif]–>vi /etc/sysconfig/iptables – add the following lines, if they don’t already exist
<!–[if !supportLists]–>· <!–[endif]–>-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
Install SARG
<!–[if !supportLists]–>· <!–[endif]–>cd /usr/src – optional, this is just where I like to keep the source archives
<!–[if !supportLists]–>· <!–[endif]–>wget http://dag.wieers.com/rpm/packages/sarg/sarg-2.2.1-1.el4.rf.i386.rpm – download the SARG rpm to your /usr/src folder
<!–[if !supportLists]–>· <!–[endif]–>yum install gd gd-devel (ini harus, ga lama kok)
<!–[if !supportLists]–>· <!–[endif]–>rpm -i /usr/src/sarg-2.2.1-1.el4.rf.i386.rpm – install SARG using the Red Hat Package manager
<!–[if !supportLists]–>· <!–[endif]–>vi /etc/httpd/conf.d/sarg.conf
<!–[if !supportLists]–>· <!–[endif]–>add an additional Allow from line for each computer you want to be able to see the reports, or comment out the Deny from all, and Allow from lines to give access to all.
Configure DansGuardian and SARG to work with each other
<!–[if !supportLists]–>· <!–[endif]–>vi /etc/dansguardian/dansguardian.conf
<!–[if !supportLists]–>· <!–[endif]–>change the setting logfileformat to equal 3 – sets DansGuardian to log in squid log file format
<!–[if !supportLists]–>· <!–[endif]–>:wq – save the changes to the file and quit
<!–[if !supportLists]–>· <!–[endif]–>vi /etc/sarg/sarg.conf
<!–[if !supportLists]–>· <!–[endif]–>output_dir /var/www/html/squid-reports
<!–[if !supportLists]–>· <!–[endif]–>#output_dir /var/www/sarg/ONE-SHOT
<!–[if !supportLists]–>· <!–[endif]–>change the setting access_log to point to your dansguardian logs. Under default settings, it should be /var/log/dansguardian/access.log
<!–[if !supportLists]–>· <!–[endif]–>change any other settings you want to change
<!–[if !supportLists]–>· <!–[endif]–>:wq – save the changes to the file and quit
<!–[if !supportLists]–>· <!–[endif]–>Check the sarg scripts in the cron folders. You will need to make some changes to point to the DansGuardian log files
<!–[if !supportLists]–>· <!–[endif]–>vi /etc/cron.daily/sarg – really no changes here
<!–[if !supportLists]–>· <!–[endif]–>vi /etc/cron.weekly/sarg – change the log file paths to the path of your DansGuardian log files
<!–[if !supportLists]–>· <!–[endif]–>vi /etc/cron.monthly/sarg – change the log file paths to the path of your DansGuardian log files
<!–[if !supportLists]–>· <!–[endif]–>/usr/bin/sarg – run sarg to create a ONE-SHOT report
Start Apache
<!–[if !supportLists]–>· <!–[endif]–>/etc/init.d/httpd start – Start Apache
Test Configuration
<!–[if !supportLists]–>· <!–[endif]–>browse to your DansGuardian machine using your favorite internet browser. You will have to add /sarg to the end of the url. (ex. http://192.168.0.1/sarg Check to make sure the ONE-SHOT report was generated.
<!–[if !supportLists]–>· <!–[endif]–>wait for the cron jobs to run and generate the rest of the reports
Done

11 July, 2007 at 4:02 am
hi, saya menemui kesulitan saat menjalankan squid,saya sudah mengikuti semua yang ada disini sampai bagian restart squid tapi gagal. Ada pesan seperti berikut
squid failed. The error was: init_cache_dir /cache… Starting squid: ………………..[FAILED]
bisakah anda berikan saran untuk saya, kira2 apa yang salah. Trima kasih
11 August, 2007 at 12:05 pm
liat permission untuk /cache, biasanya masih root
chown squid:squid /cache
squid -z
service squid restart
Semoga berhasil *CLink*
6 November, 2007 at 3:31 pm
Ni dia konfigurasi yag saya cari-cari ,,,,,saya coba ya massss..eh ia dhcp client nya gimana??? bisa langsung setting via proxy nga::: nowbe bgt ni…makasih.
NB : kasi gamb dong urutan dari wan hingga ke client
25 July, 2008 at 3:23 am
thanks ya udh memberitahu KAn bgm cr config http://ftp.bgm aku mau download file nya
sipa tau aku lUpa
2 October, 2008 at 3:35 am
sya selalu bingung dengan scrip2 yang da cintos,apakah saya bsa mndapatkan manual book nya,,,,,