Mikrotik: belajar Wlan dan Vlan

Untuk membuat vlan dan wlan di mikrotik, sebaiknya paham dulu konsep vlan.
Biar cepet nyambung. Dan tidak bingung berkepanjangan :D

Sampai saat ini saya baru bisa mengaplikasian vlan pada wlan mikrotik dengan 2 cara :

vlan access pada AP
vlan access pada Client.

Konfigurasi vlan pada AP pada intinya mengatur agar wlan (dan wds) yang mengarah ke klient menjadi anggota vlan tersebut.
Read more »

Squid zph and Mikrotik

Bonus tambahan dari squid 2.7-stable3 adalah fungsi zph yang sudah terintegrasi.

ZPH sendiri adalah Zero Penalty Hit, penjelasan-nya bisa dibaca di http://zph.bratcheda.org/

Pada 2.7 sudah masuk dalam core engine squid.
Sebelum versi 2.7 harus melakukan patch.

Tutorial di bawah ini saya memakai squid dari caching youtube.

Read more »

Friendster error

Gara-gara friendster error, jadi tahu kalau friendster “pada saat tulisan ini ditulis” pakai system reverse proxy.

Mikrotik: DHCP Pool usage

Diambil dari http://forum.mikrotik.com/viewtopic.php?f=9&t=19389

tested on 3.7

# WarnAt needs to be at what percentage you want to be warned you are running out of IP addresses.
:local WarnAt 10
#Name of DHCP Pool you want to monitor
:local DHCPPoolName dhcp_pool1
#Your Email to notify you when running out of available ip's
:local Email my@email.com
#Your mail server ip address
:local EmailServer 0.0.0.0

#Declare Variable
:local Total

:foreach i in=[/ip pool get $DHCPPoolName ranges] do={
#Get the DHCP pool range and put into a string.
:local range [:tostr $i]
#Get the Start address of the range
:local Start [:pick $range 0 [:find $range "-"]]
#Get the End address of the range
:local Stop [:pick $range ([:find $range "-"] + 1) 31]
#Calculate how many IP's are in the Pool by subtracting the end address and the start address and add one.
:local ip ($Stop - $Start +1 )
#Save the size of the pool to Total
:set Total ($ip + $Total)
}

#Get the name of the Server that is using the Pool
:local Server [/ip dhcp-server get [/ip dhcp-server find address-pool="$DHCPPoolName"] name]
#Get the number of IP address's used in the pool
:local Used [/ip dhcp-server lease print count-only where server=[/ip dhcp-server get [/ip dhcp-server find address-pool=$DHCPPoolName] name]]
#Subtract used from total to get available
:local Available ($Total - $Used)
#Calculate percentage IP's available
:local Perc (($Available * 100) / $Total)
#Setup e-mail
:local Subject ([/system identity get name] . " DHCP pool is at $Perc")
:local Body ("Out of $Total addresses you have $Available available")

#Send out Email when available ip's percentage is below or equal to warnat
:if ($Perc <= $WarnAt) do={
/tool e-mail send to=$Email subject=$Subject body=$Body server=$EmailServer
}
:log info $Body

Fetch Tool

Di posting dari email newsletter mikrotik.com, fitur baru yang ada di versi 3.x.

Akan sangat berguna untuk mendonlot file nice.rsc dari mikrotik.co.id :D

For some time now, RouterOS has a neat little feature – it’s called Fetch.
It is a HTTP and FTP client program that allows you to download iles to your router.

For example fetch in action:

[admin@I] /tool> fetch address=human.network.com \
path=index.php host=forum.mikrotik.com
status: connecting

status: downloading
downloaded: 7KiB
duration: 1s

atau bila gagal coba dengan syntax url

[admin@I] /tool> fetch url=http://ixp.mikrotik.co.id/download/nice.rsc

Script to save logs and send via email

Diambil dari forum.mikrotik.com

Script ini hanya berjalan di versi 3.x, di versi 2.9.x tidak berjalan, apalagi versi 2.9.27

Pastikan anda sudah mengisi server dan from di konfigurasi mikrotik.

/system script add name="LogDump" policy=ftp,reboot,read,write,policy,test,winbox,password,sniff source="
:local body
:foreach int in=[/log find ] do={
  :set body ("$body\r\n" . [/log get $int])
}
/tool e-mail send to="YOU@DOMAIN.COM" subject=([/system identity get name] . " Log " . [/system clock get date]) body=$body
/system logging action set memory memory-lines=1
/system logging action set memory memory-lines=100"

Read more »