Mendalami HTB pada QoS RouterOS Mikrotik

Monday, June 28, 2010 at 1:17 AM | 0 comments |

Implementasi QoS (Quality of Services) di Mikrotik banyak bergantung pada sistem HTB (Hierarchical Token Bucket). HTB memungkinkan kita membuat queue menjadi lebih terstruktur, dengan melakukan pengelompokan-pengelompokan bertingkat. Yang banyak tidak disadari adalah, jika kita tidak mengimplementasikan HTB pada Queue (baik Simple Queue maupun Queue Tree), ternyata ada beberapa parameter yang tidak bekerja seperti yang kita inginkan.Beberapa parameter yang tidak bekerja adalah priority, dan dual limitation (CIR / MIR).
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.
Karena alokasi bandwidth yang tersedia hanya 400kbps, sedangkan total akumulasi ketiga client melebihinya (600 kbps), maka ketiga client akan saling berebut, dan tidak bisa diprediksikan siapa yang akan menang (menggunakan bandwidth secara penuh) dan siapa yang akan kalah (tidak mendapatkan bandwidth yang sesuai).
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.
Tampak pada gambar di atas, meskipun sekarang q1 sudah memiliki prioritas tertinggi, namun ketiga client masih berebutan bandwidth dan tidak terkontrol.
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.
Ternyata q1 masih tidak mendapatkan bandwidth sesuai dengan limit-at (CIR) nya. Padahal, karena bandwidth yang tersedia adalah 400kbps, seharusnya mencukupi untuk mensuplai masing-masing client sesuai dengan limit-at nya.
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.
Tampak pada contoh di atas, karena kita tidak memasukkan nilai max-limit pada parent, maka priority pada child pun belum bisa terjaga.
Setelah kita memasang parameter max-limit pada parent queue, barulah prioritas pada client akan berjalan.
Tampak pada contoh di atas, q1 dan q2 mendapatkan bandwidth hampir sebesar max-limitnya, sedangkan q3 hampir tidak kebagian bandwidth. Prioritas telah berjalan dengan baik. Namun, pada kondisi sebenarnya, tentu kita tidak ingin ada client yang sama sekali tidak mendapatkan bandwidth.
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.
Tampak bahwa q3, yang memiliki prioritas paling bawah, mendapatkan bandwidth sebesar limit-at nya. q1 yang memiliki prioritas tertinggi, bisa mendapatkan bandwidth sebesar max-limitnya, sedangkan q2 yang prioritasnya di antara q1 dan q3, bisa mendapatkan bandwidth di atas limit-at, tapi tidak mencapai max-limit. Pada contoh di atas, semua client akan terjamin mendapatkan bandwidth sebesar limit-at, dan jika ada sisa, akan dibagikan hingga jumlah totalnya mencapai max-limit parent, sesuai dengan prioritas masing-masing 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.
Sedangkan, mengenai max-limit, max-limit sebuah client tidak boleh melebihi max-limit parent. Jika hal ini terjadi, maka client tidak akan pernah mencapai max-limit, dan hanya akan mendapatkan kecepatan maksimum sebesar max-limit parent (lebih kecil dari max-limit client).
Jika semua client memiliki prioritas yang sama, maka client akan berbagi bandwidth sisa. Tampak pada contoh di bawah ini, semua client mendapatkan bandwidth yang sama, sekitar 130kbps (total 400kbps dibagi 3).
Yang perlu diingat mengenai HTB:
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.
Dibuat oleh: Valens Riyadi - MIKROTIK INDONESIA - www.mikrotik.co.id
http://mikrotik.co.id/artikel_lihat.php?id=29

Setting Queue Tree Mikrotik Efektif [APPROVED]

at 1:02 AM | 0 comments |

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 - Queue Simple

Sunday, June 27, 2010 at 9:35 PM | 1 comments |

Queue Simple Mikrotik Referency...

Suorce : All my Loock Site...


Mikrotik Limit Bandwidht

at 7:49 AM | 0 comments |

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

Drop and Block ip and Mac address from Mikrotik

at 7:42 AM | 0 comments |

A great number of IP that entered to server, could that client that want to enter. just direct block ip and mac address him from firewall configuration

1. Login to mikrotik used Winbox

2. then from winbox block ip

/ip firewall filter add chain=forward src-address=123.123.123.10 action=drop

3. Block ip and Mac address

from winbox

ip firewall filter add chain=forward src-address=123.123.123.10 src-mac-address= oe:09:j8:kl:9a

And don’t forget to be given the sign (! ) nearby left this MAC OK

4. To Tab Action chose Action: drop

5. click “apply” and “ok”

Source : http://mikrotik.unimedcenter.org/?p=18

Load Balancing Mikrotik

at 7:39 AM | 0 comments |

Server Mikrotik least had 3 NIC

1. ether1 —>Astinet
2. ether2 —>Jardiknas
3. ether3 —>Lan

Steps:

1. Give the name of Interfaces Ether1-3 in Interfaces

[admin@MikroTik] interface> pr
Flags: X – disabled, D – dynamic, R – running
# NAME TYPE RX-RATE TX-RATE MTU
0 R Astinet ether 0 0 1500
1 R Jardiknas ether 0 0 1500

1 R Lan ether 0 0 1500

2. Give IP Address for each one ethernet

[admin@mikrotik] > ip address print
Flags: X – disabled, I – invalid, D – dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 192.168.205.2 /24 192.168.205.0 192.168.205.255 Astinet
1 192.168.204.2/24 192.168.204.0 192.168.204.255 Jardiknas
2 192.168.9.2/24 192.168.9.0 192.168.9.255 Lan

3. Make Rule

[admin@MikroTik] ip firewall mangle> pr
Flags: X – disabled, I – invalid, D – dynamic
0 chain=prerouting in-interface=Local action=mark-routing
new-routing-mark=pegawai passthrough=yes

3. Set Gateway for each one network

/ip route add gateway=192.168.205.5 dst-address=0.0.0.0/0 routing-mark=Pegawai
/ip route add gateway=192.168.204.5 dst-address=0.0.0.0/0 routing-mark=Mahasiswa

/ip route add gateway=192.168.205.5,192.168.204.5,192.168.205.5
check-gateway=ping routing-mark=Mahasiswa
5. show ip route

[admin@MikroTik] ip> route pr
Flags: X – disabled, A – active, D – dynamic,
C – connect, S – static, r – rip, b – bgp, o – ospf
# DST-ADDRESS PREF-SRC G GATEWAY DISTANCE INTERFACE
0 ADC 192.168.9.0/24 192.168.9.2 Local
1 ADC 192.168.204.0/24 192.168.204.2 Public
2 ADC 192.168.205.0/24 192.168.205.2 Public
3 A S 0.0.0.0/0 r 192.168.205.5 Public
4 S 0.0.0.0/0 r 192.168.204.5 Public
5 A S 0.0.0.0/0 r 192.168.204.5 Public
r 192.168.205.5 Public
r 192.168.204.5 Public

4. Make rule nat-masquerade for network 192.168.9.0/24

/ip firewall nat add chain=srcnat src-address=192.168.9.0/24 action=masquerade

5. Show nat -masquerade network

[admin@mikrotik] > ip firewall nat print
Flags: X – disabled, I – invalid, D – dynamic
0 ;;; Masquerade Network 192.168.9.0/24
chain=srcnat src-address=192.168.9.0/24 action=masquerade

6. Complete

Source : http://mikrotik.unimedcenter.org/?p=28

Blok scan winbox From neighbour

at 7:35 AM | 0 comments |

After we install mikrotik router os, and afterwards tried browsing from the client’s computer, we felt that router that already finish. afterwards I was opened winbox from the client’s computer, evidently ip mikrotik router property of all the offices could be seen . this meant to give the gap to the person that to test hack the route.

Now you as the network administrator could prevent it, with configuration firewall in mikrotik

1. setting this configuration

admin@mikrotik] interface bridge> filter print
Flags: X – disabled, I – invalid, D – dynamic
0 ;;; block discovery mikrotik
chain=forward in-interface=ether1 mac-protocol=ip dst-port=5678
ip-protocol=udp action=drop
1 ;;; block discovery mikrotik
chain=input in-interface=ether1 mac-protocol=ip dst-port=5678
ip-protocol=udp action=drop
2 ;;; block discovery mikrotik
chain=output mac-protocol=ip dst-port=5678 ip-protocol=udp action=drop
3 ;;; block discovery mikrotik
chain=input in-interface=ether1 mac-protocol=ip dst-port=8291
ip-protocol=tcp action=drop
4 ;;; block winbox mikrotik
chain=forward in-interface=ether1 mac-protocol=ip dst-port=8291
ip-protocol=tcp action=drop
5 ;;; block request DHCP
chain=input mac-protocol=ip dst-port=68 ip-protocol=udp action=drop
6 ;;; block request DHCP
chain=forward mac-protocol=ip dst-port=68 ip-protocol=udp action=drop
7 ;;; block request DHCP
chain=output mac-protocol=ip dst-port=68 ip-protocol=udp action=drop

Source : http://mikrotik.unimedcenter.org/?p=53

Limit Bandwidth with extension in mikrotik

at 7:33 AM | 0 comments |

Apart from an administrator could arrange the limit bandwidth per clinet, a person admin could arrange bandwidth in accordance with extension that in download him, Along With was the method that most was easy:
/ip firewall filter add chain=forward \
src-address=[ip Local ] protocol=tcp content=.exe \
action=add-dst-to-address-list address-list=cekek \
address-list-timeout=01:00:00
/ip firewall filter add chain=forward \
src-address=[ip Local ] protocol=tcp content=.iso \
action=add-dst-to-address-list address-list=cekek \
address-list-timeout=01:00:00
/ip firewall filter add chain=forward \
src-address=[ip Local ] protocol=tcp content=.mpg \
action=add-dst-to-address-list address-list=cekek \
address-list-timeout=01:00:00
/ip firewall filter add chain=forward \
src-address=[ip Local ] protocol=tcp content=.mp3 \
action=add-dst-to-address-list address-list=cekek \
address-list-timeout=01:00:00

make mangel

/ip firewall mangle add chain=forward \
protocol=tcp src-address-list=cekek \
action=mark-packet new-packet-mark=cekek-bw

Now, You can Limit

/queue simple add name=download-files \
max-limit=64000/64000 packet-marks=cekek-bw

Source : http://mikrotik.unimedcenter.org/?p=87

Block Traceroute and ping from client

at 7:31 AM | 0 comments |

Block Traceroute

You could arrange him in firewall mikrotik, to avoid Traceroute and ping, Along With was the method that most was easy:

/ip firewall filter add chain=forward protocol=icmp icmp-options=11:0 action=drop comment=”Drop Traceroute”
/ip firewall filter add chain=forward protocol=icmp icmp-options=3:3 action=drop comment=”Drop Traceroute”

next you can block ping

/ip firewall filter add chain=input action=accept protocol=icmp limit=50/5s,2

Source : http://mikrotik.unimedcenter.org/?p=91

Block Scan Winbox and Neighbour Mikrotik

at 7:29 AM | 0 comments |

1. Block Scan Winbox and Neighbour Mikrotik

Apart from Protected router from the virus with configuration in firewall mikrotik , the network administrator also could protect router from scan winbox and neighbor. this was the matter that was important in the network, Along With was the method that most was easy:

copy and paste this script in console mikrotik

admin@mikrotik] interface bridge> filter print
Flags: X – disabled, I – invalid, D – dynamic
0 ;;; block discovery mikrotik
chain=forward in-interface=ether1 mac-protocol=ip dst-port=5678
ip-protocol=udp action=drop
1 ;;; block discovery mikrotik
chain=input in-interface=ether1 mac-protocol=ip dst-port=5678
ip-protocol=udp action=drop
2 ;;; block discovery mikrotik
chain=output mac-protocol=ip dst-port=5678 ip-protocol=udp action=drop
3 ;;; block discovery mikrotik
chain=input in-interface=ether1 mac-protocol=ip dst-port=8291
ip-protocol=tcp action=drop
4 ;;; block winbox mikrotik
chain=forward in-interface=ether1 mac-protocol=ip dst-port=8291
ip-protocol=tcp action=drop
5 ;;; block request DHCP
chain=input mac-protocol=ip dst-port=68 ip-protocol=udp action=drop
6 ;;; block request DHCP
chain=forward mac-protocol=ip dst-port=68 ip-protocol=udp action=drop
7 ;;; block request DHCP
chain=output mac-protocol=ip dst-port=68 ip-protocol=udp action=drop

2. Recorded all of IP scanner

To be able to router recorded all of IP scanner and afterwards was put into the IP Address list and was named in group “port scanner”, along with rule in firewall him:

- Script First

add chain=input protocol=tcp psd=21,3s,3,1 action=add-src-to-address-list address-list=”port scanners”
address-list-timeout=2w comment=”Port scanners to list ” disabled=no

- Script two

add chain=input protocol=tcp tcp-flags=fin,!syn,!rst,!psh,!ack,!urg
action=add-src-to-address-list address-list=”port scanners”
address-list-timeout=2w comment=”NMAP FIN Stealth scan”

add chain=input protocol=tcp tcp-flags=fin,syn
action=add-src-to-address-list address-list=”port scanners”
address-list-timeout=2w comment=”SYN/FIN scan”

add chain=input protocol=tcp tcp-flags=syn,rst
action=add-src-to-address-list address-list=”port scanners”
address-list-timeout=2w comment=”SYN/RST scan”

add chain=input protocol=tcp tcp-flags=fin,psh,urg,!syn,!rst,!ack
action=add-src-to-address-list address-list=”port scanners”
address-list-timeout=2w comment=”FIN/PSH/URG scan”

add chain=input protocol=tcp tcp-flags=fin,syn,rst,psh,ack,urg
action=add-src-to-address-list address-list=”port scanners”
address-list-timeout=2w comment=”ALL/ALL scan”

add chain=input protocol=tcp tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg
action=add-src-to-address-list address-list=”port scanners”
address-list-timeout=2w comment=”NMAP NULL scan”

3. Script Three

add chain=input src-address-list=”port scanners” action=drop comment=”dropping port scanners” disabled=no’

Source : http://mikrotik.unimedcenter.org/?p=85

Avoided Port Scanner from Hacker

at 7:24 AM | 0 comments |

To avoid the Port Scanner action from Hacker, then we could arrange in firewall mikrotik, by means of :

1. Make Filter

/ip firewall filter
add chain=input protocol=tcp psd=21,3s,3,1 action=add-src-to-address-list address-list=”port scanners” address-list-timeout=2w comment=”Port scanners to list ” disabled=no

2. Make Chain

add chain=input protocol=tcp tcp-flags=fin,!syn,!rst,!psh,!ack,!urg
action=add-src-to-address-list address-list=”port scanners”
address-list-timeout=2w comment=”NMAP FIN Stealth scan”

add chain=input protocol=tcp tcp-flags=fin,syn
action=add-src-to-address-list address-list=”port scanners”
address-list-timeout=2w comment=”SYN/FIN scan”

add chain=input protocol=tcp tcp-flags=syn,rst
action=add-src-to-address-list address-list=”port scanners”
address-list-timeout=2w comment=”SYN/RST scan”

add chain=input protocol=tcp tcp-flags=fin,psh,urg,!syn,!rst,!ack
action=add-src-to-address-list address-list=”port scanners”
address-list-timeout=2w comment=”FIN/PSH/URG scan”

add chain=input protocol=tcp tcp-flags=fin,syn,rst,psh,ack,urg
action=add-src-to-address-list address-list=”port scanners”
address-list-timeout=2w comment=”ALL/ALL scan”

add chain=input protocol=tcp tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg
action=add-src-to-address-list address-list=”port scanners”
address-list-timeout=2w comment=”NMAP NULL scan”

3. Drop Ip scanning

add chain=input src-address-list=”port scanners” action=drop comment=”dropping port scanners” disabled=no

Source : http://mikrotik.unimedcenter.org/?p=93

at 7:20 AM | 0 comments |

1. install mikrotik

2. set ip address

/ip address
add address=192.168.12.22/24 network=192.168.12.0 broadcast=192.168.12.255 interface=lan comment="" disabled=no
add address=192.168.2.3/24 network=192.168.2.0 broadcast=192.168.2.255 interface=line1 comment="" disabled=no
add address=192.168.3.11/24 network=192.168.3.0 broadcast=192.168.3.255 interface=line2 comment="" disabled=no

3. set mangel
/ip firewall mangle
add chain=prerouting in-interface=lan connection-state=new nth=1,2,0 action=mark-connection new-connection-mark=one passthrough=yes comment="" disabled=no
add chain=prerouting in-interface=lan connection-mark=satu action=mark-routing new-routing-mark=one passthrough=no comment="" disabled=no
add chain=prerouting in-interface=lan connection-state=new nth=1,2,1 action=mark-connection new-connection-mark=two passthrough=yes comment="" disabled=no
add chain=prerouting in-interface=lan connection-mark=dua action=mark-routing new-routing-mark=two passthrough=no comment="" disabled=no

4. set Nat
/ip firewall nat
add chain=srcnat connection-mark=one action=src-nat to-addresses=192.168.2.3 to-ports=0-65535 comment="" disabled=no
add chain=srcnat connection-mark=two action=src-nat to-addresses=192.168.3.11 to-ports=0-65535 comment="" disabled=no

5. Set Route
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.2.1 scope=255 target-scope=10 routing-mark=one comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=192.168.3.2 scope=255 target-scope=10 routing-mark=two comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=192.168.3.2 scope=255 target-scope=10 comment="" disabled=no <<--default route

Source : http://mikrotik.unimedcenter.org/?p=112

Limit Youtube Video Streaming from mikrotik

at 7:19 AM | 0 comments |

After we arranged the limit rapidshare, YM, and other now we arrange the limit to youtube
1. Make http-video layer7-protocol

/ip firewall layer7-protocol
add name=http-video regexp="http/(0\.9|1\.0|1\.1)[\x09-\x0d ][1-5][0-9][0-9][\x09-\x0d -~]*(content-type: video)"

2. Make Mangle Mark Packet http-video

/ip frewall mangle
add action=mark-packet chain=prerouting comment="http-video mark-packet" \
disabled=no layer7-protocol=http-video new-packet-mark=http-video \
passthrough=no

3. Make Queue Simple http-video

/queue simple
add max-limit=0/64000 name=http-video packet-marks=http-video

Source : http://mikrotik.unimedcenter.org/?p=106

Other methode Limit Download Mikrotik

at 7:16 AM | 0 comments |

/ip firewall layer7-protocol
add comment=”" name=http-video regexp=\
“http/(0\\.9|1\\.0|1\\.1)[\\x09-\\x0d ][1-5][0-9][0-9][\\x09-\\x0d -~]*(content-type: video)”

/ip firewall mangle
add action=mark-connection chain=forward comment=”batasi download” connection-bytes=1024000-4294967295 disabled=no \
in-interface=eth1-internet new-connection-mark=download_con passthrough=yes
add action=mark-packet chain=forward comment=”" connection-mark=download_con disabled=no in-interface=eth1-internet \
new-packet-mark=download_pkt passthrough=yes
add action=mark-packet chain=prerouting comment=”limit video streaming” disabled=no layer7-protocol=http-video \
new-packet-mark=http-video-up passthrough=yes protocol=tcp
add action=mark-packet chain=prerouting comment=”limit audio streaming” disabled=no layer7-protocol=http-audio \
new-packet-mark=http-audio-up passthrough=yes protocol=tcp

/queue type
add kind=pcq name=batasidownload pcq-classifier=dst-address pcq-limit=50 pcq-rate=256000 pcq-total-limit=2000

/queue simple
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s comment=”" direction=both disabled=no dst-address=0.0.0.0/0 \
interface=all limit-at=0/8k max-limit=128k/128k name=”HTTP Video Traffict” packet-marks=http-video-up parent=none \
priority=8 queue=default-small/default-small total-queue=default-small
add burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s comment=”" direction=both disabled=no dst-address=0.0.0.0/0 \
interface=all limit-at=0/0 max-limit=128k/128k name=”Queue HTTP Video” packet-marks=http-video-up parent=\
“HTTP Video Traffict” priority=8 queue=default-small/default-small target-addresses=0.0.0.0/0 total-queue=\
default-small

/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=256k name=batasidownloadfreebrowsing \
packet-mark=download_pkt parent=global-out priority=8 queue=batasidownload

Source : forummikrotik.com, http://taryan.web.id

Istilah istilah umum Radio Wireless (dB, dBm, dBi, ...)

Monday, June 14, 2010 at 2:00 PM | 1 comments |

Artikel berikut ini disadur dari berbagai sumber dan disederhanakan agar lebih mudah dimengerti bagi para pemain baru ataupun mereka yang tertarik dengan dunia Radio Wireless.

Dari segi matematika, satuan yang digunakan banyak merupakan satuan logaritma. Satuan logaritma ini sangat memudahkan perhitungan. Nah, cara perhitungan nya dapat anda lihat di ilustrasi ataupun contoh-contoh singkat di bawah ini.

dB (Decibel)

Merupakan satuan perbedaan (atau Rasio) antara kekuatan daya pancar signal. Penamaannya juga untuk mengenang Alexander Graham Bell (makanya huruf "B" merupakan huruf besar). Satuan ini digunakan untuk menunjukkan efek dari sebuah perangkat terhadap kekuatan atau daya pancar suatu signal.

Sebagai contoh:


Sebuah kabel memiliki loss (pelemahan atau redaman) 6dB (besar sekali loss nya ya :< ) atau sebuah amplifier memiliki gain (penguatan) 15 dB. Penggunaan satuan ini sangat berguna karena Penguatan (Gain) ataupun Pelemahan (Loss) dapat dihitung hanya dengan penambahan ataupun pengurangan.

dBm (dB milliWatt)

Merupakan satuan kekuatan signal atau daya pancar (Signal Strengh or Power Level). 0 dbm didefinisikan sebagai 1 mW (milliWatt) beban daya pancar, contohnya bisa dari sebuah Antenna ataupun Radio. Daya pancar yang kecil merupakan angka negatif (contoh: -90 dBm).

Sebagai contoh: Umumnya radio dengan standar 802.11b WLAN memiliki kekuatan daya pancar 15 dbm (32 mW). Radio ini juga memiliki spesifikasi lain contohnya seperti -90 dbM RX Sensitivity (yang merupakan daya pancar minimum untuk mendapatkan throughput 54 Mbps)

Formula perhitungan dari mW ke dBM adalah sebagai berikut:

mW = 10dBm/10

milliwatt (mW) adalah satu per seribu watt (W), atau 1000 milliwatts = 1 watt. watt adalah Standar Unit International dari daya (power). 1 watt = 1 joule energi per detik.

10 mW = 10.00 dBm
35 mW = 15.44 dBm
65 mW = 18.13 dBm
100 mW = 20.00 dBm
150 mW = 21.76 dBm
200 mW = 23.01 dBm
300 mW = 24.77 dBm
350 mW = 25.44 dBm
400 mW = 26.02 dBm
500 mW = 26.99 dBm
600 mW = 27.78 dBm

dBi (dB isotropic)

Penguatan dari sebuah antenna terhadap suatu antenna standard imaginari (isotropic antenna). Karena merupakan imaginari, makanya antenna standar ini hanya ada secara teori dan digunakan untuk pengukuran. Penguatan (Gain) dari antenna (diatas 1 Ghz) biasanya menggunakan satuan dBi. Sebuah Antenna Grid 24 dBi memiliki penguatan (Gain) sebesar 24 dBi terhadap antenna standard imaginari 0 dBi (isotropic antenna)

Sebelum membeli antenna dari vendor, tanyakan dulu berapa penguatannya dalam satuan dBi. Satuan ini merupakan satuan standard international. Berarti Antenna Grid 24 dBi walaupun berbeda merek memiliki penguatan yang sama yaitu 24 dBi. Merek tidak berpengaruh bila kedua Antenna memiliki penguatan (Gain) yang sama dan dengan Pola Radiasi (Radiation Pattern) yang sama.

Mengenai Pola Radiasi (Radiation Pattern) akan kita bicarakan dalam artikel lainnya. Pola Radiasi sebuah Antenna juga membantu daya pancar ataupun jangkauan dan juga dapat membantu mengurangi interferensi dalam praktek di lapangan. (tokowifi.com)