SEBUAT CATATAN, TUK KASIH INGA...MAKE ALL BE FINE...JANG BOSEN2 DATANG SINI HE BROOOO!

===

Squid Proxy FreeBSD 8.2


login:root
password:mfsroot
gpart show
gpart delete -i 3 ad0
gpart delete -i 2 ad0
gpart delete -i 1 ad0
gpart destroy ad0
mount_cd9660 /dev/acd0 /media
#untuk memastikan system sudah membaca isi CDROM lakukan cek seperti ini:
ls /media
#seharusnya disitu sudah ada file 8.2-RELEASE-i386.tar.xz . lalu siap melakukan eksekusi script zfsnya :
zfsinstall -d /dev/ad0 -t /media/8.2-RELEASE-i386.tar.xz -s 4G -V 28
chroot /mnt
passwd root < === enter a new password
#sampai saat ini anda sudah berhasil menginstall filesystem zfs pada root freebsd dan langkah selanjutnya adalah menyetting dasar freebsd seperti ip addres host ssh dll,
echo ‘squid_enable=”YES”‘ >> /etc/rc.conf
echo ‘defaultrouter=”172.16.0.1″‘ >> /etc/rc.conf
echo ‘gateway_enable=”YES”‘ >> /etc/rc.conf
echo ‘hostname=”teknetplus”‘ >> /etc/rc.conf
echo ‘ifconfig_re0=”inet 192.168.3.1 netmask 255.255.255.0″‘ >> /etc/rc.conf
echo ‘sshd_enable=”YES”‘ >> /etc/rc.conf
echo ‘nameserver 192.168.3.1 ‘ >> /etc/resolv.conf
SET PC FREEBSD AGAR BS DI REMOTE VIA (PUTTY/WINSCP)
# ee /etc/ssh/sshd_config (CARI DAN GANTILAH)
#Port 22ganti menjadi Port 22
#PermitRootLogin no ganti menjadi PermitRootLogin yes
#PasswordAuthentication no ganti menjadi PasswordAuthentication yes
SETELAH SELESAI TEKAN ESC TERUS ENTER 2x
exit dan keluarkan dulu cd bsd nya kemudian
reboot
download paket ports
atau pakai perintah berikut:
cd /usr
fetch ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz
tar zxvf ports.tar.gz
rm ports.tar.gz
UPDATE PORTS
# portsnap fetch update
Langkah selanjutnya install perl VIA PORTS
#pkg_add -v -r perl
cek apakah perl sudah terinstall dengan perintah:
#perl -v
install ccze dg perintah berikut:
melalui ports>>>
To install the port: cd /usr/ports/sysutils/ccze/ && make install clean
download paket>>>
To add the package: pkg_add -r ccze
make install clean
install nano>>>
pkg_add -r nano
Download SQUID LUSCA_FMI melalui terminal bsd dg perintah berikut:
#fetch http://untuk-kita-semua.googlecode.com/files/LUSCA_FMI.tar.gz
lalu ekstrak dan masuk ke foldernya :
# tar xzvf LUSCA_FMI.tar.gz
# cd LUSCA_FMI/
sekarang dimulai tahap compile nya :
# make clean
./configure –prefix=/usr –exec-prefix=/usr –bindir=/usr/local/bin –sbindir=/usr/local/sbin –sysconfdir=/usr/local/etc/squid –datadir=/usr/local/etc/squid –libexecdir=/usr/local/libexec/squid –localstatedir=/var/log/squid –enable-removal-policies=heap –enable-digest-auth-helpers=password –with-pthreads –enable-async-io=24 –with-aufs-threads=24 –enable-storeio=aufs –disable-ident-lookups –with-aio –with-dl –enable-delay-pools –enable-snmp –enable-htcp –enable-cache-digests –disable-unlinkd –disable-wccp –enable-useragent-log –enable-http-violations –enable-arp-acl –enable-pf-transparent –with-large-files –enable-large-cache-files –enable-err-languages=English –enable-default-err-language=English –with-maxfd=65536
# make && make install
# rehash
buat partisi cache untuk proxy lusca
# zfs create -o atime=off tank/root/cache-1
# zfs create -o atime=off tank/root/cache-2
cek kembali apakah zfs /cache-1 dan /cache-2 sudah terbentuk dengan perintah df -h atau zfs list
# touch /var/log/squid/access.log
# touch /var/log/squid/cache.log
# chown -R proxy:proxy /var/log/squid/*
# chown -R proxy:proxy /cache-*
chmod 777 /cache-1
* kopi file squid.conf ke /usr/local/etc/squid dan storeurl.pl ke /usr/local/etc/squid/ dan squid.sh ke /usr/local/etc/rc.d/ menggunakan winscp
mv /tmp/squid.conf /usr/local/etc/squid/squid.conf
mv /tmp/storeurl.pl /usr/local/etc/squid/storeurl.pl
mv /tmp/squid.sh /usr/local/etc/rc.d/squid.sh
* edit squid.conf dan sesuaikan dengan kebutuhan jaringan anda
#ee /usr/local/etc/squid/squid.conf
cache_dir aufs /cache-1 32768 78 256
beri permission pada file2 tadi
chown proxy:proxy /usr/local/etc/squid/storeurl.pl
chmod +x /usr/local/etc/squid/storeurl.pl
chown proxy:proxy /usr/local/etc/squid/squid.conf
chmod +x /usr/local/etc/squid/squid.conf
chown proxy:proxy /usr/local/etc/rc.d/squid.sh
chmod +x /usr/local/etc/rc.d/squid.sh
chmod 777 /usr/local/etc/rc.d/squid.sh
#chmod +x /usr/local/sbin/squid
<<<<<cek konfig squid>>>>>
squid -k parse
<<<<<membuat swap squid>>>>>
squid -f /usr/local/etc/squid/squid.conf -z
<<<<<menjalankan squid>>>>>
/usr/local/sbin/squid -DF
/usr/local/sbin/squid -NCd1
reboot
<<<<<restart squid>>>>>
/usr/local/sbin/squid -k reconfigure
<<<<<stop squid>>>>>
/usr/local/sbin/squid -k shutdown
cp /usr/local/sbin/squid /usr/local/etc/rc.d/squid
=======================================================================================================
TEST PROXY
++++++++++++++++http://proxy.jaringanwarnet.com/+++++++++++++++++++++++++
tail -f /var/log/squid/access.log | ccze
squidclient mgr:info
 

Limited Download Unlimited Browsing

Selama ini banyak sekali warnet dan game center yang mengeluhkan koneksi menjadi lambat apabila ada salah satu atau beberapa pelanggan mendownload file dalam ukuran besar, apalagi menggunakan aplikasi download acclerator seperti IDM. Namun kita tidak perlu khawatir, kita bisa mencoba menerapkan bandwith manajer Mikrotik untuk melimit file file download saja, supaya akses selain download tidak terganggu aktivitasnya.

 CONTOH KASUS :
 WARNET BANDWITH TOTAL= 1024 kbps
JUMLAH CPU = 10 Cpu
TANPA PROXY SERVER
ETHER 1 = PUBLIK
ETHER 2 = LOCAL
KELUHAN :
APABILA DITERAPKAN LIMIT PER IP JIKA SEDANG DOWNLOAD.. AKSES BROWSINGNYA MELAMBAT

SOLUSI :
PISAHKAN TRAFFIC DOWNLOAD LALU BATASI.. DAN TRAFFIC LAINNYA DIBEBASKAN.
Mari Kita Mulai :

1. Buat Conn Mark
WINBOX > IP > FIREWALL > MANGLE>
[+] ADD NEW
chain = forward
protocol = TCP(16)
in interface = ETHER 1
out interface = ETHER 2
(masuk ke TAB advance)
connection bytes = 262146-4294967295 ( artinya batas file ter kecil yang kena filter 256kb)
(masuk TAB action)
Action = mark connection
New Connection Mark = Download
Passtrough = [V] <- centang

2. Buat Packet Mark
[+] ADD NEW
chain = forward
protocol = TCP(16)
in interface = ETHER 1
out interface = ETHER 2
Connection Mark = Download
(masuk TAB action)
Action = mark packet
New Packet Mark = Download

3. Buat Queue Type
WINBOX > QUEUES > QUEUE TYPES
[+] ADD NEW
name = shape
kind = pcq
( pindah tab setting )
rate = 256000 <- kita batasi Download hanya di 256kbps…
limit dan total limit biarin tetep..
clasifier = dst. Address [v] <– centang

4.Buat Queue Tree
WINBOX > QUEUES > QUEUE TREE
[+] ADD NEW
name = Download
parent = global out
packet mark = Download
queue type = shape
max limit = 256000

5. SELESAI
 
 
Support : Creating Website | KOD Template | FTemplates
Copyright © 2011. CATATAN TOFA - All Rights Reserved
Modificated by KOD Tutor | Portal Informasi Online
Proudly powered by Blogger