bahan :
- RB750 VER 4.9
- 2 Line Speedy Paket Office
- Ubuntu Versi 10.04
SISI MIKROTIK :
/ip adrress
- 172.19.196.1/24 interface proxy
- 192.168.88.1/24 interface lan
- 192.168.1.1/24 interface modem-1
- 192.168.2.1/24 interface modem-2
catatan : - dial lewat mikrotik dgn modem sbg brigde
- ip mesin ubuntu 172.19.196.100
PROXY HIT
/ip firewall mangle
add action=mark-packet chain=prerouting comment=proxy-hit disabled=no dscp=12 \
new-packet-mark=proxy-hit passthrough=yes
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=HIT packet-mark=proxy-hit parent=global-out priority=1 \
queue=default
PCC RULE MARK ALL PPPoE CONN
/ip firewall mangle
add action=mark-connection chain=input comment=\
"PCC RULE ---- MARK ALL PPPoE CONN" connection-state=new disabled=no \
in-interface=pppoe_1 new-connection-mark=pppoe1_conn passthrough=yes
add action=mark-connection chain=input comment="" connection-state=new \
disabled=no in-interface=pppoe_2 new-connection-mark=pppoe2_conn \
passthrough=yes
add action=mark-connection chain=prerouting comment="" connection-state=\
established disabled=no in-interface=pppoe_1 new-connection-mark=\
pppoe1_conn passthrough=yes
add action=mark-connection chain=prerouting comment="" connection-state=\
established disabled=no in-interface=pppoe_2 new-connection-mark=\
pppoe2_conn passthrough=yes
add action=mark-connection chain=prerouting comment="" connection-state=\
related disabled=no in-interface=pppoe_1 new-connection-mark=pppoe1_conn \
passthrough=yes
add action=mark-connection chain=prerouting comment="" connection-state=\
related disabled=no in-interface=pppoe_2 new-connection-mark=pppoe2_conn \
passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=pppoe1_conn \
disabled=no new-routing-mark=pppoe_1 passthrough=no
add action=mark-routing chain=output comment="" connection-mark=pppoe2_conn \
disabled=no new-routing-mark=pppoe_2 passthrough=no
PCC RULE MARK NON HTTP CONN
/ip firewall mangle
add action=mark-connection chain=prerouting comment=\
"PCC RULE ---- MARK - NON -HTTP CONN" connection-state=established \
disabled=no dst-address-type=!local dst-port=!80 in-interface=lan \
new-connection-mark=non.http_pppoe_1 passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/0 protocol=tcp
add action=mark-connection chain=prerouting comment="" connection-state=\
established disabled=no dst-address-type=!local dst-port=!80 \
in-interface=lan new-connection-mark=non.http_pppoe_2 passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/1 protocol=tcp
add action=mark-connection chain=prerouting comment="" connection-state=\
related disabled=no dst-address-type=!local dst-port=!80 in-interface=lan \
new-connection-mark=non.http_pppoe_1 passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/0 protocol=tcp
add action=mark-connection chain=prerouting comment="" connection-state=\
related disabled=no dst-address-type=!local dst-port=!80 in-interface=lan \
new-connection-mark=non.http_pppoe_2 passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/1 protocol=tcp
add action=mark-connection chain=prerouting comment="" connection-state=\
established disabled=no dst-address-type=!local in-interface=lan \
new-connection-mark=non.http_pppoe_1 passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/0 protocol=udp
add action=mark-connection chain=prerouting comment="" connection-state=\
established disabled=no dst-address-type=!local in-interface=lan \
new-connection-mark=non.http_pppoe_2 passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/1 protocol=udp
add action=mark-connection chain=prerouting comment="" connection-state=\
related disabled=no dst-address-type=!local in-interface=lan \
new-connection-mark=non.http_pppoe_1 passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/0 protocol=udp
add action=mark-connection chain=prerouting comment="" connection-state=\
related disabled=no dst-address-type=!local in-interface=lan \
new-connection-mark=non.http_pppoe_2 passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/1 protocol=udp
PCC RULE MARK HTTP dan NON HTTP ROUTE
/ip firewall mangle
add action=mark-routing chain=prerouting comment=\
"PCC RULE ---- MARK - HTTP ROUTE" connection-mark=http_pppoe_1 disabled=\
no new-routing-mark=pppoe_1 passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=\
http_pppoe_2 disabled=no new-routing-mark=pppoe_2 passthrough=yes
add action=mark-routing chain=prerouting comment=\
"PCC RULE MARK NON HTTP ROUTE" connection-mark=non.http_pppoe_1 \
disabled=no new-routing-mark=pppoe_1 passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=\
non.http_pppoe_2 disabled=no new-routing-mark=pppoe_2 passthrough=yes
NAT
/ip firewall nat
add action=masquerade chain=srcnat comment=MASQUERADE1 disabled=no \
out-interface=pppoe_1
add action=masquerade chain=srcnat comment=MASQUERADE2 disabled=no \
out-interface=pppoe_2
add action=masquerade chain=srcnat comment=MASQUERADE3 disabled=no \
out-interface=proxy
add action=dst-nat chain=dstnat comment=TRANSPARENT-DNS disabled=no dst-port=\
53 in-interface=lan protocol=udp to-ports=53
add action=dst-nat chain=dstnat comment="" disabled=no dst-port=53 \
in-interface=lan protocol=tcp to-ports=53
add action=dst-nat chain=dstnat comment="" disabled=no dst-port=53 \
in-interface=proxy protocol=udp to-ports=53
add action=dst-nat chain=dstnat comment="" disabled=no dst-port=53 \
in-interface=proxy protocol=tcp to-ports=53
add action=dst-nat chain=dstnat comment=TRANSPARENT-proxy disabled=no \
dst-address-list=!proxyNET dst-port=80,8080,3128 in-interface=lan \
protocol=tcp to-addresses=172.19.196.100 to-ports=3128
add action=dst-nat chain=dstnat comment="REMOTE PROXY" disabled=no \
dst-address=125.165.40.xxx dst-port=22 protocol=tcp to-addresses=\
172.19.196.100 to-ports=22
ADDRESS LIST
/ip firewall address-list
add address=192.168.88.0/24 comment="" disabled=no list=lanNET
add address=172.19.196.0/24 comment="" disabled=no list=proxyNET
ROUTE
/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
pppoe_1 routing-mark=pppoe_1 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
pppoe_2 routing-mark=pppoe_2 scope=30 target-scope=10
add check-gateway=ping comment=Default-Route-pppoe1-Distance-1 disabled=no \
distance=1 dst-address=0.0.0.0/0 gateway=pppoe_1 scope=30 target-scope=10
add check-gateway=ping comment=Default-Route-pppoe2-Distance-2 disabled=no \
distance=2 dst-address=0.0.0.0/0 gateway=pppoe_2 scope=30 target-scope=10
Kita lanjut pada sisi proxy-nya
Partisi HDD
Dari harddisk 160Gb dibagi sebagai berikut:
/boot 1Gb ext4 Boot Flag Boot
/ 3Gb ext4 System
/usr 4Gb ext4 Static Variable
/var 4Gb ext4 Variable
swap 1Gb swap (1 x besaran RAM)
/home/proxy1 10 Gb /ReiserFS
/home/proxy2 10 Gb /ReiserFS
/home/proxy3 10 Gb /ReiserFS
/home/share (sisanya) ext4 Share Documents
Install Paket
- sudo apt-get update
- sudo apt-get install squid
- sudo apt-get install squid squidclient squid-cgi
- sudo apt-get install ccze
setelah selesai install paket lakukan edit squid.conf
dgn lokasi : /etc/squid/squid.conf
menjadi :
SQUID.CONF
#-----------------------------------#
# Proxy Server Versi 2.7.Stable6
# by teukurizal@yahoo.com.sg
# update 11 Juni 2010
#-----------------------------------#
#---------------------------------------------------------------#
# Port
#---------------------------------------------------------------#
http_port 3128 transparent
icp_port 3130
prefer_direct off
#---------------------------------------------------------------#
# Mengatasi Facebook Blank setelah login
#---------------------------------------------------------------#
server_http11 on
#---------------------------------------------------------------#
# Cache & Object
#---------------------------------------------------------------#
cache_mem 8 MB
cache_swap_low 98
cache_swap_high 99
max_filedesc 8192
maximum_object_size 128 MB
minimum_object_size 0 KB
maximum_object_size_in_memory 128 KB
ipcache_size 10240
ipcache_low 98
ipcache_high 99
fqdncache_size 4096
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
#----------------------------------------------------------------#
# cache_dir
#----------------------------------------------------------------#
cache_dir aufs /home/proxy1 7000 16 256
cache_dir aufs /home/proxy2 7000 16 256
cache_dir aufs /home/proxy3 7000 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
pid_filename /var/run/squid.pid
cache_swap_log /var/log/squid/swap.state
dns_nameservers /etc/resolv.conf
emulate_httpd_log off
hosts_file /etc/hosts
half_closed_clients off
negative_ttl 1 minutes
#---------------------------------------------------------------#
# Rules: Safe Port
#---------------------------------------------------------------#
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 to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 873 # https snews rsync
acl Safe_ports port 80 # http
acl Safe_ports port 20 21 # ftp
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 631 # cups
acl Safe_ports port 10000 # webmin
acl Safe_ports port 901 # SWAT
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 873 # rsync
acl Safe_ports port 110 # POP3
acl Safe_ports port 25 # SMTP
acl Safe_ports port 2095 2096 # webmail from cpanel
acl Safe_ports port 2082 2083 # cpanel
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports !SSL_ports
http_access deny CONNECT !SSL_ports !Safe_ports
#---------------------------------------------------------------#
# Refresh Pattern
#---------------------------------------------------------------#
# pictures & images
refresh_pattern -i \.(gif|png|jpeg|jpg|bmp|tif|tiff|ico)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-private
refresh_pattern -i \.(xml|html|htm|js|txt|css|php)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth
#sound, video multimedia
refresh_pattern -i \.(flv|x-flv|mov|avi|qt|mpg|mpeg|swf)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache
refresh_pattern -i \.(wav|mp3|mp4|au|mid)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-private
# files
refresh_pattern -i \.(iso|deb|rpm|zip|tar|tgz|ram|rar|bin|ppt|doc)$ 10080 90% 43200 ignore-no-cache ignore-auth
refresh_pattern -i \.(zip|gz|arj|lha|lzh)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth
refresh_pattern -i \.(rar|tgz|tar|exe|bin)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth
refresh_pattern -i \.(hqx|pdf|rtf|doc|swf)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth
refresh_pattern -i \.(inc|cab|ad|txt|dll)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth
# -- refresh pattern for specific sites -- #
refresh_pattern ^http://*.jobstreet.com.*/.* 720 100% 10080 override-expire override-lastmod ignore-no-cache
refresh_pattern ^http://*.indowebster.com.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth
refresh_pattern ^http://*.21cineplex.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth
refresh_pattern ^http://*.atmajaya.*/.* 720 100% 10080 override-expire ignore-no-cache ignore-auth
refresh_pattern ^http://*.kompas.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.theinquirer.*/.* 720 100% 10080 override-expire ignore-no-cache ignore-auth
refresh_pattern ^http://*.blogspot.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.wordpress.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache
refresh_pattern ^http://*.photobucket.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.tinypic.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.imageshack.us/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.kaskus.*/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://www.kaskus.com/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.detik.*/.* 720 50% 2880 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.detiknews.*/*.* 720 50% 2880 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://video.liputan6.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://static.liputan6.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.friendster.com/.* 720 100% 10080 override-expire override-lastmod ignore-no-cache ignore-auth
refresh_pattern ^http://*.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://apps.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://profile.ak.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://static.playspoon.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://cooking.game.playspoon.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern -i http://[^a-z\.]*onemanga\.com/? 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://media?.onemanga.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.yahoo.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.google.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.forummikrotik.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.linux.or.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#default option
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
#---------------------------------------------------------------#
# ALLOWED ACCESS
#---------------------------------------------------------------#
acl proxyku src 172.19.196.0/24
http_access allow proxyku
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow proxyku
icp_access allow localhost
icp_access deny all
always_direct deny all
#---------------------------------------------------------------#
# Cache CGI & Administrative
#---------------------------------------------------------------#
cache_mgr teukurizal@yahoo.com.sg
visible_hostname dns.proxyku.net
cache_effective_user proxy
cache_effective_group proxy
coredump_dir /var/spool/squid
shutdown_lifetime 10 seconds
logfile_rotate 14
#-----------------------------------------------------------------#
#tcp_outgoing_tos 0x30 localnet
#-----------------------------------------------------------------#
zph_mode tos
zph_local 0x30
zph_parent 0
zph_option 136
Langkah berikut nya :
stop squid dgn perintah "squid stop"
Memberikan permission pada folder cache
chown -R proxy.proxy /home/proxy
chown proxy.proxy /var/log/squid/access.log
Membuat folder-folder swap/cache di dalam folder cache yang telah ditentukan
squid -f /etc/squid/squid.conf -z
Restart squid.
squid restart
Demikian tutorial ini semoga bermanfaat... !!!
Source : http://www.forummikrotik.com/tutorial/12842-load-balancing-proxy-eksternal-game-poker-and-poinblank-lancar.html#post141922
Load Balancing + Proxy Eksternal (Game Poker & Poinblank LANCAR...!!)
Proxy Eksternal dengan Ubuntu untuk Pemula
Langkah demi langkah
MASUKKAN CD UBUNTU KE CDROM DAN REBOOT KOMPUTERNYA " hehehe.....
‘- Pilih language english (enter)
‘- Pilih instal ubuntu server (enter)
‘ -Tekan enter pada choose langguage english
‘- Pilih united states
‘- Klik no pada detect keyboard layout?
‘- Klik USA pada ubuntu installer main menu
‘- Klik USA pada keyboard layout
‘- Klik continue pada configure the network
‘- Pilih configure network manually isi ip address dg 172.19.196.100 pilih continue enter
‘- Netmask 255.255.255.0 pilih continue enter
‘- Gateway 172.19.196.1 terus klik continue
‘- Name server addresses 172.19.196.1 pilih continue enter
‘- Hotsnama : isi dg proxyku terus pilih continue enter
‘- Domain name: di kosongin saja, pilih continue enter
‘- Pada configure the clok pilih select from worldwide list terus cari jakarta terus enter
‘- Pada menu partition disk pilih manual
‘- Kita hapus partisi lama dulu :
‘-Pilih partisi nya terus enter pilih delete the partion (ulangi perintah ini untuk semua partisi yg tersisa)
‘-Jika telah selesai pilih Guided partitioning, kemudian pilih manual arahkan pada FREE SPACE (enter),
‘- Pilih Create new partition (enter)
New partition size isi 1 GB (pilih continue dan enter), pilih Primary (enter), pilih Beginning (enter), pada Mount point pilih /boot (enter), pd mount option pilih[*] noatime (pilih continue dan enter), pada Bootable Flag rubah menjadi on kemudian pilih done setting up the partition
Arahkan pada FREE SPACE (enter), pilih Create new partition (enter ) new partition size isi 4 GB (pilih continue dan enter), pilih Logikal (enter), pilih Beginning (enter), pada Mount point pilih / (enter), pd mount option pilih[*] noatime (pilih continue dan enter), kemudian Pilih done setting up the partition
Arahkan pada FREE SPACE (enter), pilih Create new partition (enter) new partition size isi 4 GB (pilih continue dan enter), pilih Logikal (enter), pilih Beginning (enter), pada Mount point pilih /usr (enter), pd mount option pilih[*] noatime (pilih continue dan enter), kemudian Pilih done setting up the partition
Arahkan pada FREE SPACE (enter), pilih Create new partition (enter) new partition size isi 4 GB (pilih continue dan enter), pilih Logikal (enter), pilih Beginning (enter), pada Mount point pilih /var (enter), pd mount option pilih[*] noatime (pilih continue dan enter), kemudian Pilih done setting up the partition
Arahkan pada FREE SPACE (enter), pilih Create new partition (enter) new partition size isi 1 GB (pilih continue dan enter), pilih Logikal (enter), pilih Beginning (enter), pada use as pilih swap area (enter), kemudian Pilih done setting up the partition
Arahkan pada FREE SPACE (enter),
pilih Create new partition (enter) new partition size isi 10 GB (pilih continue dan enter), pilih Logikal (enter), pilih Beginning (enter), pada use as pilih reiserFS (enter), pada Moun point enter manually buat menjadi /home/proxy1, pd mount option pilih[*] noatime dan[*] notail kemudian Pilih continue dan done setting up the partition
Arahkan pada FREE SPACE (enter),
pilih Create new partition (enter) new partition size isi 10 GB (pilih continue dan enter), pilih Logikal (enter), pilih Beginning (enter), pada use as pilih reiserFS (enter), pada Moun point enter manually buat menjadi /home/proxy2, pd mount option pilih[*] noatime dan[*] notaill kemudian Pilih continue dan done setting up the partition
Arahkan pada FREE SPACE (enter),
pilih Create new partition (enter) new partition size isi 10 GB (pilih continue dan enter), pilih Logikal (enter), pilih Beginning (enter), pada use as pilih reiserFS (enter), pada Moun point enter manually buat menjadi /home/proxy3, pd mount option pilih[*] noatime dan[*] notail kemudian Pilih continue dan done setting up the partition
Arahkan pada FREE SPACE (enter), pilih Create new partition (enter) new partition size isi sesuai sisanya (pilih continue dan enter), pilih Logikal (enter), pilih Beginning (enter), pada Moun point enter manually buat menjadi /data kemudian Pilih continue dan done setting up the partition
Kemudian pilih finis partitioning and write changes to disk
write the changes to disk pilih yes
pada full name for the new user isi dg proxyku, terus continue & enter
pada Username for your account isi dg proxyku, terus continue & enter
pada a password for the new user isi dg proxyku, terus continue & enter
pada re-enter password to verify isi dg proxyku, terus continue & enter
pada use weak password pilih yes
pada encrypt your home directory pilih no
pada HTTP proxy information KOSONGIN SAJA
pada configurasi apt 43% tekan enter, juga pada 81% tekan enter
pilih no automatic update
pada choose software to install pilih OpenSSH server
pilih continus pd finis the installation
PENTING....!!! setelah restart
login dg proxyku
password proxyku
ketik sudo su -
isi proxyku
ketik passwd
enter new UNIX password isi dg proxyku
retype new UNIX password isi proxyku
Install Paket
- sudo apt-get update
- sudo apt-get install squid
- sudo apt-get install squid squidclient squid-cgi
- sudo apt-get install ccze
setelah selesai install paket lakukan edit squid.conf " biar mudah pakai saja software WINSCP & PUTTY
squid.conf
- hapus isi squid.conf kamu dan ganti dg isi squid.conf di bawah ini...
#-----------------------------------#
# Proxy Server Versi 2.7.Stable7
# by teukurizal@yahoo.com
# update 11 Juni 2010
#-----------------------------------#
#---------------------------------------------------------------#
# Port
#---------------------------------------------------------------#
http_port 3128 transparent
icp_port 3130
prefer_direct off
#---------------------------------------------------------------#
# Cache & Object
#---------------------------------------------------------------#
cache_mem 8 MB
cache_swap_low 98
cache_swap_high 99
max_filedesc 8192
maximum_object_size 128 MB
minimum_object_size 0 KB
maximum_object_size_in_memory 4 bytes
ipcache_size 4096
ipcache_low 98
ipcache_high 99
fqdncache_size 4096
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
#----------------------------------------------------------------#
# cache_dir <type> <Directory-Name> <Space in Mbytes> <Level1> <Level2> <options>
#----------------------------------------------------------------#
cache_dir aufs /home/proxy1 7000 16 256
cache_dir aufs /home/proxy2 7000 16 256
cache_dir aufs /home/proxy3 7000 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
pid_filename /var/run/squid.pid
cache_swap_log /var/log/squid/swap.state
dns_nameservers /etc/resolv.conf
emulate_httpd_log off
hosts_file /etc/hosts
half_closed_clients off
negative_ttl 1 minutes
#---------------------------------------------------------------#
# Rules: Safe Port
#---------------------------------------------------------------#
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 to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 873 # https snews rsync
acl Safe_ports port 80 # http
acl Safe_ports port 20 21 # ftp
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 631 # cups
acl Safe_ports port 10000 # webmin
acl Safe_ports port 901 # SWAT
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 873 # rsync
acl Safe_ports port 110 # POP3
acl Safe_ports port 25 # SMTP
acl Safe_ports port 2095 2096 # webmail from cpanel
acl Safe_ports port 2082 2083 # cpanel
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports !SSL_ports
http_access deny CONNECT !SSL_ports !Safe_ports
#---------------------------------------------------------------#
# Refresh Pattern
#---------------------------------------------------------------#
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i \.(gif|png|jpg|jpeg|ico)$ 10080 90% 43200 override-expire ignore-no-cache ignore-private
refresh_pattern -i \.(iso|avi|wav|mp3|mp4|mpeg|mpg|swf|flv|x-flv)$ 43200 90% 432000 override-expire ignore-no-cache ignore-private
refresh_pattern -i \.(deb|rpm|exe|ram|bin|pdf|ppt|doc|tiff)$ 10080 90% 43200 override-expire ignore-no-cache ignore-private
refresh_pattern -i \.(zip|gz|arj|lha|lzh|tar|tgz|cab|rar)$ 10080 95% 43200 override-expire ignore-no-cache ignore-private
refresh_pattern -i \.(html|htm|css|js|php|asp|aspx|cgi) 1440 40% 40320
refresh_pattern . 0 20% 4320
#---------------------------------------------------------------#
# SNMP
#---------------------------------------------------------------#
snmp_port 3401
acl snmpsquid snmp_community public
snmp_access allow snmpsquid localhost
snmp_access deny all
#---------------------------------------------------------------#
# ALLOWED ACCESS
#---------------------------------------------------------------#
acl proxyku src 172.19.196.0/24
http_access allow proxyku
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow proxyku
icp_access allow localhost
icp_access deny all
always_direct deny all
#---------------------------------------------------------------#
# Cache CGI & Administrative
#---------------------------------------------------------------#
cache_mgr teukurizal@yahoo.com.sg
visible_hostname dns.proxyku.net
cache_effective_user proxy
cache_effective_group proxy
coredump_dir /var/spool/squid
shutdown_lifetime 10 seconds
logfile_rotate 14
#-----------------------------------------------------------------#
#tcp_outgoing_tos 0x30 localnet
#-----------------------------------------------------------------#
zph_mode tos
zph_local 0x30
zph_parent 0
zph_option 136
Langkah selanjutnya
stop squid dengan perintah : /etc/init.d/squid stop (ubuntu 9.10) atau squid stop (ubuntu 10.04)
• Memberikan permission pada folder cache
chown -R proxy.proxy /home/proxy1
chown -R proxy.proxy /home/proxy2
chown -R proxy.proxy /home/proxy3
chown -R proxy.proxy /var/log/squid/access.log
• Membuat folder-folder swap/cache di dalam folder cache yang telah ditentukan dg perintah :
squid -f /etc/squid/squid.conf -z
• Restart squid.
/etc/init.d/squid restart (ubuntu 9.10) atau squid restart (ubuntu 10.04)
• Buat rule iptables agar port HTTP (80) dari client dibelokkan ke port Proxy (3128).
iptables -t nat -I PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
iptables -t nat -I PREROUTING -i eth0 -p udp -m udp --dport 80 -j REDIRECT --to-ports 3128
SEMOGA BERMANFAAT...!!! TERUS MAJU INDONESIA-KOE
Source : http://www.forummikrotik.com/software/12920-membuat-proxy-dengan-ubuntu.html
Mikrotik My References
Connection-byte : membaca byte yg telah tercapai dari suatu connection yg terjadi
Connection-rate : membaca bit / speed yg telah terjadi dari suatu connection
Seumber : Semua situs yang saya jelajahi - special www.forummikrotik.com
Mendalami HTB pada QoS RouterOS Mikrotik
Pada pembahasan artikel ini, kita akan mengambil contoh sebuah sistem QoS sederhana, di mana kita ingin mengalokasikan bandwidth sebesar 400kbps untuk 3 client, di mana masing-masing client bisa mendapatkan maksimal 200kbps. Di antara ketiga client tersebut, memiliki prioritas yang berbeda, yaitu: 1,2, dan 3.
Untuk mempermudah pemantauan dan pembuktian, kita akan menggunakan queue tree.
Cara paling mudah untuk melakukan queue dengan queue tree, adalah dengan menentukan parameter :
* parent (yang harus diisi dengan outgoing-interface),
* packet-mark (harus dibuat terlebih dahulu di ip-firewall-mangle),
* max-limit (yang merupakan batas kecepatan maksimum), atau dikenal juga dengan MIR (Maximum Information Rate)
Untuk percobaan awal, semua priority diisi angka yang sama: 8, dan parameter limit-at tidak kita isi. Gambar berikut ini adalah ilustrasi apa yang akan terjadi dengan konfigurasi di atas.
Misalkan q1 adalah client dengan prioritas tertinggi, dan q3 adalah client dengan prioritas terbawah. Kita akan mencoba memasukkan nilai prioritas untuk masing-masing client sesuai dengan prioritasnya.
Gambar berikut akan mencoba mengimplementasikan nilai limit-at. Seharusnya, limit-at adalah CIR (Committed Information Rate), merupakan parameter di mana suatu client akan mendapatkan bandwidthnya, apapun kondisi lainnya, selama bandwidthnya memang tersedia.
Berikutnya, kita akan menggunakan parent queue, dan menempatkan ketiga queue client tadi sebagai child queue dari parent queue yang akan kita buat. Pada parent queue, kita cukup memasukkan outgoing-interface pada parameter parent, dan untuk ketiga child, kita mengubah parameter parent menjadi nama parent queue. Pertama-tama, kita belum akan memasukkan nilai max-limit pada parent-queue, dan menghapus semua parameter limit-at pada semua client.
Setelah kita memasang parameter max-limit pada parent queue, barulah prioritas pada client akan berjalan.
Untuk itu, kita perlu memasang nilai limit-at pada masing-masing client. Nilai limit-at ini adalah kecepatan minimal yang akan di dapatkan oleh client, dan tidak akan terganggu oleh client lainnya, seberapa besarpun client lainnya 'menyedot' bandwidth, ataupun berapapun prioritasnya. Kita memasang nilai 75kbps sebagai limit-at di semua client.
Jumlah akumulatif dari limit-at tidaklah boleh melebihi max-limit parent. Jika hal itu terjadi, seperti contoh di bawah ini, jumlah limit-at ketiga client adalah 600kbps, sedangkan nilai max-limit parent hanyalah 400kbps, maka max-limit parent akan bocor. Contoh di bawah ini mengasumsikan bahwa kapasitas keseluruhan memang bisa mencapai nilai total limit-at. Namun, apabila bandwidth yang tersedia tidak mencapai total limit-at, maka client akan kembali berebutan dan sistem prioritas menjadi tidak bekerja.
1. HTB hanya bisa berjalan, apabila rule queue client berada di bawah setidaknya 1 level parent, setiap queue client memiliki parameter limit-at dan max-limit, dan parent queue harus memiliki besaran max-limit.
2. Jumlah seluruh limit-at client tidak boleh melebihi max-limit parent.
3. Max-limit setiap client harus lebih kecil atau sama dengan max-limit parent.
4. Untuk parent dengan level tertinggi, hanya membutuhkan max-limit (tidak membutuhkan parameter limit-at).
5. Untuk semua parent, maupun sub parent, parameter priority tidak diperhitungkan. Priority hanya diperhitungkan pada child queue.
6. Perhitungan priority baru akan dilakukan setelah semua limit-at (baik pada child queue maupun sub parent) telah terpenuhi.
Panduan praktis cara perhitungan limit-at dan max-limit
Di asumsikan bandwidth yang tersedia sebesar 1000kbps. Dan jumlah seluruh client adalah 70. Yang perlu diketahui adalah :
1. Berapa jumlah maksimal client yang menggunakan internet pada saat yang bersamaan. Jumlah ini belum tentu sama dengan jumlah komputer yang ada, apabila semua client tidak pernah terkoneksi secara bersamaan. Sebagai contoh, untuk kasus ini kita asumsikan adalah 50.
2. Berapa jumlah minimal client yang menggunakan internet pada saat yang bersamaan. Sebagai contoh, untuk kasus ini kita asumsikan adalah 10
Maka, untuk setiap client (1 client dibuatkan 1 rule queue), limit-at nya adalah 1000 / 50 = 20kbps, dan max-limit nya adalah 1000 / 10 = 100 kbps.
Jangan lupa untuk menambahkan parent dengan max-limit sebesar 1000kbps (tidak perlu limit-at), dan memasukkan semua queue client di bawah parent queue. Jika untuk terminal tertentu membutuhkan priority lebih besar, maka kita bisa menggunakan priority yang berbeda-beda, tergantung dengan urutan prioritasnya.
http://mikrotik.co.id/artikel_lihat.php?id=29
Setting Queue Tree Mikrotik Efektif [APPROVED]
Berdasarkan tutorial2 yang sudah ada di internet tentang setting queue tree mikrotik, maka saya ambil kesimpulan untuk rule yang baik dan efektif menurut saya dan mungkin bisa anda terapkan juga.
Contoh Kasus :
Warnet
Bandwidth Total= 512k
Jumlah Client = 8
ip router Mikrotik = 192.168.1.1
ip client = 192.168.1.2-192.168.1.9
1. Buat Mangle :
/ip firewall mangle
(menangkap semua traffic/koneksi untuk semua client)
add chain=forward action=mark-connection new-connection-mark=all-warnet passthrough=yes dst-address=192.168.1.2-192.168.1.9
add chain=forward action=mark-packet new-packet-mark=all-warnet passthrough=no connection-mark=all-warnet
(menangkap semua traffic/koneksi client satu persatu. ulangi rule ini sesuai dengan banyaknya client anda)
add chain=forward action=mark-connection new-connection-mark=client1 passthrough=yes dst-address=192.168.1.2
add chain=forward action=mark-packet new-packet-mark=client1 passthrough=no connection-mark=client1
add chain=forward action=mark-connection new-connection-mark=client2 passthrough=yes dst-address=192.168.1.3
add chain=forward action=mark-packet new-packet-mark=client2 passthrough=no connection-mark=client2
......... dan seterusnya sampai 8 client................
2. Buat Queue Tree
/queue tree
(melihat total bandwidth yang digunakan oleh semua client)
add name="all-warnet" parent=global-out packet-mark=all-warnet limit-at=0 queue=default priority=8 max-limit=512000
(membatasi bandwidth per client)
add name="client1" parent=all-warnet packet-mark=client1 limit-at=70000 queue=default priority=3 max-limit=512000
add name="client2" parent=all-warnet packet-mark=client2 limit-at=70000 queue=default priority=3 max-limit=512000
......... dan seterusnya sampai 8 client................
3. Pada rule queue tree saya, semua client mempunyai hak dan jaminan bandwidth yang sama. ilustrasinya, bandwidth akan diberikan full 512k apabila hanya satu client yang online (contoh client1), tapi ketika ada client lain yang online atau request bandwidth maka bandwidth client1 akan turun secara otomatis. apabila semua client membutuhkan bandwidth maka masing2 client bandwitdh akan mendapatkan 512k dibagi 8 client = 64k.
4. Mungkin anda bertanya, kenapa saya pasang limit at = 0 pada queue al warnet sedangkan pada client limit at = 70k dan kenapa priority pada queue all warnet berbeda dengan queue client..??
jawaban dan cara perhitungannya bisa anda temukan http://mikrotik.co.id/artikel_lihat.php?id=29
Source : http://kuliahku.com/forum/index.php?topic=21.0
Mikrotik Limit Bandwidht
How to Setting Mikrotik Limit Bandwidht
After you install Mikrotik As Gateway ,mikrotik As DHCP server, and Now, To Control Traffic internet you can make Limit Bandwidht uses Queue Simple Or Queue Tree
A. Uses Simple Queue
1. Log in From Winbox
2. If you success, you can enter to Winbox configuration setting
3. Click Queue and add new Simple Queue
in General Tab
- Set name = Client 1
- Target address = Ip that would in the Limit bandwidht. example: 123.123.123.0/24
- Max-Limit = Maximum bandwidht you can give for Download and Upload
example: 64k/64k
4. In Simple Queue setting, Click Advance
- set interface = Local
- set Limita-at = 32k/32k
5. Apply and Ok
B. Uses PCQ (Per Client Queue)
1. set in mangel first to configuration paket mark and conection mark
ip—-firewall—mangel—add new queue List
chain=forward src-address=123.123.123.0/24 action=mark-connection new-connection-mark=123-CM passthrough=yes
chain=forward connection-mark=123-CM action=mark-packet new-packet-mark=123-PM passthrough=yes
2. In Queue Type, set download and Upload
Queue—QueueType—-add
name=”download” kind=pcq pcq-rate=0 pcq-limit=10 pcq-classifier=dst-address pcq-total-limit=2000
name=”upload” kind=pcq pcq-rate=0 pcq-limit=10 pcq-classifier=src-address pcq-total-limit=2000
3. In Queue Tree,Set Bandwidht you can give to ip Local
Queue—QueueTree—-add
name=”123L” parent=Local packet-mark=123-PM limit-at=0 queue=download priority=8 max-limit=64000 burst-limit=0 burst-threshold=0 burst-time=0s
name=”123P” parent=Public packet-mark=123-PM limit-at=0 queue=upload priority=8 max-limit=64000 burst-limit=0 burst-threshold=0 burst-time=0s
4. Ok complete
Source : http://mikrotik.unimedcenter.org/?p=9








