Langkah Ke 1
Edit kernel di /usr/src/sys/i386/conf dan tambahkan option dibawah ini :
device pf
device pflog
device pfsync
Dan tambahkan ini Untuk Shapping trafic
options ALTQ
options ALTQ_CBQ
options ALTQ_RED
options ALTQ_RIO
options ALTQ_HFSC
options ALTQ_CDNR
options ALTQ_PRIQ
Langkah 2
edit rc.conf dan tambahkan script ini:
pf_enable=”YES”
pf_rules=”/etc/pf.conf”
pflogd_enable=”YES”
pflog_logfile=”/var/log/pflog”
logfilepflog_flags=”"
Langkah 3
Edit script pf.conf seperti contoh dibawah ini, tapi sesuaikan dengan network anda :
ext_if=”fxp0"
int_if="fxp1"
comp_1="192.168.0.11"
comp_2="192.168.0.12"
comp_3="192.168.0.13"
### alias bandwithaaa="20Kb" ##realtime --> flat bwdbbb=”8Kb” ##linkshare –> untuk bw rebutanccc=”24Kb” ##upperlimit –> maksimal
altq on $int_if hfsc bandwidth 10Mb queue { isp, stdq }
queue isp bandwidth 1024Kb hfsc (default)
queue stdq bandwidth 1024Kb hfsc ( realtime 128Kb upperlimit 128Kb )\
{ comp_1, comp_2, comp_3 }
queue comp_1 bandwidth $aaa hfsc ( realtime $aaa linkshare $bbb \
upperlimit $ccc ) priority 6 qlimit 100
queue comp_2 bandwidth $aaa hfsc ( realtime $aaa linkshare $bbb \
upperlimit $ccc ) priority 6 qlimit 100
queue comp_3 bandwidth $aaa hfsc ( realtime $aaa linkshare $bbb \
upperlimit $ccc ) priority 6 qlimit 100
nat on $ext_if from 192.168.0.0/24 to any -> ($ext_if)
rdr on $int_if proto tcp from any to any port 80 -> ip-proxy port 3128 –> boleh gak
di pakai
## Configurasi Shapping untuk Upstream ##
pass in on $int_if from $comp_1 to any keep state queue comp_1
pass in on $int_if from $comp_2 to any keep state queue comp_2
pass in on $int_if from $comp_3 to any keep state queue comp_3
## Configurasi Shapping untuk Downstream ##
pass out on $int_if from any to $comp_1 keep state queue comp_1
pass out on $int_if from any to $comp_2 keep state queue comp_2
pass out on $int_if from any to $comp_3 keep state queue comp_3
# Seleseai
Berikutnya test dengan
root# pfctl -e
root# pfctl -Fn -Nf /etc/pf.conf
source : http://www.reogcity.com
Senin, 01 Desember 2008
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar