Setting Mikrotik
Setting Mikrotik
Disini saya berikan sedikit command setting untuk firewall, pengaturan Gateway, DHCP_server,
Filter Rules anti virus, anti DDOS, anti netcut dan anti porno, Penggunakan mangle dan Queue
tree, tutorial ini langsung saya arahkan untuk menangani bandwidth limiter dengan pola pcq-
download dan upload. hasilnya akan terlihat seperti ini :
Limit diatas bisa anda ubah2 sesuai bandwidth internet anda, caranya langsung klik 2x pada
limiter di queue tree nya. oke, langsung aja....
# tentukan DHCP-server
/ip dhcp-server
add add-arp=yes address-pool=dhcp_pool1 authoritative=after-2sec-delay \
bootp-support=static disabled=no interface=ether1-gateway lease-time=1d \
name=dhcp1
add add-arp=yes address-pool=dhcp_pool3 authoritative=after-2sec-delay \
bootp-support=static disabled=no interface=ether2-local-master \
lease-time=1d name=dhcp_server
# menentukan ip address yang dilarang masuk, ini akan otomatis bertambah setiap diakses
sebuah situs yang dilarang
/ip firewall address-list
add address=65.49.0.0/17 disabled=no list=UltraSurfServers
add address=204.107.140.0/24 disabled=no list=UltraSurfServers
add address=94.231.80.100 disabled=no list=your-freedom
add address=85.214.22.104 disabled=no list=your-freedom
add address=94.126.16.7 disabled=no list=your-freedom
add address=85.214.151.156 disabled=no list=your-freedom
add address=85.214.149.36 disabled=no list=your-freedom
add address=85.214.45.166 disabled=no list=your-freedom
add address=85.214.149.43 disabled=no list=your-freedom
add address=83.170.96.78 disabled=no list=your-freedom
add address=193.37.152.232 disabled=no list=your-freedom
add address=80.74.137.161 disabled=no list=your-freedom
add address=193.164.133.62 disabled=no list=your-freedom
add address=95.143.192.144 disabled=no list=your-freedom
add address=208.53.158.27 disabled=no list=your-freedom
add address=85.214.149.35 disabled=no list=your-freedom
add address=76.73.125.131 disabled=no list=your-freedom
add address=77.92.78.225 disabled=no list=your-freedom
add address=81.169.130.185 disabled=no list=your-freedom
add address=217.150.244.92 disabled=no list=your-freedom
add address=83.170.105.81 disabled=no list=your-freedom
add address=123.108.109.9 disabled=no list=your-freedom
add address=85.214.143.29 disabled=no list=your-freedom
add address=85.214.116.165 disabled=no list=your-freedom
add address=67.212.67.75 disabled=no list=your-freedom
add address=67.159.5.116 disabled=no list=your-freedom
add address=202.160.120.226 disabled=no list=your-freedom
add address=184.154.54.0/24 disabled=no list=Blokir
add address=217.114.211.0/24 disabled=no list=Blokir
add address=173.213.96.0/24 disabled=no list=Blokir
add address=193.200.150.0/24 disabled=no list=Blokir
add address=74.50.123.0/24 disabled=no list=Blokir
add address=85.17.200.0/24 disabled=no list=Blokir
add address=199.59.163.0/24 disabled=no list=Blokir
add address=176.9.204.0/24 disabled=no list=Blokir
add address=204.45.137.0/24 disabled=no list=Blokir
# untuk menandai setiap paket data yang masuk pada lalu lintas internet
/ip firewall mangle
add action=add-src-to-address-list address-list=yourfreedomuser \
address-list-timeout=5m chain=prerouting comment="block user freedom" \
disabled=no dst-address-list=your-freedom protocol=tcp
add action=add-src-to-address-list address-list=UltraSurfUsers \
address-list-timeout=5m chain=prerouting comment=UltraSurfUsers disabled=\
no dst-address-list=UltraSurfServers protocol=tcp
add action=mark-connection chain=prerouting comment="limit akamai" disabled=\
no dst-address-list=akamai new-connection-mark=akamai passthrough=yes \
protocol=tcp src-address=!192.168.2.254
add action=mark-packet chain=prerouting connection-mark=akamai disabled=no \
new-packet-mark=akamai passthrough=no
add action=mark-packet chain=postrouting comment=HIT disabled=no dscp=12 \
new-packet-mark=hit passthrough=no
add action=mark-packet chain=postrouting content=X-Cache:HIT disabled=no \
new-packet-mark=hit passthrough=no
add action=mark-connection chain=prerouting comment=GAME disabled=no \
dst-port=1818,2001,3010,4300,5105,5121,5126,5171,5340-5352,6000-6152,7777 \
new-connection-mark=GAMEONLINE passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting disabled=no dst-port=\
7341-7350,7451,8085,9600,9601-9602,9300,9376-9377,9400,9700,10001-10011 \
new-connection-mark=GAMEONLINE passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting disabled=no dst-port="10402,11011-\
11041,12011,12110,13008,13413,15000-15002,16402-16502,16666,18901-18909,19\
000" new-connection-mark=GAMEONLINE passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting disabled=no dst-port=\
19101,22100,27780,28012,29000,29200,39100,39110,39220,39190,40000,49100 \
new-connection-mark=GAMEONLINE passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting disabled=no dst-port=14009-14010 \
new-connection-mark=GAMEONLINE passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting disabled=no dst-port=14009-14010 \
new-connection-mark=GAMEONLINE passthrough=yes protocol=udp
add action=mark-connection chain=prerouting disabled=no dst-port="1293,1479,61\
00-6152,7777-7977,8001,9401,9600-9602,12020-12080,30000,40000-40010" \
new-connection-mark=GAMEONLINE passthrough=yes protocol=udp
add action=mark-connection chain=prerouting disabled=no dst-port=\
42051-42052,11100-11125,11440-11460 new-connection-mark=GAMEONLINE \
passthrough=yes protocol=udp
add action=mark-packet chain=prerouting connection-mark=GAMEONLINE disabled=\
no new-packet-mark=online passthrough=no
add action=mark-connection chain=prerouting content=facebook.com disabled=no \
new-connection-mark=fb_game passthrough=yes
add action=mark-connection chain=prerouting content=fbcdn.net disabled=no \
new-connection-mark=fb_game passthrough=yes
add action=mark-connection chain=prerouting content=facebook.net disabled=no \
new-connection-mark=fb_game passthrough=yes
add action=mark-connection chain=prerouting content=zynga.com disabled=no \
new-connection-mark=fb_game passthrough=yes
add action=mark-connection chain=prerouting content=\
static.ak.connect.facebook.com disabled=no new-connection-mark=fb_game \
passthrough=yes
add action=mark-connection chain=prerouting content=\
statics.poker.static.zynga.com disabled=no new-connection-mark=fb_game \
passthrough=yes
add action=mark-connection chain=prerouting disabled=no dst-port=9339,843 \
new-connection-mark=fb_game passthrough=yes protocol=tcp
add action=mark-packet chain=prerouting connection-mark=fb_game disabled=no \
new-packet-mark=gamefb passthrough=no
add action=mark-connection chain=prerouting disabled=no new-connection-mark=\
users-con passthrough=yes src-address=!192.168.2.254 src-address-list=!IP
add action=mark-packet chain=prerouting connection-mark=users-con disabled=no \
new-packet-mark=users passthrough=yes
add action=mark-connection chain=prerouting comment=IDM disabled=no \
layer7-protocol=download new-connection-mark=idm passthrough=yes \
src-address=!192.168.2.254 src-address-list=!IP
add action=mark-packet chain=prerouting connection-mark=idm disabled=no \
new-packet-mark=idm passthrough=no
add action=mark-connection chain=prerouting comment=Browsing disabled=no \
layer7-protocol=google new-connection-mark=google passthrough=yes \
src-address=!192.168.2.254 src-address-list=!IP
add action=mark-packet chain=forward connection-mark=google disabled=no \
new-packet-mark=google passthrough=no src-address=!192.168.2.254
add action=mark-connection chain=prerouting disabled=no layer7-protocol=\
youtube new-connection-mark=stream-idm passthrough=yes src-address=\
!192.168.2.254 src-address-list=!IP
add action=mark-packet chain=prerouting connection-mark=stream-idm disabled=\
no new-packet-mark=stream-idm passthrough=no
add action=mark-connection chain=prerouting comment=ICMP disabled=no \
new-connection-mark="paket ic" passthrough=yes protocol=icmp
add action=mark-packet chain=prerouting connection-mark="paket ic" disabled=\
no new-packet-mark="paket ip" passthrough=yes
add action=change-dscp chain=prerouting disabled=no new-dscp=1 packet-mark=\
"paket ip" passthrough=yes
add action=mark-connection chain=prerouting comment=DNS disabled=no dst-port=\
53 new-connection-mark="paket dc" passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting disabled=no dst-port=53 \
new-connection-mark="paket dc" passthrough=yes protocol=udp
add action=mark-packet chain=prerouting connection-mark="paket dc" disabled=\
no new-packet-mark="paket dp" passthrough=yes
add action=change-dscp chain=prerouting disabled=no new-dscp=1 packet-mark=\
"paket dp" passthrough=yes
add action=mark-connection chain=prerouting comment="MIVO TV" disabled=no \
layer7-protocol=http-video new-connection-mark=paket-mtc passthrough=yes \
src-address=!192.168.2.254 src-address-list=!IP
add action=mark-packet chain=forward connection-mark=paket-mtc disabled=no \
new-packet-mark=paket-mtc passthrough=no
add action=mark-connection chain=prerouting comment=Camfrog disabled=no \
dst-port=2779,6667 new-connection-mark=camfrog passthrough=yes protocol=\
tcp
add action=mark-packet chain=prerouting connection-mark=camfrog disabled=no \
new-packet-mark=camfrog passthrough=no
add action=mark-connection chain=forward comment=bittorent disabled=no \
layer7-protocol=bittorent new-connection-mark=bittorent-limit \
passthrough=yes
add action=mark-packet chain=forward connection-mark=bittorent-limit \
disabled=no new-packet-mark=packet-bittorent passthrough=no
add action=mark-connection chain=forward comment=torrent-wws disabled=no \
layer7-protocol=torrent-wws new-connection-mark=wws-limit passthrough=yes
add action=mark-packet chain=forward connection-mark=wws-limit disabled=no \
new-packet-mark=packet-wws passthrough=no
add action=mark-connection chain=forward comment=torrent-www disabled=no \
layer7-protocol=torrent-www new-connection-mark=www-limit passthrough=yes
add action=mark-packet chain=forward connection-mark=www-limit disabled=no \
new-packet-mark=packet-www passthrough=no
add action=mark-connection chain=forward comment=torrent-allp2p disabled=no \
new-connection-mark=allp2p-limit p2p=all-p2p passthrough=yes
add action=mark-packet chain=forward connection-mark=allp2p-limit disabled=no \
new-packet-mark=packet-allp2p passthrough=no
add action=mark-connection chain=forward comment=torrent-port disabled=no \
new-connection-mark=port-limit passthrough=yes protocol=tcp src-port=\
58561,58045,14948,58008,58816,59097
add action=mark-packet chain=forward connection-mark=port-limit disabled=no \
new-packet-mark=packet-port passthrough=no
# setting redirect untuk mengarahkan user menggunakan DNS nawala anti porno, nonaktifkan
bila tidak diperlukan
add action=redirect chain=dstnat comment=\
"Redirect ke Port 53 untuk nawala anti porno project" disabled=no \
dst-port=53 protocol=tcp src-address=192.168.2.0/24 to-ports=53
add action=redirect chain=dstnat disabled=no dst-port=53 protocol=udp \
src-address=192.168.2.0/24 to-ports=53
# pengaturan welcome text untuk consol terminal, bisa diganti dengan identitas anda
/system note
set note="M" show-at-login=yes
# menentukan jadwal eksekusi script membuat ARP otomatis untuk anti spoofing
/system scheduler
add disabled=no interval=20m name=leases on-event=lease policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/25/2013 start-time=04:58:44
# script untuk memastikan mikrotik menggunakan dns yg kita tentukan setiap terjadi reboot
/system script
add name=dnschange policy=ftp,reboot,read,write,policy,test,winbox,password \
source="/ip dns set servers=203.130.193.74,203.130.206.250 allow-remote-re\
quests=yes"
# script untuk mengubah arp dinamic menjadi static untuk menghindari spoofing oleh netcut
/system script
add name=lease policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source="/ip dhcp-server lease make-static [/ip dhcp-server lease find]"
# script untuk menandai setiap paket yang berasal dari server akamai
/system script
add name=akamai policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source=":foreach i in=[/ip dns cache find] do={\r\
\n:local bNew \"true\";\r\
\n:local cacheName [/ip dns cache all get \$i name] ;\r\
\n# :put \$cacheName;\r\
\n\r\
\n:if ([:find \$cacheName \"akamai\"] != 0) do={\r\
\n\r\
\n:local tmpAddress [/ip dns cache get \$i address] ;\r\
\n# :put \$tmpAddress;\r\
\n\r\
\n# if address list is empty do not check\r\
\n:if ( [/ip firewall address-list find ] = \"\") do={\r\
\n:log info (\"added entry: \$[/ip dns cache get \$i name] IP \$tmpAddress\
\");\r\
\n/ip firewall address-list add address=\$tmpAddress list=akamai comment=\
\$cacheName;\r\
\n} else={\r\
\n:foreach j in=[/ip firewall address-list find ] do={\r\
\n:if ( [/ip firewall address-list get \$j address] = \$tmpAddress ) do={\
\r\
\n:set bNew \"false\";\r\
\n}\r\
\n}\r\
\n:if ( \$bNew = \"true\" ) do={\r\
\n:log info (\"added entry: \$[/ip dns cache get \$i name] IP \$tmpAddress\
\");\r\
\n/ip firewall address-list add address=\$tmpAddress list=akamai comment=\
\$cacheName;\r\
\n}\r\
\n}\r\
\n}\r\
\n}\r\
\n}"
# script untuk menandai setiap paket yang berasal dari server anonymous
/system script
add name=anonymox policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source=":foreach i in=[/ip dns cache find] do={\r\
\n:local bNew \"true\";\r\
\n:local cacheName [/ip dns cache all get \$i name] ;\r\
\n# :put \$cacheName;\r\
\n\r\
\n:if ([:find \$cacheName \"anony\"] != 0) do={\r\
\n\r\
\n:local tmpAddress [/ip dns cache get \$i address] ;\r\
\n# :put \$tmpAddress;\r\
\n\r\
\n# if address list is empty do not check\r\
\n:if ( [/ip firewall address-list find ] = \"\") do={\r\
\n:log info (\"added entry: \$[/ip dns cache get \$i name] IP \$tmpAddress\
\");\r\
\n/ip firewall address-list add address=\$tmpAddress list=anonymox comment\
=\$cacheName;\r\
\n} else={\r\
\n:foreach j in=[/ip firewall address-list find ] do={\r\
\n:if ( [/ip firewall address-list get \$j address] = \$tmpAddress ) do={\
\r\
\n:set bNew \"false\";\r\
\n}\r\
\n}\r\
\n:if ( \$bNew = \"true\" ) do={\r\
\n:log info (\"added entry: \$[/ip dns cache get \$i name] IP \$tmpAddress\
\");\r\
\n/ip firewall address-list add address=\$tmpAddress list=anonymox comment\
=\$cacheName;\r\
\n}\r\
\n}\r\
\n}\r\
\n}\r\
\n}"
# script untuk menandai setiap paket yang berasal dari server proxy luar negeri
/system script
add name=proxi policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source=":foreach i in=[/ip dns cache find] do={\r\
\n:local bNew \"true\";\r\
\n:local cacheName [/ip dns cache all get \$i name] ;\r\
\n# :put \$cacheName;\r\
\n\r\
\n:if (([:find \$cacheName \"proxy\"] != 0) || ([:find \$cacheName \"proxi\
\"] != 0)) do={\r\
\n\r\
\n:local tmpAddress [/ip dns cache get \$i address] ;\r\
\n# :put \$tmpAddress;\r\
\n\r\
\n# if address list is empty do not check\r\
\n:if ( [/ip firewall address-list find ] = \"\") do={\r\
\n:log info (\"added entry: \$[/ip dns cache get \$i name] IP \$tmpAddress\
\");\r\
\n/ip firewall address-list add address=\$tmpAddress list=proxys comment=\
\$cacheName;\r\
\n} else={\r\
\n:foreach j in=[/ip firewall address-list find ] do={\r\
\n:if ( [/ip firewall address-list get \$j address] = \$tmpAddress ) do={\
\r\
\n:set bNew \"false\";\r\
\n}\r\
\n}\r\
\n:if ( \$bNew = \"true\" ) do={\r\
\n:log info (\"added entry: \$[/ip dns cache get \$i name] IP \$tmpAddress\
\");\r\
\n/ip firewall address-list add address=\$tmpAddress list=proxys comment=\
\$cacheName;\r\
\n}\r\
\n}\r\
\n}\r\
\n}"
# pastikan untuk tidak mengubah apapun sebelum anda memahaminya benar-benar untuk
menghindari kesalahan
# Yups, semua sudah selesai, restart mikrotik anda.
# Anda dapat mendownload script diatas : disini atau disini
# Nb : seluruh tutorial tersebut sudah saya buktikan sendiri, jika ada tambahan, silahkan
komentar dan saran2nya, maaf bila tidak disertakan gambar.
# Created & modified by jinho at bagan batu, no more really secure, but need more time to make
it broken. enjoy :)
PCC LOADBALANCE 2 SPEEDY + BANDWIDTH MANAGEMENT MIKROTIK
RB750
# pastikan anda mengganti username dan password speedy anda (ditandai dengan xxxxxx) -
# di bagian interface pppoe-client pada script ini.
# Script ini sudah di uji menggunakan 2 line speedy yang gateway-nya sama maupun tidak.
# Script ini tetap stabil pada Routerboard mikrotik RB750 versi 5.4 dengan CPU 400 mhz
/interface ethernet
set 0 arp=enabled name=ether1-gateway
set 1 arp=enabled master-port=none name=ether2-master-local
set 2 arp=enabled master-port=none name=ether3-slave-local
set 3 arp=enabled master-port=none name=ether4-slave-local
set 4 arp=enabled master-port=none name=ether5-slave-local
/ip pool
add name=dhcp_pool1 ranges=192.168.1.2-192.168.1.254
/ip dhcp-server
add address-pool=dhcp_pool1 authoritative=after-2sec-delay bootp-support=\
static disabled=no interface=ether1-gateway lease-time=3d name=dhcp1
/interface pppoe-client
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
dial-on-demand=no disabled=no interface=ether2-master-local max-mru=1480 \
max-mtu=1480 mrru=disabled name=PPPoE-1 password=xxxxxxxx profile=\
default service-name="" use-peer-dns=yes [email protected]
add ac-name="" add-default-route=yes allow=pap,chap,mschap1,mschap2 \
dial-on-demand=no disabled=no interface=ether3-slave-local max-mru=1480 \
max-mtu=1480 mrru=disabled name=PPPoE-2 password=xxxxxxxxx profile=\
default service-name="" use-peer-dns=yes [email protected]
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=3.DOWNLOAD parent=global-in priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=3.1.Limited packet-mark=users parent=3.DOWNLOAD \
priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=1.BROWSING parent=global-out priority=4
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=6.TUBE-TV packet-mark=users parent=global-out priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=2.KONEKSI parent=global-total priority=2
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name="4.LIVE VIDEO" parent=global-in priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=5.GAME parent=global-out priority=3
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=7.Chat packet-mark=users parent=global-in priority=8
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name="8. Bittorent" packet-mark=packet-bittorent parent=\
global-out priority=8
/queue type
set default kind=pfifo name=default pfifo-limit=50
set ethernet-default kind=pfifo name=ethernet-default pfifo-limit=50
set wireless-default kind=sfq name=wireless-default sfq-allot=1514 \
sfq-perturb=5
set synchronous-default kind=red name=synchronous-default red-avg-packet=1000 \
red-burst=20 red-limit=60 red-max-threshold=50 red-min-threshold=10
set hotspot-default kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=\
5
add kind=pcq name=PCQ_download pcq-burst-rate=0 pcq-burst-threshold=0 \
pcq-burst-time=10s pcq-classifier=dst-address pcq-dst-address-mask=32 \
pcq-dst-address6-mask=128 pcq-limit=50 pcq-rate=0 pcq-src-address-mask=32 \
pcq-src-address6-mask=128 pcq-total-limit=2000
add kind=pcq name=PCQ_upload pcq-burst-rate=0 pcq-burst-threshold=0 \
pcq-burst-time=10s pcq-classifier=src-address pcq-dst-address-mask=32 \
pcq-dst-address6-mask=128 pcq-limit=50 pcq-rate=0 pcq-src-address-mask=32 \
pcq-src-address6-mask=128 pcq-total-limit=2000
add kind=pcq name=pcq-download2 pcq-burst-rate=0 pcq-burst-threshold=0 \
pcq-burst-time=10s pcq-classifier=dst-address pcq-dst-address-mask=32 \
pcq-dst-address6-mask=128 pcq-limit=50 pcq-rate=0 pcq-src-address-mask=32 \
pcq-src-address6-mask=128 pcq-total-limit=2000
add kind=pcq name=pcq-upload pcq-burst-rate=0 pcq-burst-threshold=0 \
pcq-burst-time=15s pcq-classifier=src-address pcq-dst-address-mask=32 \
pcq-dst-address6-mask=128 pcq-limit=50 pcq-rate=0 pcq-src-address-mask=32 \
pcq-src-address6-mask=128 pcq-total-limit=2000
add kind=pfifo name=PING pfifo-limit=64
add kind=pcq name=DOWN pcq-burst-rate=0 pcq-burst-threshold=0 pcq-burst-time=\
10s pcq-classifier=dst-address,dst-port pcq-dst-address-mask=32 \
pcq-dst-address6-mask=128 pcq-limit=50 pcq-rate=0 pcq-src-address-mask=32 \
pcq-src-address6-mask=128 pcq-total-limit=2000
add kind=pcq name=torrent pcq-burst-rate=0 pcq-burst-threshold=0 \
pcq-burst-time=10s pcq-classifier=dst-address pcq-dst-address-mask=32 \
pcq-dst-address6-mask=128 pcq-limit=50 pcq-rate=128k \
pcq-src-address-mask=32 pcq-src-address6-mask=128 pcq-total-limit=2000
add kind=pcq name=limited pcq-burst-rate=0 pcq-burst-threshold=256k \
pcq-burst-time=10s pcq-classifier=src-address pcq-dst-address-mask=32 \
pcq-dst-address6-mask=64 pcq-limit=50 pcq-rate=0 pcq-src-address-mask=32 \
pcq-src-address6-mask=64 pcq-total-limit=2000
add kind=pcq name=akamai pcq-burst-rate=0 pcq-burst-threshold=256k \
pcq-burst-time=10s pcq-classifier=dst-address pcq-dst-address-mask=32 \
pcq-dst-address6-mask=64 pcq-limit=50 pcq-rate=0 pcq-src-address-mask=32 \
pcq-src-address6-mask=64 pcq-total-limit=2000
set default-small kind=pfifo name=default-small pfifo-limit=10
/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=5.1.Game-Online packet-mark=online parent=5.GAME \
priority=2 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name="5.2.Game FB" packet-mark=gamefb parent=5.GAME priority=\
2 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=3.1.2.Hit packet-mark=hit parent=3.1.Limited priority=8 \
queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=3.1.1.IDM packet-mark=idm parent=3.1.Limited priority=8 \
queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=4.1.youtube packet-mark=stream-idm parent="4.LIVE VIDEO" \
priority=8 queue=DOWN
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name="1.1.http brows" packet-mark=google parent=1.BROWSING \
priority=3 queue=pcq-upload
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=2.1.ping-out packet-mark="paket ip" parent=2.KONEKSI \
priority=1 queue=PING
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=2.2.ping-in packet-mark="paket dp" parent=2.KONEKSI \
priority=1 queue=PING
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name="6.1.Tube Stream" packet-mark=users parent=6.TUBE-TV \
priority=8 queue=pcq-download2
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=6.2.Mivo.TV packet-mark=paket-mtc parent=6.TUBE-TV \
priority=8 queue=pcq-upload
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name="7.1. Camfrog" packet-mark=camfrog parent=7.Chat \
priority=8 queue=pcq-upload
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=wws packet-mark=packet-wws parent="8. Bittorent" \
priority=8 queue=torrent
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=www packet-mark=packet-www parent="8. Bittorent" \
priority=8 queue=torrent
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=port packet-mark=packet-port parent="8. Bittorent" \
priority=8 queue=torrent
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=allp2p packet-mark=packet-allp2p parent="8. Bittorent" \
priority=8 queue=torrent
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
max-limit=0 name=1.2.akamai packet-mark=akamai parent=1.BROWSING \
priority=8 queue=akamai
/ip address
add address=192.168.1.1/24 disabled=no interface=ether1-gateway network=192.168.1.0
add address=192.168.5.2/24 disabled=no interface=ether2-master-local network=192.168.5.0
add address=192.168.4.2/24 disabled=no interface=ether3-slave-local network=192.168.4.0
/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB \
max-udp-packet-size=512 servers=203.130.193.74,203.130.206.250
/ip route
add check-gateway=arp disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
PPPoE-1 routing-mark=Route1 scope=255 target-scope=10
add check-gateway=arp disabled=no distance=2 dst-address=0.0.0.0/0 gateway=\
PPPoE-1 routing-mark=Route1 scope=255 target-scope=10
add check-gateway=arp disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
PPPoE-2 routing-mark=Route2 scope=255 target-scope=10
add check-gateway=arp disabled=no distance=2 dst-address=0.0.0.0/0 gateway=\
PPPoE-2 routing-mark=Route2 scope=255 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=PPPoE-1 scope=255 \
target-scope=10
/system clock
set time-zone-name=Asia/Jakarta
/system script
add name=cacheflush policy=ftp,reboot,read,write,policy,test,winbox,password \
source="/ip dns cache flush"
add name=antinetcut1 policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source=":local hosts [/ip dhcp-server lease find]\r\
\n:local pcname \"X\"\r\
\n:local pcnum 0\r\
\n:global hacklist \"\"\r\
\n:foreach h in \$hosts do={\r\
\n:local host [/ip dhcp-server lease get \$h host-name]\r\
\n:if ([:len \$host] >0) do {\r\
\n:set pcname (\$pcname . \",\" . \$host)\r\
\n:set pcnum (\$pcnum + 1)\r\
\n}\r\
\n}\r\
\n:foreach h in \$pcname do={\r\
\n:local hh 0\r\
\n:if (!([:find \$hacklist \$h]>=0)) do={\r\
\n:foreach k in \$pcname do={ :if (\$k=\$h) do={:set hh (\$hh + 1) } }\r\
\n:if (\$hh>2) do={\r\
\n:if ([:len \$hacklist] >0) do {:set hacklist (\$hacklist . \",\" . \$h)}\
\_else={:set hacklist \$h}\r\
\n}\r\
\n}\r\
\n}\r\
\n:local timer [:pick [/system clock get time] 3 5]\r\
\n:if ((\$switch > 0) || (\$timer >= \"58\")) do={\r\
\n:log warning (\"New Hacklist: \" . \$hacklist)"
add name=antinetcut2 policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source="# use global hacklist variable\r\
\n#:log info (\$hacklist)\r\
\n:foreach host in \$hacklist do={\r\
\n:foreach i in= [/ip dhcp-server lease find host-name \$host] do={\r\
\n:local ipnum [/ip dhcp-server lease get \$i address]\r\
\n:local unum [/ip hotspot active find address \$ipnum]\r\
\n:if ([:len \$unum] >0) do {\r\
\n:local usr [/ip hotspot active get \$unum user]\r\
\n:log warning (\$host . \" \" . \$ipnum . \" \" . \$usr)\r\
\n#next line kick them out right now, could also check pppoe\r\
\n/ip hotspot active remove \$unum\r\
\n#other stuff can do now with the identified IP and USER\r\
\n}\r\
\n}\r\
\n}"
add name=ntp policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source="/system ntp client set enabled=yes mode=unicast primary-ntp=202.71\
.109.130 secondary-ntp=65.55.21.23\r\
\n"
add name=ntp2 policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source="/system clock set time-zone-name=Asia/Jakarta"
add name=dnschange policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source="/ip dns set servers=203.130.193.74,203.130.206.250 allow-remote-re\
quests=yes"