Dibuat dan dikembangkan oleh Harijanto Pribadi, MTCNA., MTCTCE., MTCUME
Note:
mcix.rsc digenerate setiap pukul 03:00:00 WIB pagi
Anda bisa mendownload pada pukul 04:00:00 WIB pagi
anda bisa mendownload mcix dari sini, atau anda bisa menggunakan script untuk mengunduh dan mengimport jadwal secara otomatis pada MikroTik Router anda
Bagaimana cara mengimport:
Cara #1
copy paste script ini pada terminal MikroTik Router anda
/system scheduler
add comment=update-mcix disabled=yes interval=1d name=update-mcix-rsc \
on-event=”:if ([:len [/file find name=mcix.rsc]] > 0) do={ /file remove \
mcix.rsc }; /tool fetch address=hts.net.id src-path=/mcix/mcix.rsc mode=\
http ;/import mcix.rsc” policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive \
start-date=jan/01/1970 start-time=04:00:00
Cara #2
copy paste script ini pada terminal MikroTik Router anda
/system scheduler
add disabled=no interval=1d name=update-mcix-script on-event=mcix policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=feb/15/2012 start-time=05:00:00
/system script
add name=mcix policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
source=”:log info \”Removing file=mcix.rsc, starting.\” \r\
\n:if ([:len [/file find name=mcix.rsc]] > 0) do={ /file remove mcix.rsc\
\_};\r\
\n:log info \”Removing file=mcix.rsc, finished.\”\r\
\n:log info \”Fetch file=mcix.rsc, starting.\”\r\
\n/tool fetch address=hts.net.id src-path=/mcix/mcix.rsc mode=http\r\
\n:log info \”Importing file=mcix.rsc, starting.\”\r\
\n/import mcix.rsc\r\
\n:delay 10s\r\
\n:log info \”Import file=mcix.rsc, finished.\”;”
Membuat MCIX address-list anda sendiri
Anda dapat membuat address-list mcix sendiri, bila upstream bgp router anda dapat mengadvertise semua prefix mcix dengan bgp-as-path 55818 ke BGP router protokol paada MikroTik anda
dan anda bisa menggunakan script ini untuk membuat address-list mcix dari routing table aktif dalam MikroTik router anda
/system script
add name=mcix source=”:log info \”Removing all MCIX, starting sync.\” \r\
\n:foreach subnet in=[/ip firewall address-list find list=mcix] do={ \r\
\n/ip firewall address-list remove \$subnet \r\
\n};\r\
\n:log info \”Removing all MCIX, finihsed.\”\r\
\n:log info \”Creating all active MCIX, starting.\”\r\
\n:foreach subnet in=[/ip route find gateway=\"xxx.xxx.xxx.xxx\" active] do={ \r\
\n:set subnet [/ip route get \$subnet dst-address] \r\
\n:log info (\”Found \” . \$subnet . \” as MCIX entry.\”)\r\
\n/ip firewall address-list add list=mcix address=\$subnet \r\
\n:delay 1s\r\
\n};\r\
\n:log info \”Creating all active MCIX, finished.\”\r\
\n:log info \”Export address-list=mcix to file=mcix.rsc, starting.\” \r\
\n/ip firewall address-list export file=mcix\r\
\n:delay 60s\r\
\n:log info \”Upload file=mcix.rsc to ftp://ftp.abc.com, starting.\” \r\
\n/tool fetch address=ftp.abc.com src-path=mcix.rsc user=mcix@abc.com mod\
e=ftp password=12345678 dst-path=mcix.rsc upload=yes\r\
\n:log info \”Upload file=mcix.rsc Finished\”\r\
\n”
note:
ganti “xxx.xxx.xxx.xxx” dengan mcix gateway ipv4 anda
ganti “ftp.abc.com” dengan URL ftp anda
ganti “mcix@abc.com” dengan username ftp anda
ganti “12345678″ dengan ftp password anda
Selamat Mencoba.
dialihbahasakan dari http://hts.net.id/mcix








