Script to save logs and send via email

Diambil dari

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 »

How to change dynamic queues

Diambil dari

Saya belum bisa mendeskripsikan secara jelas fungsi script di bawah.
Tetapi dari thread di topik, ini berfungsi untuk mengganti rate di user pada saat koneksi sedang berjalan.

Read more »

Mikrotik: case hotspot

Kasus ini ditanyakan ke saya oleh mas Ronny Susetyo aka ballacksave, admin (ngaku-nya newbie) via YM


Nah pertanyaan saya pada dasarx sama seperti dasep yaitu bgm client yg di bawah mikrotik
(dosen, sabarnet,hotspot) klo buka jaringan yg diatas mikrotik seperti webserver, mail dan webhosting ( bisa nggak ke limit, tapi klo browsing ke internet tetep ke limit.
di mikrotikx saya pake /ip hotspot, untuk bagi2 bandwidthx……
mohon pencerahan…

Read more »

Burst for each TCP connection

Diambil dari

This is little how-to create manual burst using queue tree.

As it is bandwidth control using queue tree first we need to mangle traffic

first i mangle all connections, then i mark first 2Mbytes then i mark the rest of packets

/ip firewall mangle add chain=forward protocol=tcp \
action=mark-connection \
new-connection-mark=new_conn passthrough=yes \
comment="mark all new connections" disabled=no

/ip firewall mangle add chain=forward protocol=tcp  \
connection-mark=new_conn \
connection-bytes=0-2000000 action=mark-packet \
new-packet-mark=new_packet passthrough=no \
comment="mark packets" disabled=no

/ip firewall mangle add chain=forward protocol=tcp \
connection-mark=new_conn action=mark-packet \
new-packet-mark=old_packets passthrough=no \
comment="marking old packets" disabled=no

Read more »

How to convert a MT box in an Anti Spam server with v2.9

Diambil dari

Hi there, for months I have the idea how to transform one Mikrotik OS in an Anti Spam server. After more than 20 days applying few scripts, firewall rules and address list, I have achieved reduce from 45.000 mails per day to only 11.000/12.000 without many complaints from my customers.

Before continuing, some details about this:

Yes, I know that exists others solutions.
Yes, I know with Linux can obtain the same results.
Yes, I know that it seems a crazy solution.
Yes, I know (in the practice) that this solutions generate a moderate cpu usage. I have a Pentium IV with 75% of cpu usage (this can change with new features from MT… see scripts explanation) and we are a little ISP.
Yes, yes, yes…
I use MT from six years ago (when John Tully & Arnis Riekstins answered the company mails themselves) and always I try to resolve any networking necessity whit MT.
I had the trust that can resolve this whit MT.
and after thinking about this, I can’t never sleep all night from many days, so, for my health and wife I made it !!!

Read more »

Disconnecting the users with bad signal [2.9.X]

Diambil dari


Small manual:
Install – click system->scripts, click “+”, enter in the name whatevery you want (like signallimiter), click ok, done!

Read more »