<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2312773445344116876</id><updated>2012-02-17T11:18:46.988+07:00</updated><title type='text'>Aria Perdana</title><subtitle type='html'>Bagi Yang Pengen Belajar Mikrotik, Ini Mungkin Sangat Membantu.....</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>56</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-5488225110062264049</id><published>2008-04-18T20:51:00.001+07:00</published><updated>2008-04-18T20:53:21.345+07:00</updated><title type='text'>Setting Hotspot Menggunakan Mikrotik</title><content type='html'>/ radius &lt;br /&gt;add service=hotspot called-id="" domain="Radius" address=192.168.1.3 \&lt;br /&gt;secret="123456" authentication-port=1812 accounting-port=1813 \&lt;br /&gt;timeout=900ms accounting-backup=no realm="" comment="" disabled=no &lt;br /&gt;/ radius incoming &lt;br /&gt;set accept=yes port=1700 &lt;br /&gt;&lt;br /&gt;/ ip hotspot &lt;br /&gt;add name="Hotspot2" interface=Lokal address-pool=hs-pool-1 profile=hsprof2 idle-timeout=none keepalive-timeout=none disabled=no &lt;br /&gt;&lt;br /&gt;/ ip hotspot profile &lt;br /&gt;add name="hsprof2" hotspot-address=192.168.1.3 dns-name="hotlink.net" \&lt;br /&gt;html-directory=hotspot rate-limit="" http-proxy=192.168.1.3:3128 \&lt;br /&gt;smtp-server=0.0.0.0 login-by=http-chap split-user-domain=no use-radius=yes \&lt;br /&gt;radius-accounting=yes radius-interim-update=5s nas-port-type=0 \&lt;br /&gt;radius-default-domain="Radius" radius-location-id="" \&lt;br /&gt;radius-location-name="" &lt;br /&gt;&lt;br /&gt;/ tool user-manager router &lt;br /&gt;add subscriber=admin name="Hotlink.net" ip-address=192.168.1.3 \&lt;br /&gt;shared-secret="123456" comment="" disabled=no &lt;br /&gt;&lt;br /&gt;/ ip dns static &lt;br /&gt;add name="hotlink.net" address=192.168.1.3 ttl=1d&lt;br /&gt;&lt;br /&gt;kmudian setelah itu bikin user dan di http://hotlink.net/userman&lt;br /&gt;&lt;br /&gt;eh jgn lupa bikin dulu customernya ... biar bisa masuk ke userman&lt;br /&gt;&lt;br /&gt;/ tool user-manager customer &lt;br /&gt;add subscriber=admin login="admin" password="admin" company="HOTlink" \&lt;br /&gt;city="Bandung" country="Indonesia" date-format="%m/%d/%y" \&lt;br /&gt;email="admin@hotlink-id.net" time-zone=+00:00 permissions=owner \&lt;br /&gt;parent=admin comment="" disabled=no&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-5488225110062264049?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/5488225110062264049/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=5488225110062264049' title='1 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/5488225110062264049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/5488225110062264049'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/setting-hotspot-menggunakan-mikrotik.html' title='Setting Hotspot Menggunakan Mikrotik'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-5332751547735448171</id><published>2008-04-10T14:24:00.000+07:00</published><updated>2008-04-10T14:25:31.326+07:00</updated><title type='text'>Setting PC Router pakai FC 4</title><content type='html'>Dari pada beli modem lagi Rp. 400-500k baik bikin router sendiri .. ya ndak ? Model Pentium II juga udah ampuh banged ! Saya lakukan sejak 2 tahun lalu di Net tongkrongan saya Ngetopnet.&lt;br /&gt;&lt;br /&gt;Keterangan : Saya menggunakan Fedora Core 2 dengan Kompi Server specs : P III 866 Mhz, 10 GB HDD, 128 MB SDRAM, 2 MB VGA, 2 x 10/100 Ethernet (Auto detect by distro).&lt;br /&gt;&lt;br /&gt;Langkah 1 : Pastikan network card dalam system Arahan lsmod untuk menyenaraikan semua modul/perkakasan dalam system, pastikan eth0 dan eth1 atau e100 dan e1000 ada dalam list.&lt;br /&gt;#/sbin/lsmod &lt;br /&gt;Module used &lt;br /&gt;Eth 0(10/100) 0 &lt;br /&gt;Eth1 (gigabyte) 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Langkah 2: Pastikan eth0 dan eth1 ada dalam modules.conf ("Pada langkah kedua ini saya tidak melakukannya karena tidak ada settingan seperti ini.")&lt;br /&gt;&lt;br /&gt;#vi /etc/modules.conf &lt;br /&gt;alias eth0 e100 &lt;br /&gt;alias eth1 e1000&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Langkah 3: set IP untuk eth0 (eth0 merupakan IP public atau IP Private dari ISP) dan eth1 (eth1 merupakan IP Local dari kita Sebagai Server untuk Client ! Harus berbeda dengan eth0 walalu hanya class c nya.)&lt;br /&gt;&lt;br /&gt;#cat /etc/sysconfig/network-scripts/ifcfg-eth0&lt;br /&gt;&lt;br /&gt;# Intel Corp.|82801BA/BAM/CA/CAM Ethernet Controller&lt;br /&gt;DEVICE=eth0&lt;br /&gt;BOOTPROTO=static&lt;br /&gt;HWADDR=00:02:A5:76:C1:26&lt;br /&gt;IPADDR=192.168.1.88&lt;br /&gt;NETWORK=192.168.1.0&lt;br /&gt;BROADCAST=192.168.1.255&lt;br /&gt;NETMASK=255.255.255.0&lt;br /&gt;GATEWAY=192.168.1.254&lt;br /&gt;ONBOOT=yes&lt;br /&gt;TYPE=Ethernet&lt;br /&gt;&lt;br /&gt;*masukkan semua nilai sama seperti nilai di atas. &lt;br /&gt;Untuk menukar nilai (edit), tekan Insert (INS) &lt;br /&gt;Bila selesai mengedit, untuk menyimpan (save) dan keluar, tekan Escape (ESC), kemudian masukan ":wq". (SHIFT-Doubledot, w, q) ENTER. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# cat /etc/sysconfig/network-scripts/ifcfg-eth1&lt;br /&gt;&lt;br /&gt;# Intel Corp.|82557/8/9 [Ethernet Pro 100]&lt;br /&gt;DEVICE=eth1&lt;br /&gt;ONBOOT=yes&lt;br /&gt;BOOTPROTO=static&lt;br /&gt;IPADDR=192.168.0.1&lt;br /&gt;NETWORK=192.168.0.0&lt;br /&gt;BROADCAST=192.168.0.255&lt;br /&gt;NETMASK=255.255.255.0&lt;br /&gt;HWADDR=00:D0:B7:55:01:E0&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Langkah 4. Mengubah nilai dari "no" kepada "yes" NOZERO configuration (thanks n0x)&lt;br /&gt;&lt;br /&gt;#vi /etc/sysconfig/network &lt;br /&gt;&lt;br /&gt;masukkan pernyataan seperti di bawah &lt;br /&gt;&lt;br /&gt;NOZEROCONF=yes &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Langkah 5. Routing IP untuk Internet &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#/sbin/iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE&lt;br /&gt;# /sbin/iptables -t nat -nL   (checking aja)&lt;br /&gt;Chain PREROUTING (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination&lt;br /&gt;&lt;br /&gt;Chain POSTROUTING (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination&lt;br /&gt;MASQUERADE  all  --  0.0.0.0/0            0.0.0.0/0&lt;br /&gt;&lt;br /&gt;Chain OUTPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Langkah 6. Mengubah ip forwarding value to 1 &lt;br /&gt;Check the value for ip forwarding &lt;br /&gt;&lt;br /&gt;#echo 1 &gt; /proc/sys/net/ipv4/ip_forward &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Langkah 7. Mengubah nilai pada sysctl.conf &lt;br /&gt;&lt;br /&gt;#vi /etc/sysctl.conf&lt;br /&gt;# cat  /etc/sysctl.conf&lt;br /&gt;&lt;br /&gt;# Kernel sysctl configuration file for Red Hat Linux&lt;br /&gt;#&lt;br /&gt;# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and&lt;br /&gt;# sysctl.conf(5) for more details.&lt;br /&gt;&lt;br /&gt;# Controls IP packet forwarding&lt;br /&gt;net.ipv4.ip_forward = 1&lt;br /&gt;&lt;br /&gt;# Controls source route verification&lt;br /&gt;net.ipv4.conf.default.rp_filter = 1&lt;br /&gt;&lt;br /&gt;# Controls the System Request debugging functionality of the kernel&lt;br /&gt;kernel.sysrq = 0&lt;br /&gt;&lt;br /&gt;# Controls whether core dumps will append the PID to the core filename.&lt;br /&gt;# Useful for debugging multi-threaded applications.&lt;br /&gt;kernel.core_uses_pid = 1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Langkah 8. Save the iptables configuration &lt;br /&gt;&lt;br /&gt;#/sbin/service iptables save (nah itu yang terlupakan olh om praban dan om ogeb)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Langkah 9. Up all services &lt;br /&gt;&lt;br /&gt;#/sbin/service network restart  &lt;br /&gt;&lt;br /&gt;Langkah 10. trace route output. &lt;br /&gt;&lt;br /&gt;#route&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Lihat default gateway. Itu harus sama dengan gateway yang diberikan oleh ISP kamu (ADSL kami)&lt;br /&gt;&lt;br /&gt;Selesai.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Greetz to om praban (telah maksakan mau untuk membantu ihihihihhi), om ogeb (yang betah banged ngeladeni pertanyaanku dan menjelaskan how to), n0x (selayang baris yang membuat sempurna), dan rekan-rekan semua yang telah membantu sangat banyak.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-5332751547735448171?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/5332751547735448171/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=5332751547735448171' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/5332751547735448171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/5332751547735448171'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/setting-pc-router-pakai-fc-4.html' title='Setting PC Router pakai FC 4'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-8753343576940559574</id><published>2008-04-10T14:10:00.000+07:00</published><updated>2008-04-10T14:15:37.814+07:00</updated><title type='text'>Mikrotik dan Web Proxynya</title><content type='html'>MikroTik RouterOS™, merupakan system operasi Linux base yang diperuntuk &lt;br /&gt;kan sebagai network router. Didesain untuk memberikan kemudahan bagi &lt;br /&gt;penggunanya. Administrasinya bisa dilakukan melalui Windows application &lt;br /&gt;(WinBox). Webbrowser serta via Remote Shell (telnet dan SSH). Selain &lt;br /&gt;itu instalasi dapat dilakukan pada Standard computer PC. PC yang akan &lt;br /&gt;dijadi kan router mikrotikpun tidak memerlukan resource yang cukup besar &lt;br /&gt;untuk penggunaan standard, misalnya hanya sebagai gateway. Untuk keperluan &lt;br /&gt;beban yang besar ( network yang kompleks, routing yang rumit dll) &lt;br /&gt;disarankan untuk mempertimbangkan pemilihan resource PC yang memadai.&lt;br /&gt;&lt;br /&gt;Fasilitas pada mikrotik antara lain sebagai berikut :&lt;br /&gt;- Protokoll routing RIP, OSPF, BGP.&lt;br /&gt;- Statefull firewall&lt;br /&gt;- HotSpot for Plug-and-Play access&lt;br /&gt;- remote winbox GUI admin&lt;br /&gt;&lt;br /&gt;Lebih lengkap bisa dilihat di www.mikrotik.com.&lt;br /&gt;&lt;br /&gt;Meskipun demikian Mikrotik bukanlah free software, artinya kita harus&lt;br /&gt;membeli licensi terhadap segala fasiltas yang disediakan. Free trial &lt;br /&gt;hanya untuk 24 jam saja. Kita bisa membeli software mikrotik dalam &lt;br /&gt;bentuk CD yang diinstall pada Hard disk atau disk on module (DOM). &lt;br /&gt;Jika kita membeli DOM tidak perlu install tetapi tinggal menancapkan &lt;br /&gt;DOM pada slot IDE PC kita. &lt;br /&gt;&lt;br /&gt;Instalasi Mikrotik ada beberapa cara :&lt;br /&gt;1. Instalasi melalui NetInstall via jaringan&lt;br /&gt;2. Instalasi melalui Floppy disk&lt;br /&gt;3. Instalasi melalui CD-ROM.&lt;br /&gt;&lt;br /&gt;Kali ini kita akan membahasnya instalasi melalui CD-ROM. Untuk percobaan &lt;br /&gt;ini silahkan download ISOnya di http://adminpreman.web.id/download&lt;br /&gt;&lt;br /&gt;Langkah-langkah berikut adalah dasar-dasar setup mikrotik yang &lt;br /&gt;dikonfigurasikan untuk jaringan sederhana sebagai PC Router/Gateway, &lt;br /&gt;Web Proxy, DNS Server, DHCP, Firewall serta Bandwidth Management. &lt;br /&gt;Konfigurasi ini dapat dimanfaatkan untuk membangun jaringan pada &lt;br /&gt;Internet Cafe atau untuk Testing pada Laboratorium Pribadi.  &lt;br /&gt;&lt;br /&gt;--[2.1]-- Topologi Jaringan&lt;br /&gt;&lt;br /&gt;Topologi jaringan ini di anggap koneksi Internetnya melalui MODEM &lt;br /&gt;xDSL (ADSL atau SDSL). Dengan catatan konfigurasi IP Publiknya &lt;br /&gt;ditanam didalam MODEM, artinya perlu pula dipilih MODEM yang memiliki &lt;br /&gt;fasilitas seperti Routing, Firewall, dan lain-lain. Semakin lengkap &lt;br /&gt;semakin bagus, namun biasanya harga semakin mahal, yang patut &lt;br /&gt;dipertimbangkan pilihlah MODEM yang memiliki fasilitas Firewall yang &lt;br /&gt;bagus. &lt;br /&gt;&lt;br /&gt;Untuk MODEM SDSL, biasanya, IP dibawah NAT, artinya IP nya bukan IP &lt;br /&gt;Publik langsung. Dan umumnya untuk MODEM ADSL, IP Publiknya langsung &lt;br /&gt;ditanam di MODEM itu sendiri.&lt;br /&gt;&lt;br /&gt;Saat ini kita anggap IP Publiknya di tanam di MODEM, dimana Interface &lt;br /&gt;PPPoE nya sudah di konfigurasikan dan sudah bisa DIAL ke server RASnya.&lt;br /&gt;&lt;br /&gt;Agar memudahkan konfigurasi, perlu dirancang topologi jaringan yang  &lt;br /&gt;dikonfigurasi. Sebagai contoh, skema dibawah ini:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(a) Skema Jaringan&lt;br /&gt;&lt;br /&gt;              _(&lt;br /&gt;o--+      ____|   &lt;br /&gt;   |     /    |  Telpon&lt;br /&gt;   |   _/     -(&lt;br /&gt;   +--[_] Splitter&lt;br /&gt;       |&lt;br /&gt;       |   +----+ &lt;br /&gt;       +---|    | Modem xDSL&lt;br /&gt;           +--*-+&lt;br /&gt;           (1)|             +---+&lt;br /&gt;              |             |   |   (3)  &lt;br /&gt;              |             |  +|---------+   &lt;br /&gt;              |   +-----+   |  |. . . . . |&lt;br /&gt;              |  a|     |   |  +--|-|-|-|-+&lt;br /&gt;              +---|=====|   |     | | | |&lt;br /&gt;                  |     |   |     | | | | &lt;br /&gt;                  |     |---+     +-|-|-|--[client 1] &lt;br /&gt;                  |     |b          +-|-|------------[client 2]&lt;br /&gt;                  |     |             +-|----------------------[client 3] &lt;br /&gt;                  L-----J               +--------[client n]&lt;br /&gt;                    (2)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Keterangan skema&lt;br /&gt;(1) = Modem xDSL (Ip Address : 192.168.1.1/24)&lt;br /&gt;(2) = Mikrotik Box dengan 2 ethernet card yaitu a (publik) dan b (local)&lt;br /&gt;(3) = Switch&lt;br /&gt;      Untuk sambungan ke Client. Asumsi Client Jumlahnya 20 Client&lt;br /&gt;      Range Ip Address : 192.168.0.0/27 &lt;br /&gt;      Alokasi Ip Client = 192.168.0.1-192.168.0.30&lt;br /&gt;                          Ip Net ID    : 192.168.0.0/27&lt;br /&gt;                          Ip Broadcast : 192.168.0.31/27&lt;br /&gt;  &lt;br /&gt;                 &lt;br /&gt;(b) Alokasi IP Address&lt;br /&gt;&lt;br /&gt;[*] Mikrotik Box&lt;br /&gt; &lt;br /&gt;    Keterangan Skema&lt;br /&gt;    a = ethernet card 1 (Publik) -&gt; Ip Address : 192.168.1.2/24&lt;br /&gt;    b = ethernet card 2 (Local)  -&gt; Ip Address : 192.168.0.30/27&lt;br /&gt;&lt;br /&gt;    Gateway    : 192.168.1.1 (ke Modem)&lt;br /&gt;&lt;br /&gt;[*] Client   &lt;br /&gt;    Client 1 - Client n, Ip Address : 192.168.0.n .... n (1-30) &lt;br /&gt;    &lt;br /&gt;    Contoh:&lt;br /&gt;    Client 6 &lt;br /&gt;    Ip Address : 192.168.0.6/27&lt;br /&gt;    Gateway    : 192.168.0.30 (ke Mikrotik Box)&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;CATATAN :&lt;br /&gt;Angka dibelakang Ip address ( /27) sama dengan nilai netmasknya &lt;br /&gt;untuk angka (/27) nilainya sama dengan 255.255.255.224. &lt;br /&gt;&lt;br /&gt;Untuk Sub Netmask blok ip address Local kelas C, dapat diuraikan&lt;br /&gt;sebagai berikut :&lt;br /&gt;&lt;br /&gt;Subnetmask kelas C&lt;br /&gt;-------------------&lt;br /&gt;255.255.255.0   = 24 -&gt; 254 mesin&lt;br /&gt;     ..    .128 = 25 -&gt; 128 mesin&lt;br /&gt;     ..    .192 = 26 -&gt;  64 mesin&lt;br /&gt;     ..    .224 = 27 -&gt;  32 mesin&lt;br /&gt;     ..    .240 = 28 -&gt;  16 mesin&lt;br /&gt;     ..    .248 = 29 -&gt;   8 mesin&lt;br /&gt;     ..    .252 = 30 -&gt;   4 mesin&lt;br /&gt;     ..    .254 = 31 -&gt;   2 mesin&lt;br /&gt;     ..    .255 = 32 -&gt;   1 mesin&lt;br /&gt;&lt;br /&gt;--[2.2]-- Persiapan&lt;br /&gt;&lt;br /&gt;- Untuk PC Router Siapkan PC, minimal Pentium I, RAM 64, HD 500M &lt;br /&gt;atau pake flash memory 64 - Sebagai Web proxy, Siapkan PC, minimal &lt;br /&gt;Pentium III 450Mhz, RAM 256 Mb, HD 20 Gb.  Melihat berapa minimum &lt;br /&gt;RAM dan HD yang dibutuhkan untuk Cache Silahkan lihat &lt;br /&gt;http://adminpreman.web.id/download/Rumus Web Proxy Mikrotik.xls&lt;br /&gt;    &lt;br /&gt;- Siapkan minimal 2 ethernet card, 1 ke arah luar/Internet dan 1 &lt;br /&gt;  lagi ke Network local&lt;br /&gt;– Burn Source CD Mikrotik OS masukan ke CDROM.&lt;br /&gt;- Versi mikrotik yang digunakan adalah Mikrotik RouterOS versi 2.9.27&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--[3]-- Installasi Mikrotik Router&lt;br /&gt;Setelah desain skema jaringan serta perangkat yang dibutuhkan telah&lt;br /&gt;disiapkan, sekarang saatnya kita mulai proses instalasi ini.&lt;br /&gt;&lt;br /&gt;--[3.1]-- Booting melalui CD-ROM&lt;br /&gt;&lt;br /&gt;   Atur di BIOS agar, supaya boot lewat CD-ROM, kemudian tunggu beberapa &lt;br /&gt;   saat di monitor akan muncul proses Instalasi.&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;ISOLINUX 2.08 2003-12-12 Copyrigth (C) 1994-2003 H. Peter Anvin&lt;br /&gt;Loading linux..................&lt;br /&gt;Loading initrd.rgz.............&lt;br /&gt;Ready&lt;br /&gt;Uncompressing Linux... Ok, booting the kernel&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;--[3.2]-- Memilih paket software&lt;br /&gt;&lt;br /&gt;   Setelah proses booting akan muncul menu pilihan software yang&lt;br /&gt;   mau di install, pilih sesuai kebutuhan yang akan direncanakan.&lt;br /&gt;&lt;br /&gt;   Paket yang tersedia di Mikrotik&lt;br /&gt;&lt;br /&gt;   advanced-tools-2.9.27.npk&lt;br /&gt;   arlan-2.9.27.npk&lt;br /&gt;   dhcp-2.9.27.npk&lt;br /&gt;   gps-2.9.27.npk&lt;br /&gt;   hotspot-2.9.27.npk&lt;br /&gt;   hotspot-fix-2.9.27.npk&lt;br /&gt;   isdn-2.9.27.npk&lt;br /&gt;   lcd-2.9.27.npk &lt;br /&gt;   ntp-2.9.27.npk &lt;br /&gt;   ppp-2.9.27.npk&lt;br /&gt;   radiolan-2.9.27.npk&lt;br /&gt;   routerboard-2.9.27.npk&lt;br /&gt;   routing-2.9.27.npk&lt;br /&gt;   routing-test-2.9.27.npk&lt;br /&gt;   rstp-bridge-test-2.9.27.npk&lt;br /&gt;   security-2.9.27.npk&lt;br /&gt;   synchronous-2.9.27.npk&lt;br /&gt;   system-2.9.27.npk&lt;br /&gt;   telephony-2.9.27.npk&lt;br /&gt;   ups-2.9.27.npk&lt;br /&gt;   user-manager-2.9.27.npk&lt;br /&gt;   web-proxy-2.9.27.npk&lt;br /&gt;   webproxy-test-2.9.27.npk&lt;br /&gt;   wireless-2.9.27.npk&lt;br /&gt;   wireless-legacy-2.9.27.npk&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;        Welcome to Mikrotik Router Software Installation&lt;br /&gt;&lt;br /&gt;Move around menu using 'p' and 'n' or arrow keys, select with 'spacebar'.&lt;br /&gt;Select all with 'a', minimum with 'm'. Press 'i' to install locally or 'r' to&lt;br /&gt;install remote router or 'q' to cancel and reboot.&lt;br /&gt;&lt;br /&gt;  [X] system             [ ] lcd                 [ ] telephony&lt;br /&gt;  [ ] ppp                [ ] ntp                 [ ] ups&lt;br /&gt;  [ ] dhcp               [ ] radiolan            [ ] user-manager &lt;br /&gt;  [X] andvanced-tools    [ ] routerboard         [X] web-proxy&lt;br /&gt;  [ ] arlan              [ ] routing             [ ] webproxy-test&lt;br /&gt;  [ ] gps                [ ] routing-test        [ ] wireless&lt;br /&gt;  [ ] hotspot            [ ] rstp-bridge-test    [ ] wireless-legacy&lt;br /&gt;  [ ] hotspot            [X] security           &lt;br /&gt;  [ ] isdn               [ ] synchronous &lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Umumnya Paket Mikrotik untuk Warnet, Kantor atau SOHO adalah :&lt;br /&gt;&lt;br /&gt;a. SYSTEM           : Paket ini merupakan paket dasar, berisi Kernel dari&lt;br /&gt;                      Mikrotik&lt;br /&gt;    &lt;br /&gt;b. DHCP             : Paket yang berisi fasilitas sebagai DHCP Server, DHCP &lt;br /&gt;                      client, pastikan memilih paket ini jika Anda menginginkan&lt;br /&gt;                      agar Client diberikan IP address otomatis dari DHCP Server&lt;br /&gt;     &lt;br /&gt;c. SECURITY         : Paket ini berisikan fasilitas yang mengutamakan Keamanan&lt;br /&gt;                      jaringan, seperti Remote Mesin dengan SSH, Remote via MAC&lt;br /&gt;                      Address  &lt;br /&gt;&lt;br /&gt;d. WEB-PROXY        : Jika Anda memilih paket ini, maka Mikrotik Box anda telah&lt;br /&gt;                      dapat menjalan service sebagai Web proxy yang akan menyimpan&lt;br /&gt;                      cache agar traffik ke Internet dapat di reduksi serta browsing&lt;br /&gt;                      untuk Web dapat dipercepat.&lt;br /&gt;  &lt;br /&gt;e. ADVANCED TOOLS   : Paket yang berisi Tool didalam melakukan Admnistrasi jaringan,&lt;br /&gt;                      seperti Bandwidth meter, Scanning, Nslookup, dan lain sebagainya.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--[3.3]-- Instalasi Paket&lt;br /&gt;&lt;br /&gt;ketik "i" setelah selesai memilih software, lalu akan muncul menu&lt;br /&gt;   pilihan seperti ini :&lt;br /&gt;   &lt;br /&gt;   - Do you want to keep old configuration ? [y/n] ketik Y&lt;br /&gt;   - continue ? [y/n] ketik Y&lt;br /&gt;  &lt;br /&gt;   Setelah itu proses installasi system dimulai, disini kita tidak&lt;br /&gt;   perlu membuat partisi hardsik karena secara otomatis mikrotik akan&lt;br /&gt;   membuat partisi sendiri.&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;wireless-legacy (depens on system):&lt;br /&gt;Provides support for Cisco Aironet cards and for PrismlI and Atheros wireless&lt;br /&gt;station and AP.&lt;br /&gt;&lt;br /&gt;Do you want to keep old configuraion? [y/n]:y&lt;br /&gt;&lt;br /&gt;Warning: all data on the disk will be erased!&lt;br /&gt;&lt;br /&gt;Continue? [y/n]:y&lt;br /&gt;&lt;br /&gt;Creating partition..........&lt;br /&gt;Formatting disk.......................................&lt;br /&gt;&lt;br /&gt;Installing system-2.9.27 [##################                ]&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Proses installasi&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Continue? [y/n]:y&lt;br /&gt;&lt;br /&gt;Creating partition.......................&lt;br /&gt;Formatting disk............................&lt;br /&gt;&lt;br /&gt;Installed system-2.9.27&lt;br /&gt;Installed advanced-tools-2.9.27&lt;br /&gt;Installed dhcp-2.9.27&lt;br /&gt;Installed security-2.9.27&lt;br /&gt;installed web-proxy-2.9.27&lt;br /&gt;&lt;br /&gt;Software installed.&lt;br /&gt;Press ENTER to reboot&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;CATATAN :&lt;br /&gt;Proses Installasi normalnya tidak sampai 15 menit, jika lebih berarti gagal,ulangi &lt;br /&gt;ke step awal. Setelah proses installasi selesai maka kita akan diminta untuk &lt;br /&gt;merestart system, tekan enter untuk merestart system.&lt;br /&gt;&lt;br /&gt;--[3.5]-- Proses Check system disk&lt;br /&gt;&lt;br /&gt;Setelah komputer booting kembali ke system mikrotik, akan ada pilihan untuk &lt;br /&gt;melakukan check system disk, tekan "y".&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------&lt;br /&gt;Loading system with initrd&lt;br /&gt;Uncompressing Linux... Ok, booting the kernel.&lt;br /&gt;Starting.&lt;br /&gt;&lt;br /&gt;It is recomended to check your disk drive for error,&lt;br /&gt;but it may take while (~1min for 1Gb).&lt;br /&gt;It can be done later with "/system check-disk".&lt;br /&gt;Do you want to do it now? [y/n]&lt;br /&gt;-----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;--[3.6]-- Proses Instalasi Selesai&lt;br /&gt;&lt;br /&gt;Setelah proses instalasi selesai, maka akan muncul menu login dalam modus&lt;br /&gt;terminal, kondisi sistem saat ini dalam keadaan default.&lt;br /&gt;&lt;br /&gt;   Mikrotik login = admin&lt;br /&gt;   Password = (kosong, enter saja)&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;Mikrotik 2.9.27&lt;br /&gt;Mikrotik Login:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  MMM      MMM       KKK                          TTTTTTTTTTT      KKK&lt;br /&gt;  MMMM    MMMM       KKK                          TTTTTTTTTTT      KKK&lt;br /&gt;  MMM MMMM MMM  III  KKK  KKK  RRRRRR     OOOOOO      TTT     III  KKK  KKK&lt;br /&gt;  MMM  MM  MMM  III  KKKKK     RRR  RRR  OOO  OOO     TTT     III  KKKKK&lt;br /&gt;  MMM      MMM  III  KKK KKK   RRRRRR    OOO  OOO     TTT     III  KKK KKK&lt;br /&gt;  MMM      MMM  III  KKK  KKK  RRR  RRR   OOOOOO      TTT     III  KKK  KKK&lt;br /&gt;&lt;br /&gt;  MikroTik RouterOS 2.9.27 (c) 1999-2005       http://www.mikrotik.com/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Terminal vt102 detected, using multiline input mode&lt;br /&gt;[admin@Mikrotikl] &gt; &lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;CATATAN :&lt;br /&gt;Konfigurasi Standar untuk mikrotik ada 2 modus, yaitu modus teks dan &lt;br /&gt;modus GUI. Modus Gui ada 2 juga, yaitu Via Browser serta Via Winbox. &lt;br /&gt;Untuk sekarang saya akan bahas via Teks. Karena cepat serta lebih memahami &lt;br /&gt;terhadap sistem operasi ini.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--[4]-- Perintah Dasar&lt;br /&gt;&lt;br /&gt;Perintah mikrotik sebenarnya hampir sama dengan perintah yang ada dilinux,&lt;br /&gt;sebab pada dasarnya mikrotik ini merupakan kernel Linux, hasil pengolahan&lt;br /&gt;kembali Linux dari Distribusi Debian. Pemakaian perintah shellnya sama, &lt;br /&gt;seperti penghematan perintah, cukup menggunakan tombol TAB di keyboard &lt;br /&gt;maka perintah yang panjang, tidak perlu lagi diketikkan, hanya ketikkan&lt;br /&gt;awal nama perintahnya, nanti secara otomatis Shell akan menampilkan sendiri&lt;br /&gt;perintah yang berkenaan. Misalnya perintah IP ADDRESS di mikrotik. Cukup&lt;br /&gt;hanya mengetikkan IP ADD spasi tekan tombol TAB, maka otomatis shell &lt;br /&gt;akan mengenali dan menterjemahkan sebagai perintah IP ADDRESS. &lt;br /&gt;&lt;br /&gt;Baiklah kita lanjutkan pengenalan perintah ini.&lt;br /&gt;&lt;br /&gt;Setelah login, cek kondisi interface atau ethernet card.&lt;br /&gt;&lt;br /&gt;--[4.1]-- Melihat kondisi interface pada Mikrotik Router&lt;br /&gt;&lt;br /&gt;[admin@Mikrotik] &gt; interface print&lt;br /&gt;   Flags: X - disabled, D - dynamic, R - running &lt;br /&gt; #    NAME                         TYPE             RX-RATE    TX-RATE    MTU  &lt;br /&gt; 0  R ether1                        ether            0          0          1500 &lt;br /&gt; 1  R ether2                       ether            0          0          1500  &lt;br /&gt;&lt;br /&gt;[admin@Mikrotik]&gt;&lt;br /&gt;&lt;br /&gt;Jika interfacenya ada tanda X (disabled) setelah nomor (0,1), maka periksa lagi&lt;br /&gt;etherned cardnya, seharusnya R (running).&lt;br /&gt;&lt;br /&gt;a. Mengganti nama interface&lt;br /&gt;   [admin@Mikrotik] &gt; interface(enter)&lt;br /&gt;&lt;br /&gt;b. Untuk mengganti nama Interface ether1 menjadi Public (atau terserah namanya), maka   &lt;br /&gt;   [admin@Mikrotik] interface&gt; set 0 name=Public&lt;br /&gt;&lt;br /&gt;c. Begitu juga untuk ether2, misalkan namanya diganti menjadi Local, maka&lt;br /&gt;   [admin@Mikrotik] interface&gt; set 1 name=Local&lt;br /&gt;&lt;br /&gt;d. atau langsung saja dari posisi root direktori, memakai tanda "/", tanpa tanda kutip&lt;br /&gt;   [admin@Mikrotik] &gt; /interface set 0 name=Public  &lt;br /&gt;&lt;br /&gt;e. Cek lagi apakah nama interface sudah diganti.&lt;br /&gt;   [admin@Mikrotik] &gt; /interface print&lt;br /&gt;&lt;br /&gt;   Flags: X - disabled, D - dynamic, R - running &lt;br /&gt;   #    NAME                         TYPE             RX-RATE    TX-RATE    MTU  &lt;br /&gt;   0  R Local                        ether            0          0          1500 &lt;br /&gt;   1  R Public                       ether            0          0          1500 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--[4.2]-- Mengganti password default&lt;br /&gt;Untuk keamanan ganti password default&lt;br /&gt;    [admin@Mikrotik] &gt; password&lt;br /&gt;    old password: *****&lt;br /&gt;    new password: *****&lt;br /&gt;    retype new password: *****&lt;br /&gt;    [admin@ Mikrotik]]&gt;&lt;br /&gt;&lt;br /&gt;--[4.3]-- Mengganti nama hostname&lt;br /&gt;Mengganti nama Mikrotik Router untuk memudahkan konfigurasi, pada langkah ini &lt;br /&gt;    nama server akan diganti menjadi “routerku"&lt;br /&gt;&lt;br /&gt;    [admin@Mikrotik] &gt; system identity set name=routerku&lt;br /&gt;    [admin@routerku]&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--[5]-- Setting IP Address, Gateway, Masqureade dan Name Server&lt;br /&gt;&lt;br /&gt;--[5.1]-- IP Address&lt;br /&gt;&lt;br /&gt;Bentuk Perintah konfigurasi &lt;br /&gt; &lt;br /&gt;    ip address add address ={ip address/netmask} interface={nama interface}&lt;br /&gt;&lt;br /&gt;a. Memberikan IP address pada interface Mikrotik. Misalkan Public akan kita gunakan untuk&lt;br /&gt;   koneksi ke Internet dengan IP 192.168.1.2 dan Local akan kita gunakan untuk network LAN&lt;br /&gt;   kita dengan IP 192.168.0.30 (Lihat topologi)&lt;br /&gt;&lt;br /&gt;    [admin@routerku] &gt; ip address add address=192.168.1.2 &lt;br /&gt;    netmask=255.255.255.0 interface=Public comment="IP ke Internet"&lt;br /&gt;&lt;br /&gt;    [admin@routerku] &gt; ip address add address=192.168.0.30 &lt;br /&gt;    netmask=255.255.255.224 interface=Local comment = "IP ke LAN"&lt;br /&gt;&lt;br /&gt;b. Melihat konfigurasi IP address yang sudah kita berikan&lt;br /&gt;&lt;br /&gt;    [admin@routerku] &gt;ip address print&lt;br /&gt;    Flags: X - disabled, I - invalid, D - dynamic &lt;br /&gt;    #   ADDRESS            NETWORK         BROADCAST       INTERFACE&lt;br /&gt;    0   ;;; IP Address ke Internet&lt;br /&gt;        192.168.0.30/27   192.168.0.0    192.168.0.31      Local    &lt;br /&gt;    1   ;;; IP Address ke LAN&lt;br /&gt;        192.168.1.2/24    192.168.0.0    192.168.1.255     Public   &lt;br /&gt;    [admin@routerku]&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; --[5.2]-- Gateway&lt;br /&gt;&lt;br /&gt; Bentuk Perintah Konfigurasi&lt;br /&gt;  &lt;br /&gt;     ip route add gateway={ip gateway}&lt;br /&gt;        &lt;br /&gt;a. Memberikan default Gateway, diasumsikan gateway untuk koneksi internet adalah&lt;br /&gt;   192.168.1.1&lt;br /&gt;&lt;br /&gt;   [admin@routerku] &gt; /ip route add gateway=192.168.1.1&lt;br /&gt;&lt;br /&gt;b. Melihat Tabel routing pada Mikrotik Routers&lt;br /&gt;&lt;br /&gt;   [admin@routerku] &gt; ip route print&lt;br /&gt;&lt;br /&gt;    Flags: X - disabled, A - active, D - dynamic,&lt;br /&gt;    C - connect, S - static, r - rip, b - bgp, o - ospf&lt;br /&gt;    #     DST-ADDRESS     PREFSRC       G GATEWAY        DISTANCE   INTERFACE&lt;br /&gt;    0 ADC 192.168.0.0/24   192.168.0.30                             Local&lt;br /&gt;    1 ADC 192.168.0.0/27  192.168.1.2                               Public&lt;br /&gt;    2 A S 0.0.0.0/0                     r 192.168.1.1               Public&lt;br /&gt;    [admin@routerku]&gt;&lt;br /&gt;&lt;br /&gt;c. Tes Ping ke Gateway untuk memastikan konfigurasi sudah benar&lt;br /&gt;&lt;br /&gt;    [admin@routerku] &gt; ping 192.168.1.1&lt;br /&gt;    192.168.1.1  64 byte ping: ttl=64 time&lt;1 ms&lt;br /&gt;    192.168.1.1  64 byte ping: ttl=64 time&lt;1 ms&lt;br /&gt;    2 packets transmitted, 2 packets received, 0% packet loss&lt;br /&gt;    round-trip min/avg/max = 0/0.0/0 ms&lt;br /&gt;    [admin@routerku]&gt;&lt;br /&gt;&lt;br /&gt;--[5.3]-- NAT (Network Address Translation)&lt;br /&gt;&lt;br /&gt;Bentuk Perintah Konfigurasi&lt;br /&gt;&lt;br /&gt;   ip firewall nat add chain=srcnat action=masquerade out-inteface={ethernet&lt;br /&gt;   yang langsung terhubung ke Internet atau Public}&lt;br /&gt;&lt;br /&gt;a. Setup Masquerading, Jika Mikrotik akan kita pergunakan sebagai gateway server maka agar&lt;br /&gt;   client computer pada network dapat terkoneksi ke internet perlu kita masquerading.&lt;br /&gt;&lt;br /&gt;    [admin@routerku] &gt; ip firewall nat add chain=scrnat out-interface=Public action=masquerade&lt;br /&gt;    [admin@routerku]&gt;&lt;br /&gt;&lt;br /&gt;b. Melihat konfigurasi Masquerading&lt;br /&gt;&lt;br /&gt;    [admin@routerku] ip firewall nat print&lt;br /&gt;    Flags: X - disabled, I - invalid, D - dynamic &lt;br /&gt;    0   chain=srcnat out-interface=Public action=masquerade &lt;br /&gt;    [admin@routerku]&gt;&lt;br /&gt;&lt;br /&gt;--[5.4] Name server&lt;br /&gt;&lt;br /&gt;  Bentuk Perintah Konfigurasi&lt;br /&gt;&lt;br /&gt;      ip dns set primary-dns={dns utama} secondary-dns={dns ke dua}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;a. Setup DNS pada Mikrotik Routers, misalkan DNS dengan Ip Addressnya&lt;br /&gt;    Primary = 202.134.0.155, Secondary = 202.134.2.5 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    [admin@routerku] &gt; ip dns set primary-dns=202.134.0.155 allow-remoterequests=yes&lt;br /&gt;    [admin@routerku] &gt; ip dns set secondary-dns=202.134.2.5 allow-remoterequests=yes&lt;br /&gt;&lt;br /&gt;b. Melihat konfigurasi DNS&lt;br /&gt;&lt;br /&gt;    [admin@routerku] &gt; ip dns print&lt;br /&gt;    primary-dns: 202.134.0.155&lt;br /&gt;    secondary-dns: 202.134.2.5&lt;br /&gt;    allow-remote-requests: no&lt;br /&gt;    cache-size: 2048KiB&lt;br /&gt;    cache-max-ttl: 1w&lt;br /&gt;    cache-used: 16KiB&lt;br /&gt;&lt;br /&gt;    [admin@routerku]&gt;&lt;br /&gt;&lt;br /&gt;c. Tes untuk akses domain, misalnya dengan ping nama domain&lt;br /&gt;&lt;br /&gt;    [admin@routerku] &gt; ping yahoo.com&lt;br /&gt;    216.109.112.135 64 byte ping: ttl=48 time=250 ms&lt;br /&gt;    10 packets transmitted, 10 packets received, 0% packet loss&lt;br /&gt;    round-trip min/avg/max = 571/571.0/571 ms&lt;br /&gt;    [admin@routerku]&gt;&lt;br /&gt;&lt;br /&gt;Jika sudah berhasil reply berarti seting DNS sudah benar.&lt;br /&gt;&lt;br /&gt;Setelah langkah ini bisa dilakukan pemeriksaan untuk koneksi dari jaringan local. Dan jika&lt;br /&gt;berhasil berarti kita sudah berhasil melakukan instalasi Mikrotik Router sebagai Gateway&lt;br /&gt;server. Setelah terkoneksi dengan jaringan Mikrotik dapat dimanage menggunakan WinBox yang &lt;br /&gt;bisa di download dari Mikrotik.com atau dari server mikrotik kita. Misal Ip address server&lt;br /&gt;mikrotik kita 192.168.0.30, via browser buka http://192.168.0.30. Di Browser akan ditampilkan&lt;br /&gt;dalam bentuk web dengan beberapa menu, cari tulisan Download dan download WinBox dari situ. &lt;br /&gt;Simpan di local harddisk. Jalankan Winbox, masukkan Ip address, username dan password.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--[7]-- DHCP Server&lt;br /&gt;&lt;br /&gt;DHCP merupakan singkatan dari Dynamic Host Configuration Protocol, yaitu suatu program yang &lt;br /&gt;memungkinkan pengaturan IP Address di dalam sebuah jaringan dilakukan terpusat di server, &lt;br /&gt;sehingga PC Client tidak perlu melakukan konfigurasi IP Addres. DHCP memudahkan administrator &lt;br /&gt;untuk melakukan pengalamatan ip address untuk client.&lt;br /&gt;&lt;br /&gt;Bentuk perintah konfigurasi&lt;br /&gt;&lt;br /&gt;ip dhcp-server setup&lt;br /&gt;dhcp server interface = { interface yang digunakan }&lt;br /&gt;dhcp server space = { network yang akan di dhcp }&lt;br /&gt;gateway for dhcp network = { ip gateway }&lt;br /&gt;address to give out = { range ip address }&lt;br /&gt;dns servers = { name server }&lt;br /&gt;lease time = { waktu sewa yang diberikan }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Jika kita menginginkan client mendapatkan IP address secara otomatis maka perlu kita setup&lt;br /&gt;dhcp server pada Mikrotik. Berikut langkah-langkahnya :&lt;br /&gt;&lt;br /&gt;a. Tambahkan IP address pool&lt;br /&gt;&lt;br /&gt;    /ip pool add name=dhcp-pool ranges=192.168.0.1-192.168.0.30&lt;br /&gt;&lt;br /&gt;b. Tambahkan DHCP Network dan gatewaynya yang akan didistribusikan ke client. &lt;br /&gt;   Pada contoh ini networknya adalah 192.168.0.0/27 dan gatewaynya 122.168.0.30&lt;br /&gt;&lt;br /&gt;    /ip dhcp-server network add address=192.168.0.0/27 gateway=192.168.0.30 dns-server=192.168.0.30 &lt;br /&gt;    comment="" &lt;br /&gt;&lt;br /&gt;c. Tambahkan DHCP Server ( pada contoh ini dhcp diterapkan pada interface Local )&lt;br /&gt;&lt;br /&gt;    /ip dhcp-server add interface=local address-pool=dhcp-pool&lt;br /&gt;&lt;br /&gt;d. Lihat status DHCP server&lt;br /&gt;&lt;br /&gt;    [admin@routerku] &gt; ip dhcp-server print&lt;br /&gt;&lt;br /&gt;    Flags: X - disabled, I - invalid&lt;br /&gt;&lt;br /&gt;    # NAME INTERFACE RELAY ADDRESS-POOL LEASE-TIME ADD-ARP&lt;br /&gt;&lt;br /&gt;    0dhcp1 Local&lt;br /&gt;&lt;br /&gt;Tanda X menyatakan bahwa DHCP server belum enable maka perlu dienablekan terlebih&lt;br /&gt;dahulu pada langkah e.&lt;br /&gt;&lt;br /&gt;e. Jangan Lupa dibuat enable dulu dhcp servernya&lt;br /&gt;&lt;br /&gt;    /ip dhcp-server enable 0&lt;br /&gt;&lt;br /&gt;kemudian cek kembali dhcp-server seperti langkah 4, jika tanda X sudah tidak ada berarti&lt;br /&gt;sudah aktif&lt;br /&gt;&lt;br /&gt;f. Tes Dari client&lt;br /&gt;&lt;br /&gt;Misalnya :&lt;br /&gt;D:&gt;ping www.yahoo.com&lt;br /&gt;&lt;br /&gt;--[8]-- Transparent Proxy Server&lt;br /&gt;&lt;br /&gt;Proxy server merupakan program yang dapat mempercepat akses ke suatu web &lt;br /&gt;yang sudah diakses oleh komputer lain, karena sudah di simpan didalam &lt;br /&gt;caching server.Transparent proxy menguntungkan dalam management client,&lt;br /&gt;karena system administrator tidak perlu lagi melakukan setup proxy di &lt;br /&gt;setiap browser komputer client karena redirection dilakukan otomatis di sisi &lt;br /&gt;server.&lt;br /&gt;&lt;br /&gt;Bentuk perintah konfigurasi :&lt;br /&gt;a. Setting web proxy :&lt;br /&gt;&lt;br /&gt;- ip proxy set enable=yes&lt;br /&gt;  port={ port yang mau digunakan }&lt;br /&gt;  maximal-client-connections=1000&lt;br /&gt;  maximal-server-connections=1000&lt;br /&gt;&lt;br /&gt;- ip proxy direct add src-address={ network yang akan di&lt;br /&gt;  NAT} action=allow&lt;br /&gt;&lt;br /&gt;- ip web-proxy set parent-proxy={proxy parent/optional}&lt;br /&gt;  hostname={ nama host untuk proxy/optional}&lt;br /&gt;  port={port yang mau digunakan}&lt;br /&gt;  src-address={ address yang akan digunakan untuk koneksi&lt;br /&gt;                ke parent proxy/default 0.0.0.0}&lt;br /&gt;  transparent-proxy=yes&lt;br /&gt;  max-object-size={ ukuran maximal file yang akan disimpan&lt;br /&gt;  sebagai cache/default 4096 in Kilobytes}&lt;br /&gt;  max-cache-size= { ukuran maximal hardisk yang akan&lt;br /&gt;                    dipakai sebagai penyimpan file cache/unlimited &lt;br /&gt;                    | none | 12 in megabytes}&lt;br /&gt;  cache-administrator={ email administrator yang akan digunakan &lt;br /&gt;                        apabila proxy error, status akan dikirim &lt;br /&gt;                        ke email tersebut}&lt;br /&gt;  enable==yes&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Contoh konfigurasi&lt;br /&gt;-------------------&lt;br /&gt;&lt;br /&gt;a. Web proxy setting&lt;br /&gt;&lt;br /&gt;/ ip web-proxy &lt;br /&gt;set enabled=yes src-address=0.0.0.0 port=8080 &lt;br /&gt;    hostname="proxy.routerku.co.id" transparent-proxy=yes &lt;br /&gt;    parent-proxy=0.0.0.0:0 cache-administrator="support@routerku.co.id" &lt;br /&gt;    max-object-size=131072KiB cache-drive=system max-cache-size=unlimited &lt;br /&gt;    max-ram-cache-size=unlimited&lt;br /&gt;&lt;br /&gt;Nat Redirect, perlu ditambahkan yaitu rule REDIRECTING untuk membelokkan &lt;br /&gt;traffic HTTP menuju ke WEB-PROXY.&lt;br /&gt;&lt;br /&gt;b. Setting firewall untuk Transparant Proxy&lt;br /&gt;&lt;br /&gt;   Bentuk perintah konfigurasi :&lt;br /&gt;&lt;br /&gt;   ip firewall nat add chain=dstnat&lt;br /&gt;   protocol=tcp&lt;br /&gt;   dst-port=80&lt;br /&gt;   action=redirect&lt;br /&gt;   to-ports={ port proxy }&lt;br /&gt;&lt;br /&gt;Perintahnya:&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;/ ip firewall nat &lt;br /&gt;add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080 &lt;br /&gt;    comment="" disabled=no &lt;br /&gt;add chain=dstnat protocol=tcp dst-port=3128 action=redirect to-ports=8080 &lt;br /&gt;    comment="" disabled=no &lt;br /&gt;add chain=dstnat protocol=tcp dst-port=8000 action=redirect to-ports=8080 &lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;perintah diatas dimaksudkan, agar semua trafik yang menuju Port 80,3128,8000 &lt;br /&gt;dibelokkan menuju port 8080 yaitu portnya Web-Proxy.&lt;br /&gt;&lt;br /&gt;CATATAN:&lt;br /&gt;Perintah&lt;br /&gt;&lt;br /&gt;/ip web-proxy print { untuk melihat hasil konfigurasi web-proxy}&lt;br /&gt;/ip web-proxy monitor { untuk monitoring kerja web-proxy}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--[9]-- Bandwidth Management&lt;br /&gt;&lt;br /&gt;QoS memegang peranan sangat penting dalam hal memberikan pelayanan &lt;br /&gt;yang baik pada client. Untuk itu kita memerlukan bandwidth management &lt;br /&gt;untuk mengatur tiap data yang lewat, sehingga pembagian bandwidth menjadi &lt;br /&gt;adil. Dalam hal ini Mikrotik RouterOs juga menyertakan packet software &lt;br /&gt;untuk memanagement bandwidth.&lt;br /&gt;&lt;br /&gt;Bentuk perintah konfigurasi:&lt;br /&gt;&lt;br /&gt;queue simple add name={ nama }&lt;br /&gt;target-addresses={ ip address yang dituju }&lt;br /&gt;interface={ interface yang digunakan untuk melewati data }&lt;br /&gt;max-limit={ out/in }&lt;br /&gt;&lt;br /&gt;Dibawah ini terdapat konfigurasi Trafik shaping atau bandwidth management&lt;br /&gt;dengan metode Simple Queue, sesuai namanya, Jenis Queue ini memang&lt;br /&gt;sederhana, namun memiliki kelemahan, kadangkala terjadi kebocoran bandwidth&lt;br /&gt;atau bandwidthnya tidak secara real di monitor. Pemakaian untuk 10 Client,&lt;br /&gt;Queue jenis ini tidak masalah.&lt;br /&gt;&lt;br /&gt;Diasumsikan Client ada sebanyak 15 client, dan masing-masing client diberi&lt;br /&gt;jatah bandwidth minimum sebanyak 8kbps, dan maksimum 48kbps. Sedangkan&lt;br /&gt;Bandwidth totalnya sebanyak 192kbps. Untuk upstream tidak diberi rule, &lt;br /&gt;berarti masing-masing client dapat menggunakan bandwidth uptream secara&lt;br /&gt;maksimum. Perhatikan perintah priority, range priority di Mikrotik sebanyak&lt;br /&gt;delapan. Berarti dari 1 sampai 8, priority 1 adalah priority tertinggi, &lt;br /&gt;sedangkan priority 8 merupakan priority terendah.&lt;br /&gt;&lt;br /&gt;Berikut Contoh kongirufasinya.&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;/ queue simple &lt;br /&gt;add name="trafikshaping" target-addresses=192.168.0.0/27 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=none priority=1 queue=default/default &lt;br /&gt;    limit-at=0/64000 max-limit=0/192000 total-queue=default disabled=no &lt;br /&gt;add name="01" target-addresses=192.168.0.1/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="02" target-addresses=192.168.0.2/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="03" target-addresses=192.168.0.3/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="04" target-addresses=192.168.0.4/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="10" target-addresses=192.168.0.25/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="05" target-addresses=192.168.0.5/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="06" target-addresses=192.168.0.6/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="07" target-addresses=192.168.0.7/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="08" target-addresses=192.168.0.8/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="09" target-addresses=192.168.0.9/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="10" target-addresses=192.168.0.10/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="11" target-addresses=192.168.0.11/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="12" target-addresses=192.168.0.12/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="13" target-addresses=192.168.0.13/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="14" target-addresses=192.168.0.14/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;add name="15" target-addresses=192.168.0.15/32 dst-address=0.0.0.0/0 &lt;br /&gt;    interface=all parent=trafikshaping priority=1 queue=default/default &lt;br /&gt;    limit-at=0/8000 max-limit=0/48000 total-queue=default disabled=no &lt;br /&gt;&lt;br /&gt;Perintah diatas karena dalam bentuk command line, bisa juga di copy&lt;br /&gt;paste, selanjutnya di paste saja ke consol mikrotiknya. ingat lihat&lt;br /&gt;dulu path atau direktory aktif. Silahkan dipaste saja, kalau posisi&lt;br /&gt;direktorynya di Root.&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------&lt;br /&gt;Terminal vt102 detected, using multiline input mode&lt;br /&gt;[admin@mikrotik] &gt; &lt;br /&gt;------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Pilihan lain metode bandwidth manajemen ini, kalau seandainya ingin &lt;br /&gt;bandwidth tersebut dibagi sama rata oleh Mikrotik, seperti bandwidth &lt;br /&gt;256kbps downstream dan 256kbps upstream. Sedangkan client yang akan &lt;br /&gt;mengakses sebanyak 10 client, maka otomatis masing-masing client &lt;br /&gt;mendapat jatah bandwidth upstream dan downstream sebanyak 256kbps &lt;br /&gt;dibagi 10. Jadi masing-masing dapat 25,6kbps. Andaikata hanya 2 Client &lt;br /&gt;yang mengakses maka masing-masing dapat 128kbps.&lt;br /&gt;&lt;br /&gt;Untuk itu dipakai type PCQ (Per Connection Queue), yang bisa secara &lt;br /&gt;otomatis membagi trafik per client. Tentang jenis queue di mikrotik &lt;br /&gt;ini dapat dibaca pada manualnya di http://www.mikrotik.com/testdocs/&lt;br /&gt;ros/2.9/root/queue.php. &lt;br /&gt;&lt;br /&gt;Sebelumnya perlu dibuat aturan di bagian MANGLE. Seperti :&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------&lt;br /&gt;/ip firewall mangle add chain=forward src-address=192.168.0.0/27 &lt;br /&gt;   action=mark-connection new-connection-mark=users-con&lt;br /&gt;/ip firewall mangle add connection-mark=users-con action=mark-packet &lt;br /&gt;   new-packet-mark=users chain=forward&lt;br /&gt;----------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Karena type PCQ belum ada, maka perlu ditambah, ada 2 type PCQ ini.&lt;br /&gt;Pertama diberi nama pcq-download, yang akan mengatur semua trafik&lt;br /&gt;melalui alamat tujuan/destination address. Trafik ini melewati &lt;br /&gt;interface Local. Sehingga semua traffik download/downstream yang &lt;br /&gt;datang dari jaringan 192.168.0.0/27 akan dibagi secara otomatis.&lt;br /&gt;&lt;br /&gt;Tipe PCQ kedua, dinamakan pcq-upload, untuk mengatur semua trafik upstream&lt;br /&gt;yang berasal dari alamat asal/source address. Trafik ini melewati &lt;br /&gt;interface public. Sehingga semua traffik upload/upstream yang berasal&lt;br /&gt;dari jaringan 192.168.0.0/27 akan dibagi secara otomatis.&lt;br /&gt;&lt;br /&gt;Perintah:&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;/queue type add name=pcq-download kind=pcq pcq-classifier=dst-address&lt;br /&gt;/queue type add name=pcq-upload kind=pcq pcq-classifier=src-address&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Setelah aturan untuk PCQ dan Mangle ditambahkan, sekarang untuk aturan&lt;br /&gt;pembagian trafiknya. Queue yang dipakai adalah Queue Tree, Yaitu:&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;/queue tree add parent=Local queue=pcq-download packet-mark=users&lt;br /&gt;/queue tree add parent=Public queue=pcq-upload packet-mark=users&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Perintah diatas mengasumsikan, kalau bandwidth yang diterima dari provider&lt;br /&gt;Internet berflukstuasi atau berubah-rubah. Jika kita yakin bahwa bandwidth&lt;br /&gt;yang diterima, misalkan dapat 256kbs downstream, dan 256kbps upstream, maka&lt;br /&gt;ada lagi aturannya, seperti :&lt;br /&gt;&lt;br /&gt;Untuk trafik downstreamnya :&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;/queue tree add name=Download parent=Local max-limit=256k&lt;br /&gt;/queue tree add parent=Download queue=pcq-download packet-mark=users&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Dan trafik upstreamnya :&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;/queue tree add name=Upload parent=Public max-limit=256k&lt;br /&gt;/queue tree add parent=Upload queue=pcq-upload packet-mark=users&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;--[10]-- Monitor MRTG via Web&lt;br /&gt;&lt;br /&gt;Fasilitas ini diperlukan untuk monitoring trafik dalam bentuk grafik, dapat &lt;br /&gt;dilihat dengan menggunakan browser. MRTG (The Multi Router Traffic Grapher) &lt;br /&gt;telah dibuild sedemikian rupa, sehingga memudahkan kita memakainya. Telah &lt;br /&gt;tersedia dipaket dasarnya.&lt;br /&gt;&lt;br /&gt;Contoh konfigurasinya&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;/ tool graphing &lt;br /&gt;set store-every=5min &lt;br /&gt;/ tool graphing interface &lt;br /&gt;add interface=all allow-address=0.0.0.0/0 store-on-disk=yes disabled=no &lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Perintah diatas akan menampilkan grafik dari trafik yang melewati interface&lt;br /&gt;jaringan baik berupa Interface Public dan Interface Local, yang dirender&lt;br /&gt;setiap 5 menit sekali. Juga dapat diatur Alamat apa saja yang dapat mengakses&lt;br /&gt;MRTG ini, pada parameter allow-address.&lt;br /&gt;&lt;br /&gt;--[11]-- Keamanan di Mikrotik&lt;br /&gt;&lt;br /&gt;Setelah beberapa Konfigurasi diatas telah disiapkan, tentu tidak lupa kita&lt;br /&gt;perhatikan keamanan dari Mesin gateway Mikrotik ini, ada beberapa fasilitas&lt;br /&gt;yang dipergunakan. Dalam hal ini akan dibahas tentang Firewallnya. Fasilitas&lt;br /&gt;Firewall ini secara pringsip serupa dengan IP TABLES di Gnu/Linux hanya saja&lt;br /&gt;beberapa perintah telah di sederhanakan namun berdaya guna.&lt;br /&gt;&lt;br /&gt;Di Mikrotik perintah firewall ini terdapat dalam modus IP, yaitu &lt;br /&gt;&lt;br /&gt;[admin@routerku] &gt; /ip firewall&lt;br /&gt;&lt;br /&gt;Terdapat beberapa packet filter seperti mangle, nat, dan filter.&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;[admin@routerku] ip firewall&gt; ?&lt;br /&gt;&lt;br /&gt;Firewall allows IP packet filtering on per packet basis.&lt;br /&gt;&lt;br /&gt;.. -- go up to ip&lt;br /&gt;mangle/ -- The packet marking management&lt;br /&gt;nat/ -- Network Address Translation&lt;br /&gt;connection/ -- Active connections&lt;br /&gt;filter/ -- Firewall filters&lt;br /&gt;address-list/ -- &lt;br /&gt;service-port/ -- Service port management&lt;br /&gt;export -- &lt;br /&gt;--------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Untuk kali ini kita akan lihat konfigurasi pada ip firewall filternya.&lt;br /&gt;&lt;br /&gt;Karena Luasnya parameter dari firewall filter ini untuk pembahasan Firewall &lt;br /&gt;Filter selengkapnya dapat dilihat pada manual mikrotik, di &lt;br /&gt;http://www.mikrotik.com/testdocs/ros/2.9/ip/filter.php&lt;br /&gt;&lt;br /&gt;Konfigurasi dibawah ini dapat memblokir beberapa Trojan, Virus, Backdoor&lt;br /&gt;yang telah dikenali sebelumnya baik Nomor Port yang dipakai serta Protokolnya.&lt;br /&gt;Juga telah di konfigurasikan untuk menahan Flooding dari Jaringan Publik dan &lt;br /&gt;jaringan Lokal. Serta pemberian rule untuk Access control agar, Rentang&lt;br /&gt;jaringan tertentu saja yang bisa melakukan Remote atau mengakses service&lt;br /&gt;tertentu terhadap Mesin Mikrotik kita.&lt;br /&gt;&lt;br /&gt;Contoh Aplikasi Filternya&lt;br /&gt;-----------------------------------------------------------------------------&lt;br /&gt;/ ip firewall filter &lt;br /&gt;add chain=input connection-state=invalid action=drop comment="Drop Invalid &lt;br /&gt;    connections" disabled=no &lt;br /&gt;add chain=input src-address=!192.168.0.0/27 protocol=tcp src-port=1024-65535 &lt;br /&gt;    dst-port=8080 action=drop comment="Block to Proxy" disabled=no &lt;br /&gt;add chain=input protocol=udp dst-port=12667 action=drop comment="Trinoo" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=input protocol=udp dst-port=27665 action=drop comment="Trinoo" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=input protocol=udp dst-port=31335 action=drop comment="Trinoo" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=input protocol=udp dst-port=27444 action=drop comment="Trinoo" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=input protocol=udp dst-port=34555 action=drop comment="Trinoo" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=input protocol=udp dst-port=35555 action=drop comment="Trinoo" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=input protocol=tcp dst-port=27444 action=drop comment="Trinoo" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=input protocol=tcp dst-port=27665 action=drop comment="Trinoo" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=input protocol=tcp dst-port=31335 action=drop comment="Trinoo" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=input protocol=tcp dst-port=31846 action=drop comment="Trinoo" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=input protocol=tcp dst-port=34555 action=drop comment="Trinoo" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=input protocol=tcp dst-port=35555 action=drop comment="Trinoo" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=input connection-state=established action=accept comment="Allow &lt;br /&gt;    Established connections" disabled=no &lt;br /&gt;add chain=input protocol=udp action=accept comment="Allow UDP" disabled=no &lt;br /&gt;add chain=input protocol=icmp action=accept comment="Allow ICMP" disabled=no &lt;br /&gt;add chain=input src-address=192.168.0.0/27 action=accept comment="Allow access &lt;br /&gt;    to router from known network" disabled=no &lt;br /&gt;add chain=input action=drop comment="Drop anything else" disabled=no &lt;br /&gt;add chain=forward protocol=tcp connection-state=invalid action=drop &lt;br /&gt;    comment="drop invalid connections" disabled=no &lt;br /&gt;add chain=forward connection-state=established action=accept comment="allow &lt;br /&gt;    already established connections" disabled=no &lt;br /&gt;add chain=forward connection-state=related action=accept comment="allow &lt;br /&gt;    related connections" disabled=no &lt;br /&gt;add chain=forward src-address=0.0.0.0/8 action=drop comment="" disabled=no &lt;br /&gt;add chain=forward dst-address=0.0.0.0/8 action=drop comment="" disabled=no &lt;br /&gt;add chain=forward src-address=127.0.0.0/8 action=drop comment="" disabled=no &lt;br /&gt;add chain=forward dst-address=127.0.0.0/8 action=drop comment="" disabled=no &lt;br /&gt;add chain=forward src-address=224.0.0.0/3 action=drop comment="" disabled=no &lt;br /&gt;add chain=forward dst-address=224.0.0.0/3 action=drop comment="" disabled=no &lt;br /&gt;add chain=forward protocol=tcp action=jump jump-target=tcp comment="" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=forward protocol=udp action=jump jump-target=udp comment="" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=forward protocol=icmp action=jump jump-target=icmp comment="" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=tcp protocol=tcp dst-port=69 action=drop comment="deny TFTP" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=tcp protocol=tcp dst-port=111 action=drop comment="deny RPC &lt;br /&gt;    portmapper" disabled=no &lt;br /&gt;add chain=tcp protocol=tcp dst-port=135 action=drop comment="deny RPC &lt;br /&gt;    portmapper" disabled=no &lt;br /&gt;add chain=tcp protocol=tcp dst-port=137-139 action=drop comment="deny NBT" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=tcp protocol=tcp dst-port=445 action=drop comment="deny cifs" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=tcp protocol=tcp dst-port=2049 action=drop comment="deny NFS" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=tcp protocol=tcp dst-port=12345-12346 action=drop comment="deny &lt;br /&gt;    NetBus" disabled=no &lt;br /&gt;add chain=tcp protocol=tcp dst-port=20034 action=drop comment="deny NetBus" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=tcp protocol=tcp dst-port=3133 action=drop comment="deny &lt;br /&gt;    BackOriffice" disabled=no &lt;br /&gt;add chain=tcp protocol=tcp dst-port=67-68 action=drop comment="deny DHCP" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=udp protocol=udp dst-port=69 action=drop comment="deny TFTP" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=udp protocol=udp dst-port=111 action=drop comment="deny PRC &lt;br /&gt;    portmapper" disabled=no &lt;br /&gt;add chain=udp protocol=udp dst-port=135 action=drop comment="deny PRC &lt;br /&gt;    portmapper" disabled=no &lt;br /&gt;add chain=udp protocol=udp dst-port=137-139 action=drop comment="deny NBT" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=udp protocol=udp dst-port=2049 action=drop comment="deny NFS" &lt;br /&gt;    disabled=no &lt;br /&gt;add chain=udp protocol=udp dst-port=3133 action=drop comment="deny &lt;br /&gt;    BackOriffice" disabled=no &lt;br /&gt;add chain=input protocol=tcp psd=21,3s,3,1 action=add-src-to-address-list &lt;br /&gt;    address-list="port scanners" address-list-timeout=2w comment="Port &lt;br /&gt;    scanners to list " disabled=no &lt;br /&gt;add chain=input protocol=tcp tcp-flags=fin,!syn,!rst,!psh,!ack,!urg &lt;br /&gt;    action=add-src-to-address-list address-list="port scanners" &lt;br /&gt;    address-list-timeout=2w comment="NMAP FIN Stealth scan" disabled=no &lt;br /&gt;add chain=input protocol=tcp tcp-flags=fin,syn action=add-src-to-address-list &lt;br /&gt;    address-list="port scanners" address-list-timeout=2w comment="SYN/FIN &lt;br /&gt;    scan" disabled=no &lt;br /&gt;add chain=input protocol=tcp tcp-flags=syn,rst action=add-src-to-address-list &lt;br /&gt;    address-list="port scanners" address-list-timeout=2w comment="SYN/RST &lt;br /&gt;    scan" disabled=no &lt;br /&gt;add chain=input protocol=tcp tcp-flags=fin,psh,urg,!syn,!rst,!ack &lt;br /&gt;    action=add-src-to-address-list address-list="port scanners" &lt;br /&gt;    address-list-timeout=2w comment="FIN/PSH/URG scan" disabled=no &lt;br /&gt;add chain=input protocol=tcp tcp-flags=fin,syn,rst,psh,ack,urg &lt;br /&gt;    action=add-src-to-address-list address-list="port scanners" &lt;br /&gt;    address-list-timeout=2w comment="ALL/ALL scan" disabled=no &lt;br /&gt;add chain=input protocol=tcp tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg &lt;br /&gt;    action=add-src-to-address-list address-list="port scanners" &lt;br /&gt;    address-list-timeout=2w comment="NMAP NULL scan" disabled=no &lt;br /&gt;add chain=input src-address-list="port scanners" action=drop comment="dropping &lt;br /&gt;    port scanners" disabled=no &lt;br /&gt;add chain=icmp protocol=icmp icmp-options=0:0 action=accept comment="drop &lt;br /&gt;    invalid connections" disabled=no &lt;br /&gt;add chain=icmp protocol=icmp icmp-options=3:0 action=accept comment="allow &lt;br /&gt;    established connections" disabled=no &lt;br /&gt;add chain=icmp protocol=icmp icmp-options=3:1 action=accept comment="allow &lt;br /&gt;    already established connections" disabled=no &lt;br /&gt;add chain=icmp protocol=icmp icmp-options=4:0 action=accept comment="allow &lt;br /&gt;    source quench" disabled=no &lt;br /&gt;add chain=icmp protocol=icmp icmp-options=8:0 action=accept comment="allow &lt;br /&gt;    echo request" disabled=no &lt;br /&gt;add chain=icmp protocol=icmp icmp-options=11:0 action=accept comment="allow &lt;br /&gt;    time exceed" disabled=no &lt;br /&gt;add chain=icmp protocol=icmp icmp-options=12:0 action=accept comment="allow &lt;br /&gt;    parameter bad" disabled=no &lt;br /&gt;add chain=icmp action=drop comment="deny all other types" disabled=no &lt;br /&gt;add chain=tcp protocol=tcp dst-port=25 action=reject &lt;br /&gt;    reject-with=icmp-network-unreachable comment="Smtp" disabled=no &lt;br /&gt;add chain=tcp protocol=udp dst-port=25 action=reject &lt;br /&gt;    reject-with=icmp-network-unreachable comment="Smtp" disabled=no &lt;br /&gt;add chain=tcp protocol=tcp dst-port=110 action=reject &lt;br /&gt;    reject-with=icmp-network-unreachable comment="Smtp" disabled=no &lt;br /&gt;add chain=tcp protocol=udp dst-port=110 action=reject &lt;br /&gt;    reject-with=icmp-network-unreachable comment="Smtp" disabled=no &lt;br /&gt;add chain=tcp protocol=udp dst-port=110 action=reject &lt;br /&gt;    reject-with=icmp-network-unreachable comment="Smtp" disabled=no &lt;br /&gt;-----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;--[11.1]-- Service dan Melihat Service yang Aktif dengan PortScanner&lt;br /&gt;&lt;br /&gt;Untuk memastikan Service apa saja yang aktif di Mesin mikrotik, perlu kita&lt;br /&gt;pindai terhadap port tertentu, seandainya ada service yang tidak dibutuhkan,&lt;br /&gt;sebaiknya dimatikan saja.&lt;br /&gt;&lt;br /&gt;Untuk menonaktifkan dan mengaktifkan servise, perintah adalah :&lt;br /&gt;&lt;br /&gt;Kita periksa dahulu service apa saja yang aktif&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------&lt;br /&gt;[admin@routerku] &gt; ip service &lt;br /&gt;[admin@routerku] ip service&gt; print &lt;br /&gt;Flags: X - disabled, I - invalid &lt;br /&gt; #   NAME                                  PORT  ADDRESS            CERTIFICATE&lt;br /&gt; 0 X telnet                                23    0.0.0.0/0         &lt;br /&gt; 1   ftp                                   21    0.0.0.0/0         &lt;br /&gt; 2   www                                   80    0.0.0.0/0         &lt;br /&gt; 3   ssh                                   22    0.0.0.0/0         &lt;br /&gt; 4   www-ssl                               443   0.0.0.0/0          none       &lt;br /&gt;[admin@routerku] ip service&gt; &lt;br /&gt;----------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Misalkan service FTP akan dinonaktifkan, yaitu di daftar diatas terletak pada&lt;br /&gt;nomor 1 (lihat bagian Flags) maka :&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------&lt;br /&gt;[admin@routerku] ip service&gt; set 1 disabled=yes&lt;br /&gt;---------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Perlu kita periksa lagi, &lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------&lt;br /&gt;[admin@routerku] ip service&gt; print &lt;br /&gt;Flags: X - disabled, I - invalid &lt;br /&gt; #   NAME                                  PORT  ADDRESS            CERTIFICATE&lt;br /&gt; 0 X telnet                                23    0.0.0.0/0         &lt;br /&gt; 1 X ftp                                   21    0.0.0.0/0         &lt;br /&gt; 2   www                                   80    0.0.0.0/0         &lt;br /&gt; 3   ssh                                   22    0.0.0.0/0         &lt;br /&gt; 4   www-ssl                               443   0.0.0.0/0          none       &lt;br /&gt;[admin@router.dprd.provinsi] ip service&gt; &lt;br /&gt;---------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Sekarang service FTP telah dinonaktifkan.&lt;br /&gt;&lt;br /&gt;Dengan memakai tool nmap kita dapat mencek port apa saja yang aktif pada mesin&lt;br /&gt;gateway yang telah dikonfigurasikan.&lt;br /&gt;&lt;br /&gt;Perintah : nmap -vv -sS -sV -P0 192.168.0.30&lt;br /&gt;&lt;br /&gt;Hasil :&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------&lt;br /&gt;Starting Nmap 4.20 ( http://insecure.org ) at 2007-04-04 19:55 SE Asia Standard Time&lt;br /&gt;Initiating ARP Ping Scan at 19:55&lt;br /&gt;Scanning 192.168.0.30 [1 port]&lt;br /&gt;Completed ARP Ping Scan at 19:55, 0.31s elapsed (1 total hosts)&lt;br /&gt;Initiating Parallel DNS resolution of 1 host. at 19:55&lt;br /&gt;Completed Parallel DNS resolution of 1 host. at 19:55, 0.05s elapsed&lt;br /&gt;Initiating SYN Stealth Scan at 19:55&lt;br /&gt;Scanning  192.168.0.30 [1697 ports]&lt;br /&gt;Discovered open port 22/tcp on 192.168.0.30&lt;br /&gt;Discovered open port 53/tcp on 192.168.0.30&lt;br /&gt;Discovered open port 80/tcp on 192.168.0.30&lt;br /&gt;Discovered open port 21/tcp on 192.168.0.30&lt;br /&gt;Discovered open port 3986/tcp on 192.168.0.30&lt;br /&gt;Discovered open port 2000/tcp on 192.168.0.30&lt;br /&gt;Discovered open port 8080/tcp on 192.168.0.30&lt;br /&gt;Discovered open port 3128/tcp on 192.168.0.30&lt;br /&gt;Completed SYN Stealth Scan at 19:55, 7.42s elapsed (1697 total ports)&lt;br /&gt;Initiating Service scan at 19:55&lt;br /&gt;Scanning 8 services on 192.168.0.30&lt;br /&gt;Completed Service scan at 19:57, 113.80s elapsed (8 services on 1 host)&lt;br /&gt;Host  192.168.0.30 appears to be up ... good.&lt;br /&gt;Interesting ports on 192.168.0.30:&lt;br /&gt;Not shown: 1689 closed ports&lt;br /&gt;PORT     STATE SERVICE         VERSION&lt;br /&gt;21/tcp   open  ftp             MikroTik router ftpd 2.9.27&lt;br /&gt;22/tcp   open  ssh             OpenSSH 2.3.0 mikrotik 2.9.27 (protocol 1.99)&lt;br /&gt;53/tcp   open  domain?&lt;br /&gt;80/tcp   open  http            MikroTik router http config&lt;br /&gt;2000/tcp open  callbook?&lt;br /&gt;3128/tcp open  http-proxy      Squid webproxy 2.5.STABLE11&lt;br /&gt;3986/tcp open  mapper-ws_ethd?&lt;br /&gt;8080/tcp open  http-proxy      Squid webproxy 2.5.STABLE11&lt;br /&gt;2 services unrecognized despite returning data. If you know the service/version, &lt;br /&gt;please submit the following fingerprints at &lt;br /&gt;http://www.insecure.org/cgi-bin/servicefp-submit.cgi :&lt;br /&gt;&lt;br /&gt;==============NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)==============&lt;br /&gt;SF-Port53-TCP:V=4.20%I=7%D=4/4%Time=4613A03C%P=i686-pc-windows-windows%r(D&lt;br /&gt;SF:NSVersionBindReq,E,"�x0c�x06x81x84��������")%r(DNSStatusR&lt;br /&gt;SF:equest,E,"�x0c��x90x84��������");&lt;br /&gt;==============NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)==============&lt;br /&gt;SF-Port2000-TCP:V=4.20%I=7%D=4/4%Time=4613A037%P=i686-pc-windows-windows%r&lt;br /&gt;SF:(NULL,4,"x01���")%r(GenericLines,4,"x01���")%r(GetRequest,18,"&lt;br /&gt;SF:x01���x02���d?xe4{x9dx02x1axccx8bxd1Vxb2Fxff9xb0")%r(&lt;br /&gt;SF:HTTPOptions,18,"x01���x02���d?xe4{x9dx02x1axccx8bxd1Vx&lt;br /&gt;SF:b2Fxff9xb0")%r(RTSPRequest,18,"x01���x02���d?xe4{x9dx02x&lt;br /&gt;SF:1axccx8bxd1Vxb2Fxff9xb0")%r(RPCCheck,18,"x01���x02���d?&lt;br /&gt;SF:xe4{x9dx02x1axccx8bxd1Vxb2Fxff9xb0")%r(DNSVersionBindReq,18,"&lt;br /&gt;SF:x01���x02���d?xe4{x9dx02x1axccx8bxd1Vxb2Fxff9xb0")%r(&lt;br /&gt;SF:DNSStatusRequest,4,"x01���")%r(Help,4,"x01���")%r(X11Probe,4,"&lt;br /&gt;SF:x01���")%r(FourOhFourRequest,18,"x01���x02���xb9x15&amp;xf1A&lt;br /&gt;SF:]+x11nxf6x9bxa0,xb0xe1xa5")%r(LPDString,4,"x01���")%r(LDAP&lt;br /&gt;SF:BindReq,4,"x01���")%r(LANDesk-RC,18,"x01���x02���xb9x15&amp;&lt;br /&gt;SF:xf1A]+x11nxf6x9bxa0,xb0xe1xa5")%r(TerminalServer,4,"x01��&lt;br /&gt;SF:0")%r(NCP,18,"x01���x02���xb9x15&amp;xf1A]+x11nxf6x9bxa0,&lt;br /&gt;SF:xb0xe1xa5")%r(NotesRPC,18,"x01���x02���xb9x15&amp;xf1A]+x1&lt;br /&gt;SF:1nxf6x9bxa0,xb0xe1xa5")%r(NessusTPv10,4,"x01���");&lt;br /&gt;MAC Address: 00:90:4C:91:77:02 (Epigram)&lt;br /&gt;Service Info: Host: routerku; Device: router&lt;br /&gt;&lt;br /&gt;Service detection performed. Please report any incorrect results at &lt;br /&gt;http://insecure.org/nmap/submit/ .&lt;br /&gt;&lt;br /&gt;Nmap finished: 1 IP address (1 host up) scanned in 123.031 seconds&lt;br /&gt;               Raw packets sent: 1706 (75.062KB) | Rcvd: 1722 (79.450KB)&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Dari hasil scanning tersebut dapat kita ambil kesimpulan, bahwa service dan&lt;br /&gt;port yang aktif adalah FTP dalam versi MikroTik router ftpd 2.9.27. Untuk&lt;br /&gt;SSH dengan versi OpenSSH 2.3.0 mikrotik 2.9.27 (protocol 1.99). Serta Web&lt;br /&gt;proxy memakai Squid dalam versi Squid webproxy 2.5.STABLE11.&lt;br /&gt;&lt;br /&gt;Tentu saja pihak vendor mikrotik telah melakukan patch terhadap Hole atau&lt;br /&gt;Vulnerabilities dari Versi Protocol diatas.&lt;br /&gt;&lt;br /&gt;--[11.2]-- Tool administrasi Jaringan&lt;br /&gt;&lt;br /&gt;Secara praktis terdapat beberapa tool yang dapat dimanfaatkan dalam mela&lt;br /&gt;kukan troubleshooting jaringan, seperti tool ping, traceroute, SSH, dll.&lt;br /&gt;Beberapa tool yang sering digunakan nantinya dalam administrasi sehari-hari &lt;br /&gt;adalah :&lt;br /&gt;&lt;br /&gt;o Telnet&lt;br /&gt;o SSH&lt;br /&gt;o Traceroute&lt;br /&gt;o Sniffer&lt;br /&gt;&lt;br /&gt;a. Telnet&lt;br /&gt;Perintah remote mesin ini hampir sama penggunaan dengan telnet yang ada&lt;br /&gt;di Linux atau Windows.&lt;br /&gt;&lt;br /&gt;[admin@routerku] &gt; system telnet ?&lt;br /&gt;&lt;br /&gt;Perintah diatas untuk melihat sekilias paramater apa saja yang ada. Misalnya&lt;br /&gt;mesin remote dengan ip address 192.168.0.21 dan port 23. Maka&lt;br /&gt;&lt;br /&gt;[admin@routerku] &gt; system telnet 192.168.0.21&lt;br /&gt;&lt;br /&gt;Penggunaan telnet sebaiknya dibatasi untuk kondisi tertentu dengan alasan&lt;br /&gt;keamanan, seperti kita ketahui, packet data yang dikirim melalui telnet&lt;br /&gt;belum di enskripsi. Agar lebih amannya kita pergunakan SSH.&lt;br /&gt;&lt;br /&gt;b. SSH&lt;br /&gt;Sama dengan telnet perintah ini juga diperlukan dalam remote mesin, serta&lt;br /&gt;pringsipnya sama juga parameternya dengan perintah di Linux dan Windows.&lt;br /&gt;&lt;br /&gt;[admin@routerku] &gt; system ssh 192.168.0.21&lt;br /&gt;&lt;br /&gt;Parameter SSH diatas, sedikit perbedaan dengan telnet. Jika lihat helpnya&lt;br /&gt;memiliki parameter tambahan yaitu user.&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------&lt;br /&gt;[admin@routerku] &gt; system ssh ? &lt;br /&gt;The SSH feature can be used with various SSH Telnet clients to securely connect &lt;br /&gt;to and administrate the router&lt;br /&gt;&lt;br /&gt; -- &lt;br /&gt;user -- User name&lt;br /&gt;port -- Port number&lt;br /&gt;&lt;br /&gt;[admin@routerku] &gt;&lt;br /&gt;------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Misalkan kita akan melakukan remote pada suatu mesin dengan sistem&lt;br /&gt;operasinya Linux, yang memiliki Account, username Root dan Password&lt;br /&gt;123456 pada Address 66.213.7.30. Maka perintahnya,&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------&lt;br /&gt;[admin@routerku] &gt; system ssh 66.213.7.30 user=root&lt;br /&gt;root@66.213.7.30's password:&lt;br /&gt;----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;c. Traceroute&lt;br /&gt;&lt;br /&gt;Mengetahui hops atau router apa saja yang dilewati suatu packet sampai packet &lt;br /&gt;itu terkirim ke tujuan, lazimnya kita menggunakan traceroute. Dengan tool ini&lt;br /&gt;dapat di analisa kemana saja route dari jalannya packet.&lt;br /&gt;&lt;br /&gt;Misalkan ingin mengetahui jalannya packet yang menuju server yahoo, maka:&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------&lt;br /&gt;[admin@routerku] &gt; tool traceroute yahoo.com  ADDRESS  STATUS&lt;br /&gt;   1 63.219.6.nnn    00:00:00 00:00:00 00:00:00&lt;br /&gt;   2 222.124.4.nnn   00:00:00 00:00:00 00:00:00&lt;br /&gt;   3 192.168.34.41   00:00:00 00:00:00 00:00:00&lt;br /&gt;   4 61.94.1.253     00:00:00 00:00:00 00:00:00&lt;br /&gt;   5 203.208.143.173 00:00:00 00:00:00 00:00:00&lt;br /&gt;   6 203.208.182.5   00:00:00 00:00:00 00:00:00&lt;br /&gt;   7 203.208.182.114 00:00:00 00:00:00 00:00:00&lt;br /&gt;   8 203.208.168.118 00:00:00 00:00:00 00:00:00&lt;br /&gt;   9 203.208.168.134  timeout 00:00:00 00:00:00&lt;br /&gt;  10 216.115.101.34  00:00:00  timeout  timeout&lt;br /&gt;  11 216.115.101.129  timeout  timeout 00:00:00&lt;br /&gt;  12 216.115.108.1    timeout  timeout 00:00:00&lt;br /&gt;  13 216.109.120.249 00:00:00 00:00:00 00:00:00&lt;br /&gt;  14 216.109.112.135 00:00:00  timeout  timeout&lt;br /&gt;------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;d. Sniffer&lt;br /&gt;&lt;br /&gt;Kita dapat menangkap dan menyadap packet-packet yang berjalan &lt;br /&gt;di jaringan kita, tool ini telah disediakan oleh Mikrotik yang berguna&lt;br /&gt;dalam menganalisa trafik.&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------&lt;br /&gt;[admin@routerku] &gt; tool sniffer &lt;br /&gt;Packet sniffering&lt;br /&gt;&lt;br /&gt;.. -- go up to tool&lt;br /&gt;start -- Start/reset sniffering&lt;br /&gt;stop -- Stop sniffering&lt;br /&gt;save -- Save currently sniffed packets&lt;br /&gt;packet/ -- Sniffed packets management&lt;br /&gt;protocol/ -- Protocol management&lt;br /&gt;host/ -- Host management&lt;br /&gt;connection/ -- Connection management&lt;br /&gt;print -- &lt;br /&gt;get -- get value of property&lt;br /&gt;set -- &lt;br /&gt;edit -- edit value of property&lt;br /&gt;export -- &lt;br /&gt;----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Untuk memulai proses sniffing dapat menggunakan perintah Start, sedangkan&lt;br /&gt;menghentikannya dapat menggunaka perintah Stop.&lt;br /&gt;&lt;br /&gt;[admin@routerku] &gt; tool sniffer start&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Proses sniffing sedang dikerjakan, tunggu saja beberapa lama, kemudian &lt;br /&gt;ketikkan perintah stop jika ingin menghentikannya. Melihat hasil packet&lt;br /&gt;yang ditangkap dapat menggunakan perintah print, untuk mengeksportnya &lt;br /&gt;dalam bentuk file dapat digunakan perintah export. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--[12]-- Kesimpulan&lt;br /&gt;&lt;br /&gt;Untuk pemakaian jaringan berskala Kecil-menengah produk dari Latvia ini,&lt;br /&gt;dapat menjadi pilihan, saya disini bukan untuk mempromosikan Produk ini.&lt;br /&gt;Namun sebagai gambaran, bagaimana memanfaatkan produk ini untuk berbagai&lt;br /&gt;keperluan, lagipula sebagai alternatif dari produk sejenis yang harganya&lt;br /&gt;cenderung mahal.&lt;br /&gt;&lt;br /&gt;Dengan Mikrotik yang saat ini sedang populernya diterapkan pada berbagai&lt;br /&gt;ISP Wireless, Warnet-warnet serta beberapa Perusahaan. Maka Administrasi&lt;br /&gt;Sistem Jaringan dapat lebih mudah dan sederhana. Yang jelas untuk sekedar&lt;br /&gt;memanfaatkan fasilitas Routing saja, PC TUA anda dapat digunakan.&lt;br /&gt;&lt;br /&gt;Mudah-mudahan paparan diatas dapat membantu pembaca dalam memahami, apa&lt;br /&gt;dan bagaimana mikrotik ini.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--[13]-- Referensi&lt;br /&gt;&lt;br /&gt;Artikel ini merupakan kompilasi dari berbagai sumber&lt;br /&gt;&lt;br /&gt;1. Web Blog &lt;br /&gt;   - http://dhanis.web.id&lt;br /&gt;   - http://okawardhana.web.id&lt;br /&gt;   - http://harrychanputra.web.id&lt;br /&gt;&lt;br /&gt;2. Website&lt;br /&gt;   - http://www.cgd.co.id&lt;br /&gt;   - http://www.ilmukomputer.org&lt;br /&gt;   - http://www.mikrotik.com&lt;br /&gt;   - http://www.mikrotik.co.id&lt;br /&gt;   - http://forum.mikrotik.com&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;oO Using no way as a way, Using no limitations as a limitation Oo&lt;br /&gt;&lt;br /&gt;Salam dan terimakasih,&lt;br /&gt;r0t0r &lt;br /&gt;-----------------------------------------------------------------------&lt;br /&gt;Copyleft Unreserved by Law 1995 - 2007 Kecoak Elektronik Indonesia&lt;br /&gt;http://www.kecoak-elektronik.net&lt;br /&gt; &lt;br /&gt;.L.A.M.P.I.R.A.N.&lt;br /&gt;&lt;br /&gt;Daftar Port dan Protocol berbagai jenis Trojan, Backdoor, Virus.&lt;br /&gt;daftar ini dapat saja tidak berlaku, atau dapat pula perlu ditambah&lt;br /&gt;seiring perkembangan Malware tersebut. Update terus Filter Rule&lt;br /&gt;mesin mikrotik anda.&lt;br /&gt;########## Pembatasan Brute Force  #################################&lt;br /&gt;/ ip firewall filter&lt;br /&gt;add chain=input protocol=tcp dst-port=22 connection-limit=1,32 &lt;br /&gt;    action=add-src-to-address-list address-list=ssh_logins &lt;br /&gt;    address-list-timeout=2m comment="" disabled=no&lt;br /&gt;add chain=input protocol=tcp dst-port=22 src-address-list=!ssh_logins &lt;br /&gt;    action=accept comment="" disabled=no&lt;br /&gt;add chain=forward src-address=192.168.1.10 protocol=tcp src-port=21 &lt;br /&gt;    content="password incorrect" action=add-dst-to-address-list &lt;br /&gt;    address-list=ftp_logins address-list-timeout=1m comment="" disabled=no&lt;br /&gt;add chain=forward src-address-list=ftp_logins action=drop comment="" disabled=no&lt;br /&gt;########################################################################&lt;br /&gt;&lt;br /&gt;Pemblokiran beberapa URL tertentu dapat dilakukan pada mikrotik.&lt;br /&gt;Jika paket web-proxy telah terinstall dan web-proxynya juga telah&lt;br /&gt;dikonfigurasi, maka perintah dibawah ini dapat disertakan.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-8753343576940559574?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/8753343576940559574/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=8753343576940559574' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8753343576940559574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8753343576940559574'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/mikrotik-dan-web-proxynya.html' title='Mikrotik dan Web Proxynya'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-439850747062974477</id><published>2008-04-09T09:57:00.000+07:00</published><updated>2008-04-09T10:06:57.323+07:00</updated><title type='text'>Tutorial Step By Step Seting MikroTik</title><content type='html'>MikroTik RouterOS™ adalah sistem operasi linux yang dapat digunakan untuk menjadikan komputer menjadi router network yang handal, mencakup berbagai fitur yang dibuat untuk ip network dan jaringan wireless, cocok digunakan oleh ISP dan provider hostspot.&lt;br /&gt;&lt;br /&gt;Ada pun fitur2 nya sbb:&lt;br /&gt;&lt;br /&gt;* Firewall and NAT - stateful packet filtering; Peer-to-Peer protocol filtering; source and destination NAT; classification by source MAC, IP addresses (networks or a list of networks) and address types, port range, IP protocols, protocol options (ICMP type, TCP flags and MSS), interfaces, internal packet and connection marks, ToS (DSCP) byte, content, matching sequence/frequency, packet size, time and more…&lt;br /&gt;&lt;br /&gt;* Routing - Static routing; Equal cost multi-path routing; Policy based routing (classification done in firewall); RIP v1 / v2, OSPF v2, BGP v4&lt;br /&gt;&lt;br /&gt;* Data Rate Management - Hierarchical HTB QoS system with bursts; per IP / protocol / subnet / port / firewall mark; PCQ, RED, SFQ, FIFO queue; CIR, MIR, contention ratios, dynamic client rate equalizing (PCQ), bursts, Peer-to-Peer protocol limitation&lt;br /&gt;&lt;br /&gt;* HotSpot - HotSpot Gateway with RADIUS authentication and accounting; true Plug-and-Play access for network users; data rate limitation; differentiated firewall; traffic quota; real-time status information; walled-garden; customized HTML login pages; iPass support; SSL secure authentication; advertisement support&lt;br /&gt;&lt;br /&gt;* Point-to-Point tunneling protocols - PPTP, PPPoE and L2TP Access Concentrators and clients; PAP, CHAP, MSCHAPv1 and MSCHAPv2 authentication protocols; RADIUS authentication and accounting; MPPE encryption; compression for PPPoE; data rate limitation; differentiated firewall; PPPoE dial on demand&lt;br /&gt;&lt;br /&gt;* Simple tunnels - IPIP tunnels, EoIP (Ethernet over IP)&lt;br /&gt;&lt;br /&gt;* IPsec - IP security AH and ESP protocols; MODP Diffie-Hellman groups 1,2,5; MD5 and SHA1 hashing algorithms; DES, 3DES, AES-128, AES-192, AES-256 encryption algorithms; Perfect Forwarding Secrecy (PFS) MODP groups 1,2,5&lt;br /&gt;&lt;br /&gt;* Proxy - FTP and HTTP caching proxy server; HTTPS proxy; transparent DNS and HTTP proxying; SOCKS protocol support; DNS static entries; support for caching on a separate drive; access control lists; caching lists; parent proxy support&lt;br /&gt;&lt;br /&gt;* DHCP - DHCP server per interface; DHCP relay; DHCP client; multiple DHCP networks; static and dynamic DHCP leases; RADIUS support&lt;br /&gt;&lt;br /&gt;* VRRP - VRRP protocol for high availability&lt;br /&gt;&lt;br /&gt;* UPnP - Universal Plug-and-Play support&lt;br /&gt;&lt;br /&gt;* NTP - Network Time Protocol server and client; synchronization with&lt;br /&gt;GPS system&lt;br /&gt;&lt;br /&gt;* Monitoring/Accounting - IP traffic accounting, firewall actions logging, statistics graphs accessible via HTTP&lt;br /&gt;&lt;br /&gt;* SNMP - read-only access&lt;br /&gt;&lt;br /&gt;* M3P - MikroTik Packet Packer Protocol for Wireless links and Ethernet&lt;br /&gt;&lt;br /&gt;* MNDP - MikroTik Neighbor Discovery Protocol; also supports Cisco Discovery Protocol (CDP)&lt;br /&gt;&lt;br /&gt;* Tools - ping; traceroute; bandwidth test; ping flood; telnet; SSH; packet sniffer; Dynamic DNS update tool&lt;br /&gt;&lt;br /&gt;Layer 2 connectivity:&lt;br /&gt;&lt;br /&gt;* Wireless - IEEE802.11a/b/g wireless client and access point (AP) modes; Nstreme and Nstreme2 proprietary protocols; Wireless Distribution System (WDS) support; virtual AP; 40 and 104 bit WEP; WPA pre-shared key authentication; access control list; authentication with RADIUS server; roaming (for wireless client); AP bridging&lt;br /&gt;&lt;br /&gt;* Bridge - spanning tree protocol; multiple bridge interfaces; bridge firewalling, MAC&lt;br /&gt;&lt;br /&gt;* VLAN - IEEE802.1q Virtual LAN support on Ethernet and wireless links; multiple VLANs; VLAN bridging&lt;br /&gt;&lt;br /&gt;* Synchronous - V.35, V.24, E1/T1, X.21, DS3 (T3) media types; sync-PPP, Cisco HDLC, Frame Relay line protocols; ANSI-617d (ANDI or annex D) and Q933a (CCITT or annex A) Frame Relay LMI types&lt;br /&gt;&lt;br /&gt;* Asynchronous - s*r*al PPP dial-in / dial-out; PAP, CHAP, MSCHAPv1 and MSCHAPv2 authentication protocols; RADIUS authentication and accounting; onboard s*r*al ports; modem pool with up to 128 ports; dial on demand&lt;br /&gt;&lt;br /&gt;* ISDN - ISDN dial-in / dial-out; PAP, CHAP, MSCHAPv1 and MSCHAPv2 authentication protocols; RADIUS authentication and accounting; 128K bundle support; Cisco HDLC, x75i, x75ui, x75bui line protocols; dial on demand&lt;br /&gt;&lt;br /&gt;* SDSL - Single-line DSL support; line termination and network termination modes&lt;br /&gt;&lt;br /&gt;Instalasi dapat dilakukan pada Standard computer PC yang akan dijadikan router dan tidak memerlukan resource yang cukup besar untuk penggunaan standard, misalnya hanya sebagai gateway.&lt;br /&gt;&lt;br /&gt;Berikut spec_minimal nya :&lt;br /&gt;&lt;br /&gt;* CPU dan motherboard - bisa dgn P1 ~ P4, AMD, cyrix asal yang bukan multi-prosesor&lt;br /&gt;&lt;br /&gt;* RAM - minimum 32 MiB, maximum 1 GiB; 64 MiB atau lebih sangat dianjurkan, kalau mau sekalian dibuat proxy , dianjurkan 1GB… perbandingannya, 15MB di memori ada 1GB di proxy..&lt;br /&gt;&lt;br /&gt;* HDD minimal 128MB parallel ATA atau Compact Flash, tidak dianjurkan menggunakan UFD, SCSI, apa lagi S-ATA (mungkin nanti Ver. 3.0)&lt;br /&gt;&lt;br /&gt;* NIC 10/100 atau 100/1000&lt;br /&gt;&lt;br /&gt;Untuk keperluan beban yang besar ( network yang kompleks, routing yang rumit dll) disarankan untuk mempertimbangkan pemilihan resource PC yang memadai.&lt;br /&gt;&lt;br /&gt;Lebih lengkap bisa dilihat di www.mikrotik.com. Meskipun demikian Mikrotik bukanlah free software, artinya kita harus membeli licensi terhadap segala fasiltas yang disediakan. Free trial hanya untuk 24 jam saja.&lt;br /&gt;&lt;br /&gt;Kita bisa membeli software MikroTik dalam bentuk “licence” di CITRAWEB, UFOAKSES, PC24 (atau download cracknya, he he he …) yang diinstall pada HardDisk yang sebelumnya download/dibuat MikroTik RouterOS ISO kekeping CD atau disk on module (DOM). Jika kita membeli DOM tidak perlu install tetapi tinggal pasang DOM pada slot IDE PC kita.&lt;br /&gt;&lt;br /&gt;Langkah-langkah berikut adalah dasar-dasar setup mikrotik yang dikonfigurasikan untuk jaringan&lt;br /&gt;sederhana sebagai gateway server.&lt;br /&gt;&lt;br /&gt;1. Langkah pertama adalah install Mikrotik RouterOS pada PC atau pasang DOM.&lt;br /&gt;&lt;br /&gt;2. Login Pada Mikrotik Routers melalui console :&lt;br /&gt;&lt;br /&gt;MikroTik v2.9.39&lt;br /&gt;&lt;br /&gt;Login: admin&lt;br /&gt;&lt;br /&gt;Password: (kosongkan)&lt;br /&gt;&lt;br /&gt;Sampai langkah ini kita sudah bisa masuk pada mesin Mikrotik. User default adalah admin dan tanpa password, tinggal ketik admin kemudian tekan tombol enter.&lt;br /&gt;&lt;br /&gt;3. Untuk keamanan ganti password default&lt;br /&gt;&lt;br /&gt;[admin@Mikrotik] &gt; password&lt;br /&gt;&lt;br /&gt;old password: *****&lt;br /&gt;&lt;br /&gt;new password: *****&lt;br /&gt;&lt;br /&gt;retype new password: *****&lt;br /&gt;&lt;br /&gt;[admin@ Mikrotik] &gt;&lt;br /&gt;&lt;br /&gt;4. Mengganti nama Mikrotik Router, pada langkah ini nama server akan kita ganti menjadi&lt;br /&gt;“r-WLI” (bebas, disesuaikan dengan nama jaringan kita…)&lt;br /&gt;&lt;br /&gt;[admin@Mikrotik] &gt; system identity set name=r-WLI&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt;&lt;br /&gt;&lt;br /&gt;5. Melihat interface pada Mikrotik Router&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt; interface print&lt;br /&gt;&lt;br /&gt;Flags: X - disabled, D - dynamic, R - running&lt;br /&gt;&lt;br /&gt;# NAME TYPE RX-RATE TX-RATE MTU&lt;br /&gt;&lt;br /&gt;0 R ether1 ether 0 0 1500&lt;br /&gt;&lt;br /&gt;1 R ether2 ether 0 0 1500&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt;&lt;br /&gt;&lt;br /&gt;6. Memberikan IP address pada interface Mikrotik. Misalkan ether1 akan kita gunakan untuk koneksi ke Internet dengan IP 192.168.0.1 dan ether2 akan kita gunakan untuk network local kita dengan IP 172.16.0.1&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt; ip address add address=192.168.0.1 /&lt;br /&gt;&lt;br /&gt;netmask=255.255.255.0 interface=ether1&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt; ip address add address=172.16.0.1 /&lt;br /&gt;&lt;br /&gt;netmask=255.255.255.0 interface=ether2&lt;br /&gt;&lt;br /&gt;7. Melihat konfigurasi IP address yang sudah kita berikan&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt;ip address print&lt;br /&gt;&lt;br /&gt;Flags: X - disabled, I - invalid, D - dynamic&lt;br /&gt;&lt;br /&gt;# ADDRESS NETWORK BROADCAST INTERFACE&lt;br /&gt;&lt;br /&gt;0 192.168.0.1/24 192.168.0.0 192.168.0.63 ether1&lt;br /&gt;&lt;br /&gt;1 172.16.0.1/24 172.16.0.0 172.16.0.255 ether2&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt;&lt;br /&gt;&lt;br /&gt;8. Memberikan default Gateway, diasumsikan gateway untuk koneksi internet adalah 192.168.0.254&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt; /ip route add gateway=192.168.0.254&lt;br /&gt;&lt;br /&gt;9. Melihat Tabel routing pada Mikrotik Routers&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt; ip route print&lt;br /&gt;&lt;br /&gt;Flags: X - disabled, A - active, D - dynamic,&lt;br /&gt;&lt;br /&gt;C - connect, S - static, r - rip, b - bgp, o - ospf&lt;br /&gt;&lt;br /&gt;# DST-ADDRESS PREF-SRC G GATEWAY DISTANCE INTERFACE&lt;br /&gt;&lt;br /&gt;0 ADC 172.16.0.0/24 172.16.0.1 ether2&lt;br /&gt;&lt;br /&gt;1 ADC 192.168.0.0/26 192.168.0.1 ether1&lt;br /&gt;&lt;br /&gt;2 A S 0.0.0.0/0 r 192.168.0.254 ether1&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt;&lt;br /&gt;&lt;br /&gt;10. Tes Ping ke Gateway untuk memastikan konfigurasi sudah benar&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt; ping 192.168.0.254&lt;br /&gt;&lt;br /&gt;192.168.0.254 64 byte ping: ttl=64 time&lt;br /&gt;&lt;br /&gt;11. Setup DNS pada Mikrotik Routers&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt; ip dns set primary-dns=192.168.0.10 /&lt;br /&gt;&lt;br /&gt;allow-remoterequests=no&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt; ip dns set secondary-dns=192.168.0.11 /&lt;br /&gt;&lt;br /&gt;allow-remoterequests=no&lt;br /&gt;&lt;br /&gt;12. Melihat konfigurasi DNS&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] ip dns&gt; pr&lt;br /&gt;&lt;br /&gt;primary-dns: 192.168.0.10&lt;br /&gt;&lt;br /&gt;secondary-dns: 192.168.0.11&lt;br /&gt;&lt;br /&gt;allow-remote-requests: no&lt;br /&gt;&lt;br /&gt;cache-size: 2048KiB&lt;br /&gt;&lt;br /&gt;cache-max-ttl: 1w&lt;br /&gt;&lt;br /&gt;cache-used: 21KiB&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] ip dns&gt;&lt;br /&gt;&lt;br /&gt;13. Tes untuk akses domain, misalnya dengan ping nama domain&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt; ping yahoo.com&lt;br /&gt;&lt;br /&gt;216.109.112.135 64 byte ping: ttl=48 time=250 ms&lt;br /&gt;10 packets transmitted, 10 packets received, 0% packet loss&lt;br /&gt;round-trip min/avg/max = 571/571.0/571 ms&lt;br /&gt;[admin@r-WLI] &gt;&lt;br /&gt;&lt;br /&gt;Jika sudah berhasil reply berarti seting DNS sudah benar.&lt;br /&gt;&lt;br /&gt;14. Setup Masquerading, Jika Mikrotik akan kita pergunakan sebagai gateway server maka agar client computer pada network dapat terkoneksi ke internet perlu kita masquerading.&lt;br /&gt;&lt;br /&gt;[admin@r-WLI]&gt; ip firewall nat add action=masquerade /&lt;br /&gt;&lt;br /&gt;outinterface=ether1 chain:srcnat&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt;&lt;br /&gt;&lt;br /&gt;15. Melihat konfigurasi Masquerading&lt;br /&gt;&lt;br /&gt;[admin@r-WLI]ip firewall nat print&lt;br /&gt;&lt;br /&gt;Flags: X - disabled, I - invalid, D - dynamic&lt;br /&gt;&lt;br /&gt;0 chain=srcnat out-interface=ether1 action=masquerade&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt;&lt;br /&gt;&lt;br /&gt;Setelah langkah ini bisa dilakukan pemeriksaan untuk koneksi dari jaringan local. Dan jika berhasil berarti kita sudah berhasil melakukan instalasi MikroTik Router sebagai Gateway server. Setelah terkoneksi dengan jaringan Mikrotik dapat dimanage menggunakan WinBox yang bisa didownload dari MikroTik.com atau dari server mikrotik kita.&lt;br /&gt;&lt;br /&gt;Misal Ip address server mikrotik kita 192.168.0.1, via browser buka http://192.168.0.1 dan download WinBox dari situ.&lt;br /&gt;Jika kita menginginkan client mendapatkan IP address secara otomatis maka perlu kita setup dhcp server pada Mikrotik. Berikut langkah-langkahnya :&lt;br /&gt;&lt;br /&gt;1. Buat IP address pool&lt;br /&gt;/ip pool add name=dhcp-pool ranges=172.16.0.10-172.16.0.20&lt;br /&gt;&lt;br /&gt;2. Tambahkan DHCP Network dan gatewaynya yang akan didistribusikan ke client Pada contoh ini networknya adalah 172.16.0.0/24 dan gatewaynya 172.16.0.1&lt;br /&gt;/ip dhcp-server network add address=172.16.0.0/24 gateway=172.16.0.1&lt;br /&gt;&lt;br /&gt;3. Tambahkan DHCP Server ( pada contoh ini dhcp diterapkan pada interface ether2 )&lt;br /&gt;/ip dhcp-server add interface=ether2 address-pool=dhcp-pool&lt;br /&gt;&lt;br /&gt;4. Lihat status DHCP server&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt; ip dhcp-server pr&lt;br /&gt;&lt;br /&gt;Flags: X - disabled, I - invalid&lt;br /&gt;&lt;br /&gt;# NAME INTERFACE RELAY ADDRESS-POOL LEASE-TIME ADD-ARP&lt;br /&gt;&lt;br /&gt;x dhcp1 ether2 dhcp_pool1 4w2d yes&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] &gt;&lt;br /&gt;&lt;br /&gt;Tanda X menyatakan bahwa DHCP server belum enable maka perlu dienablekan terlebih dahulu pada langkah 5.&lt;br /&gt;&lt;br /&gt;5. Jangan Lupa dibuat enable dulu dhcp servernya&lt;br /&gt;/ip dhcp-server enable 0&lt;br /&gt;&lt;br /&gt;Kemudian cek kembali dhcp-server seperti langkah 4, jika tanda X sudah tidak ada berarti sudah aktif.&lt;br /&gt;&lt;br /&gt;6. Tes Dari client&lt;br /&gt;&lt;br /&gt;Run dari Comman Prompt&lt;br /&gt;&lt;br /&gt;Microsoft Windows XP [Version 5.1.2600]&lt;br /&gt;(C) Copyright 1985-2001 Microsoft Corp.&lt;br /&gt;&lt;br /&gt;C:\Documents and Settings\EsDat&gt;ping www.yahoo.com&lt;br /&gt;&lt;br /&gt;Pinging www.yahoo-ht3.akadns.net [69.147.114.210] with 32 bytes of data:&lt;br /&gt;&lt;br /&gt;Reply from 124.158.129.5: bytes=32 time=34ms TTL=59&lt;br /&gt;Reply from 124.158.129.5: bytes=32 time=24ms TTL=59&lt;br /&gt;Reply from 124.158.129.5: bytes=32 time=41ms TTL=59&lt;br /&gt;Reply from 124.158.129.5: bytes=32 time=29ms TTL=59&lt;br /&gt;&lt;br /&gt;Ping statistics for 69.147.114.210:&lt;br /&gt;Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),&lt;br /&gt;Approximate round trip times in milli-seconds:&lt;br /&gt;Minimum = 24ms, Maximum = 41ms, Average = 32ms&lt;br /&gt;&lt;br /&gt;7. Untuk bandwith controller, bisa dengan sistem simple queue ataupun bisa dengan mangle&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] queue simple&gt; add name=Komputer01 /&lt;br /&gt;&lt;br /&gt;interface=ether2 target-address=172.16.0.1/24 max-limit=65536/131072&lt;br /&gt;&lt;br /&gt;[admin@r-WLI] queue simple&gt; add name=Komputer02 /&lt;br /&gt;&lt;br /&gt;interface=ether2 target-address=172.16.0.2/24 max-limit=65536/131072&lt;br /&gt;&lt;br /&gt;dan seterusnya…&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-439850747062974477?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/439850747062974477/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=439850747062974477' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/439850747062974477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/439850747062974477'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/tutorial-step-by-step-seting-mikrotik.html' title='Tutorial Step By Step Seting MikroTik'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-6327187298617512765</id><published>2008-04-09T08:53:00.000+07:00</published><updated>2008-04-09T09:57:45.552+07:00</updated><title type='text'>14 langkah instalasi miktotik pakai speedy</title><content type='html'>/ip address add interface=ether1 address = 192.168.1.1 netmask= 255.255.255.0&lt;br /&gt;/ip address add interface=ether2 address = 192.168.0.1 netmask= 255.255.255.0&lt;br /&gt;/interface print&lt;br /&gt;/inteface set 0 name=”Public”&lt;br /&gt;/inteface set 1 name=”Lan”&lt;br /&gt;/ip route add gateway=192.168.0.1&lt;br /&gt;/ip dns set primary-dns=203.130.193.74 secondary-dns=202.134.0.155&lt;br /&gt;/ip dns set allow-remote-requests=yes&lt;br /&gt;/ip firewall nat add chain=srcnat out-inteface=Public action=masquerade&lt;br /&gt;/ip firewall nat add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080&lt;br /&gt;/ip firewall nat add chain=dstnat protocol=tcp dst-port=3128 action=redirect to-ports=8080&lt;br /&gt;/ip firewall nat add chain=dstnat protocol=tcp dst-port=8080 action=redirect to-ports=8080&lt;br /&gt;/ip pool add name=”dhcp-pool” ranges=192.168.0.1-192.168.0.29&lt;br /&gt;/ip dhcp-server add name=”dhcp1″ inteface=LAN address-pool=”dhcp-pool” lease-time=3d&lt;br /&gt;/ip dns set allow-remote-requests=yes&lt;br /&gt;/ip firewall nat add chain=srcnat out-inteface=Public action=masquerade&lt;br /&gt;/ip firewall nat add chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080&lt;br /&gt;/ip firewall nat add chain=dstnat protocol=tcp dst-port=3128 action=redirect to-ports=8080&lt;br /&gt;/ip firewall nat add chain=dstnat protocol=tcp dst-port=8080 action=redirect to-ports=8080&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-6327187298617512765?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/6327187298617512765/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=6327187298617512765' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/6327187298617512765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/6327187298617512765'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/14-langkah-instalasi-miktotik-pakai.html' title='14 langkah instalasi miktotik pakai speedy'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-1406710598266241481</id><published>2008-04-08T16:19:00.000+07:00</published><updated>2008-04-08T16:21:30.243+07:00</updated><title type='text'>Filter</title><content type='html'>General Information&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;The firewall implements packet filtering and thereby provides security functions that are used to manage data flow to, from and through the router. Along with the Network Address Translation it serve as a tool for preventing unauthorized access to directly attached networks and the router itself as well as a filter for outgoing traffic.&lt;br /&gt;Quick Setup Guide&lt;br /&gt;&lt;br /&gt;To add a firewall rule which drops all TCP packets that are destined to port 135 and going through the router, use the following command:&lt;br /&gt;/ip firewall filter add chain=forward dst-port=135 protocol=tcp action=drop&lt;br /&gt;&lt;br /&gt;To deny acces to the router via Telnet (protocol TCP, port 23), type the following command:&lt;br /&gt;/ip firewall filter add chain=input protocol=tcp dst-port=23 action=drop&lt;br /&gt;&lt;br /&gt;To only allow not more than 5 simultaneous connections from each of the clients, do the following:&lt;br /&gt;/ip firewall filter add chain=forward protocol=tcp tcp-flags=syn connection-limit=6,32 action=drop&lt;br /&gt;Specifications&lt;br /&gt;Packages required: system&lt;br /&gt;License required: Level1 (P2P filters limited to 1) , Level3&lt;br /&gt;Submenu level: /ip firewall filter&lt;br /&gt;Standards and Technologies: IP, RFC2113&lt;br /&gt;Hardware usage: Increases with filtering rules count&lt;br /&gt;Firewall Filter&lt;br /&gt;Submenu level: /ip firewall filter&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;Network firewalls keep outside threats away from sensitive data available inside the network. Whenever different networks are joined together, there is always a threat that someone from outside of your network will break into your LAN. Such break-ins may result in private data being stolen and distributed, valuable data being altered or destroyed, or entire hard drives being erased. Firewalls are used as a means of preventing or minimizing the security risks inherent in connecting to other networks. Properly configured firewall plays a key role in efficient and secure network infrastrure deployment.&lt;br /&gt;&lt;br /&gt;MikroTik RouterOS has very powerful firewall implementation with features including:&lt;br /&gt;stateful packet inspection &lt;br /&gt;Layer-7 protocol detection &lt;br /&gt;peer-to-peer protocols filtering &lt;br /&gt;traffic classification by: &lt;br /&gt;source MAC address &lt;br /&gt;IP addresses (network or list) and address types (broadcast, local, multicast, unicast) &lt;br /&gt;port or port range &lt;br /&gt;IP protocols &lt;br /&gt;protocol options (ICMP type and code fields, TCP flags, IP options and MSS) &lt;br /&gt;interface the packet arrived from or left through &lt;br /&gt;internal flow and connection marks &lt;br /&gt;DSCP byte &lt;br /&gt;packet content &lt;br /&gt;rate at which packets arrive and sequence numbers &lt;br /&gt;packet size &lt;br /&gt;packet arrival time &lt;br /&gt;and much more! &lt;br /&gt;General Filtering Principles &lt;br /&gt;&lt;br /&gt;The firewall operates by means of firewall rules. A rule is a definitive form expression that tells the router what to do with a particular IP packet. Each rule consists of two parts that are the matcher which matches traffic flow against given conditions and the action which defines what to do with the mathched packets. Rules are organized in chains for better management.&lt;br /&gt;&lt;br /&gt;The filter facility has three default chains: input, forward and output that are responsible for traffic coming from, throurh and to the router, respectively. New user-defined chains can be added, as necessary. Since these chains have no default traffic to match, rules with action=jump and relevant jump-target should be added to one or more of the three default chains.&lt;br /&gt;Filter Chains &lt;br /&gt;&lt;br /&gt;As mentioned before, the firewall filtering rules are grouped together in chains. It allows a packet to be matched against one common criterion in one chain, and then passed over for processing against some other common criteria to another chain. For example a packet should be matched against the IP address:port pair. Of course, it could be achieved by adding as many rules with IP address:port match as required to the forward chain, but a better way could be to add one rule that matches traffic from a particular IP address, e.g.: /ip firewall filter add src-address=1.1.1.2/32 jump-target="mychain" and in case of successfull match passes control over the IP packet to some other chain, id est mychain in this example. Then rules that perform matching against separate ports can be added to mychain chain without specifying the IP addresses.&lt;br /&gt;&lt;br /&gt;There are three predefined chains, which cannot be deleted:&lt;br /&gt;input - used to process packets entering the router through one of the interfaces with the destination IP address which is one of the router's addresses. Packets passing through the router are not processed against the rules of the input chain &lt;br /&gt;forward - used to process packets passing through the router &lt;br /&gt;output - used to process packets originated from the router and leaving it through one of the interfaces. Packets passing through the router are not processed against the rules of the output chain &lt;br /&gt;&lt;br /&gt;When processing a chain, rules are taken from the chain in the order they are listed there from top to bottom. If a packet matches the criteria of the rule, then the specified action is performed on it, and no more rules are processed in that chain (the exception is the passthrough action). If a packet has not matched any rule within the chain, then it is accepted.&lt;br /&gt;Property Description&lt;br /&gt;action (accept | add-dst-to-address-list | add-src-to-address-list | drop | jump | log | passthrough | reject | return | tarpit; default: accept) - action to undertake if the packet matches the ruleaccept - accept the packet. No action is taken, i.e. the packet is passed through and no more rules are applied to it &lt;br /&gt;add-dst-to-address-list - adds destination address of an IP packet to the address list specified by address-list parameter &lt;br /&gt;add-src-to-address-list - adds source address of an IP packet to the address list specified by address-list parameter &lt;br /&gt;drop - silently drop the packet (without sending the ICMP reject message) &lt;br /&gt;jump - jump to the chain specified by the value of the jump-target parameter &lt;br /&gt;log - each match with this action will add a message to the system log &lt;br /&gt;passthrough - ignores this rule and goes on to the next one &lt;br /&gt;reject - reject the packet and send an ICMP reject message &lt;br /&gt;return - passes control back to the chain from where the jump took place &lt;br /&gt;tarpit - captures and holds incoming TCP connections (replies with SYN/ACK to the inbound TCP SYN packet) &lt;br /&gt;accept - accept the packet. No action is taken, i.e. the packet is passed through and no more rules are applied to it &lt;br /&gt;add-dst-to-address-list - adds destination address of an IP packet to the address list specified by address-list parameter &lt;br /&gt;add-src-to-address-list - adds source address of an IP packet to the address list specified by address-list parameter &lt;br /&gt;drop - silently drop the packet (without sending the ICMP reject message) &lt;br /&gt;jump - jump to the chain specified by the value of the jump-target parameter &lt;br /&gt;log - each match with this action will add a message to the system log &lt;br /&gt;passthrough - ignores this rule and goes on to the next one &lt;br /&gt;reject - reject the packet and send an ICMP reject message &lt;br /&gt;return - passes control back to the chain from where the jump took place &lt;br /&gt;tarpit - captures and holds incoming TCP connections (replies with SYN/ACK to the inbound TCP SYN packet) &lt;br /&gt;&lt;br /&gt;address-list (name) - specifies the name of the address list to collect IP addresses from rules having action=add-dst-to-address-list or action=add-src-to-address-list actions. These address lists could be later used for packet matching&lt;br /&gt;&lt;br /&gt;address-list-timeout (time; default: 00:00:00) - time interval after which the address will be removed from the address list specified by address-list parameter. Used in conjunction with add-dst-to-address-list or add-src-to-address-list actions00:00:00 - leave the address in the address list forever &lt;br /&gt;00:00:00 - leave the address in the address list forever &lt;br /&gt;&lt;br /&gt;chain (forward | input | output | name) - specifies the chain to put a particular rule into. As the different traffic is passed through different chains, always be careful in choosing the right chain for a new rule. If the input does not match the name of an already defined chain, a new chain will be created&lt;br /&gt;&lt;br /&gt;comment (text) - a descriptive comment for the rule. A comment can be used to identify rules form scripts&lt;br /&gt;&lt;br /&gt;connection-bytes (integer-integer) - matches packets only if a given amount of bytes has been transfered through the particular connection0 - means infinity, exempli gratia: connection-bytes=2000000-0 means that the rule matches if more than 2MB has been transfered through the relevant connection &lt;br /&gt;0 - means infinity, exempli gratia: connection-bytes=2000000-0 means that the rule matches if more than 2MB has been transfered through the relevant connection &lt;br /&gt;&lt;br /&gt;connection-limit (integer,netmask) - restrict connection limit per address or address block&lt;br /&gt;&lt;br /&gt;connection-mark (name) - matches packets marked via mangle facility with particular connection mark&lt;br /&gt;&lt;br /&gt;connection-state (estabilished | invalid | new | related) - interprets the connection tracking analysis data for a particular packetestabilished - a packet which belongs to an existing connection, exempli gratia a reply packet or a packet which belongs to already replied connection &lt;br /&gt;invalid - a packet which could not be identified for some reason. This includes out of memory condition and ICMP errors which do not correspond to any known connection. It is generally advised to drop these packets &lt;br /&gt;new - a packet which begins a new TCP connection &lt;br /&gt;related - a packet which is related to, but not part of an existing connection, such as ICMP errors or a packet which begins FTP data connection (the later requires enabled FTP connection tracking helper under /ip firewall service-port) &lt;br /&gt;estabilished - a packet which belongs to an existing connection, exempli gratia a reply packet or a packet which belongs to already replied connection &lt;br /&gt;invalid - a packet which could not be identified for some reason. This includes out of memory condition and ICMP errors which do not correspond to any known connection. It is generally advised to drop these packets &lt;br /&gt;new - a packet which begins a new TCP connection &lt;br /&gt;related - a packet which is related to, but not part of an existing connection, such as ICMP errors or a packet which begins FTP data connection (the later requires enabled FTP connection tracking helper under /ip firewall service-port) &lt;br /&gt;&lt;br /&gt;connection-type (ftp | gre | h323 | irc | mms | pptp | quake3 | tftp) - matches packets from related connections based on information from their connection tracking helpers. A relevant connection helper must be enabled under /ip firewall service-port &lt;br /&gt;&lt;br /&gt;content (text) - the text packets should contain in order to match the rule&lt;br /&gt;&lt;br /&gt;dscp (integer: 0..63) - DSCP (ex-ToS) IP header field value&lt;br /&gt;&lt;br /&gt;dst-address (IP address/netmask | IP address-IP address) - specifies the address range an IP packet is destined to. Note that console converts entered address/netmask value to a valid network address, i.e.:1.1.1.1/24 is converted to 1.1.1.0/24 &lt;br /&gt;&lt;br /&gt;dst-address-list (name) - matches destination address of a packet against user-defined address list&lt;br /&gt;&lt;br /&gt;dst-address-type (unicast | local | broadcast | multicast) - matches destination address type of the IP packet, one of the:unicast - IP addresses used for one point to another point transmission. There is only one sender and one receiver in this case &lt;br /&gt;local - matches addresses assigned to router's interfaces &lt;br /&gt;broadcast - the IP packet is sent from one point to all other points in the IP subnetwork &lt;br /&gt;multicast - this type of IP addressing is responsible for transmission from one or more points to a set of other points &lt;br /&gt;unicast - IP addresses used for one point to another point transmission. There is only one sender and one receiver in this case &lt;br /&gt;local - matches addresses assigned to router's interfaces &lt;br /&gt;broadcast - the IP packet is sent from one point to all other points in the IP subnetwork &lt;br /&gt;multicast - this type of IP addressing is responsible for transmission from one or more points to a set of other points &lt;br /&gt;&lt;br /&gt;dst-limit (integer/time{0,1},integer,dst-address | dst-port | src-address{+},time{0,1}) - limits the packet per second (pps) rate on a per destination IP or per destination port base. As opposed to the limit match, every destination IP address / destination port has it's own limit. The options are as follows (in order of appearance):count - maximum average packet rate, measured in packets per second (pps), unless followed by time option &lt;br /&gt;time - specifies the time interval over which the packet rate is measured &lt;br /&gt;burst - number of packets to match in a burst &lt;br /&gt;mode - the classifier(-s) for packet rate limiting &lt;br /&gt;expire - specifies interval after which recorded IP addresses / ports will be deleted &lt;br /&gt;count - maximum average packet rate, measured in packets per second (pps), unless followed by time option &lt;br /&gt;time - specifies the time interval over which the packet rate is measured &lt;br /&gt;burst - number of packets to match in a burst &lt;br /&gt;mode - the classifier(-s) for packet rate limiting &lt;br /&gt;expire - specifies interval after which recorded IP addresses / ports will be deleted &lt;br /&gt;&lt;br /&gt;dst-port (integer: 0..65535-integer: 0..65535{*}) - destination port number or range&lt;br /&gt;&lt;br /&gt;fragment (yes | no) - whether the packet is a fragment of an IP packet. Starting packet (i.e., first fragment) does not count. Note that is the connection tracking is enabled, there will be no fragments as the system automatically assembles every packet&lt;br /&gt;&lt;br /&gt;hotspot (multiple choice: auth | from-client | http | local-dst | to-client) - matches packets received from clients against various HotSpot conditions. All values can be negatedauth - true, if a packet comes from an authenticted HotSpotclient&lt;br /&gt;from-client - true, if a packet comes from any HotSpot client&lt;br /&gt;http - true, if a HotSpot client sends a packet to the address and port previously detected as his proxy server (Universal Proxy technique) or if the destination port is 80 and transparent proxying is enabled for that particular client&lt;br /&gt;local-dst - true, if a packet has local destination IP address&lt;br /&gt;to-client - true, if a packet is sent to a client&lt;br /&gt;auth - true, if a packet comes from an authenticted HotSpotclient&lt;br /&gt;from-client - true, if a packet comes from any HotSpot client&lt;br /&gt;http - true, if a HotSpot client sends a packet to the address and port previously detected as his proxy server (Universal Proxy technique) or if the destination port is 80 and transparent proxying is enabled for that particular client&lt;br /&gt;local-dst - true, if a packet has local destination IP address&lt;br /&gt;to-client - true, if a packet is sent to a client&lt;br /&gt;&lt;br /&gt;icmp-options (integer:integer) - matches ICMP Type:Code fields&lt;br /&gt;&lt;br /&gt;in-bridge-port (name) - actual interface the packet has entered the router through (if bridged, this property matches the actual bridge port, while in-interface - the bridge itself)&lt;br /&gt;&lt;br /&gt;in-interface (name) - interface the packet has entered the router through (if the interface is bridged, then the packet will appear to come from the bridge interface itself)&lt;br /&gt;&lt;br /&gt;ingress-priority (integer: 0..63) - INGRESS (received) priority of the packet, if set (0 otherwise). The priority may be derived from either VLAN or WMM priority&lt;br /&gt;&lt;br /&gt;ipv4-options (any | loose-source-routing | no-record-route | no-router-alert | no-source-routing | no-timestamp | none | record-route | router-alert | strict-source-routing | timestamp) - match ipv4 header optionsany - match packet with at least one of the ipv4 options &lt;br /&gt;loose-source-routing - match packets with loose source routing option. This option is used to route the internet datagram based on information supplied by the source &lt;br /&gt;no-record-route - match packets with no record route option. This option is used to route the internet datagram based on information supplied by the source &lt;br /&gt;no-router-alert - match packets with no router alter option &lt;br /&gt;no-source-routing - match packets with no source routing option &lt;br /&gt;no-timestamp - match packets with no timestamp option &lt;br /&gt;record-route - match packets with record route option &lt;br /&gt;router-alert - match packets with router alter option &lt;br /&gt;strict-source-routing - match packets with strict source routing option &lt;br /&gt;timestamp - match packets with timestamp &lt;br /&gt;any - match packet with at least one of the ipv4 options &lt;br /&gt;loose-source-routing - match packets with loose source routing option. This option is used to route the internet datagram based on information supplied by the source &lt;br /&gt;no-record-route - match packets with no record route option. This option is used to route the internet datagram based on information supplied by the source &lt;br /&gt;no-router-alert - match packets with no router alter option &lt;br /&gt;no-source-routing - match packets with no source routing option &lt;br /&gt;no-timestamp - match packets with no timestamp option &lt;br /&gt;record-route - match packets with record route option &lt;br /&gt;router-alert - match packets with router alter option &lt;br /&gt;strict-source-routing - match packets with strict source routing option &lt;br /&gt;timestamp - match packets with timestamp &lt;br /&gt;&lt;br /&gt;jump-target (forward | input | output | name) - name of the target chain to jump to, if the action=jump is used&lt;br /&gt;&lt;br /&gt;layer7-protocol (name) - Layer 7 filter name as set in the /ip firewall layer7-protocol menu. Caution: this matcher needs high computational power&lt;br /&gt;&lt;br /&gt;limit (integer/time{0,1},integer) - restricts packet match rate to a given limit. Usefull to reduce the amount of log messagescount - maximum average packet rate, measured in packets per second (pps), unless followed by time option &lt;br /&gt;time - specifies the time interval over which the packet rate is measured &lt;br /&gt;burst - number of packets to match in a burst &lt;br /&gt;count - maximum average packet rate, measured in packets per second (pps), unless followed by time option &lt;br /&gt;time - specifies the time interval over which the packet rate is measured &lt;br /&gt;burst - number of packets to match in a burst &lt;br /&gt;&lt;br /&gt;log-prefix (text) - all messages written to logs will contain the prefix specified herein. Used in conjunction with action=log &lt;br /&gt;&lt;br /&gt;nth (integer,integer: 0..15,integer{0,1}) - match a particular Nth packet received by the rule. One of 16 available counters can be used to count packetsevery - match every every+1th packet. For example, if every=1 then the rule matches every 2nd packet &lt;br /&gt;counter - specifies which counter to use. A counter increments each time the rule containing nth match matches &lt;br /&gt;packet - match on the given packet number. The value by obvious reasons must be between 0 and every. If this option is used for a given counter, then there must be at least every+1 rules with this option, covering all values between 0 and every inclusively. &lt;br /&gt;every - match every every+1th packet. For example, if every=1 then the rule matches every 2nd packet &lt;br /&gt;counter - specifies which counter to use. A counter increments each time the rule containing nth match matches &lt;br /&gt;packet - match on the given packet number. The value by obvious reasons must be between 0 and every. If this option is used for a given counter, then there must be at least every+1 rules with this option, covering all values between 0 and every inclusively. &lt;br /&gt;&lt;br /&gt;out-bridge-port (name) - actual interface the packet is leaving the router through (if bridged, this property matches the actual bridge port, while out-interface - the bridge itself)&lt;br /&gt;&lt;br /&gt;out-interface (name) - interface the packet is leaving the router through (if the interface is bridged, then the packet will appear to leave through the bridge interface itself)&lt;br /&gt;&lt;br /&gt;p2p (all-p2p | bit-torrent | blubster | direct-connect | edonkey | fasttrack | gnutella | soulseek | warez | winmx) - matches packets from various peer-to-peer (P2P) protocols&lt;br /&gt;&lt;br /&gt;packet-mark (text) - matches packets marked via mangle facility with particular packet mark&lt;br /&gt;&lt;br /&gt;packet-size (integer: 0..65535-integer: 0..65535{0,1}) - matches packet of the specified size or size range in bytesmin - specifies lower boundary of the size range or a standalone value &lt;br /&gt;max - specifies upper boundary of the size range &lt;br /&gt;min - specifies lower boundary of the size range or a standalone value &lt;br /&gt;max - specifies upper boundary of the size range &lt;br /&gt;&lt;br /&gt;port (port{0-16}) - matches if any (source or destination) port matches the specified list of ports or port ranges (note that the protocol must still be selected, just like for the regular src-port and dst-port matchers)&lt;br /&gt;&lt;br /&gt;protocol (ddp | egp | encap | ggp | gre | hmp | icmp | idrp-cmtp | igmp | ipencap | ipip | ipsec-ah | ipsec-esp | iso-tp4 | ospf | pup | rdp | rspf | st | tcp | udp | vmtp | xns-idp | xtp | integer) - matches particular IP protocol specified by protocol name or number. You should specify this setting if you want to specify ports&lt;br /&gt;&lt;br /&gt;psd (integer,time,integer,integer) - attempts to detect TCP and UDP scans. It is advised to assign lower weight to ports with high numbers to reduce the frequency of false positives, such as from passive mode FTP transfersWeightThreshold - total weight of the latest TCP/UDP packets with different destination ports coming from the same host to be treated as port scan sequence &lt;br /&gt;DelayThreshold - delay for the packets with different destination ports coming from the same host to be treated as possible port scan subsequence &lt;br /&gt;LowPortWeight - weight of the packets with privileged (&lt;=1024) destination port &lt;br /&gt;HighPortWeight - weight of the packet with non-priviliged destination port &lt;br /&gt;WeightThreshold - total weight of the latest TCP/UDP packets with different destination ports coming from the same host to be treated as port scan sequence &lt;br /&gt;DelayThreshold - delay for the packets with different destination ports coming from the same host to be treated as possible port scan subsequence &lt;br /&gt;LowPortWeight - weight of the packets with privileged (&lt;=1024) destination port &lt;br /&gt;HighPortWeight - weight of the packet with non-priviliged destination port &lt;br /&gt;&lt;br /&gt;random (integer: 1..99) - matches packets randomly with given propability&lt;br /&gt;&lt;br /&gt;reject-with (icmp-admin-prohibited | icmp-echo-reply | icmp-host-prohibited | icmp-host-unreachable | icmp-net-prohibited | icmp-network-unreachable | icmp-port-unreachable | icmp-protocol-unreachable | tcp-reset | integer) - alters the reply packet of reject action&lt;br /&gt;&lt;br /&gt;routing-mark (name) - matches packets marked by mangle facility with particular routing mark&lt;br /&gt;&lt;br /&gt;src-address (IP address/netmask | IP address-IP address) - specifies the address range an IP packet is originated from. Note that console converts entered address/netmask value to a valid network address, i.e.:1.1.1.1/24 is converted to 1.1.1.0/24 &lt;br /&gt;&lt;br /&gt;src-address-list (name) - matches source address of a packet against user-defined address list&lt;br /&gt;&lt;br /&gt;src-address-type (unicast | local | broadcast | multicast) - matches source address type of the IP packet, one of the:unicast - IP addresses used for one point to another point transmission. There is only one sender and one receiver in this case &lt;br /&gt;local - matches addresses assigned to router's interfaces &lt;br /&gt;broadcast - the IP packet is sent from one point to all other points in the IP subnetwork &lt;br /&gt;multicast - this type of IP addressing is responsible for transmission from one or more points to a set of other points &lt;br /&gt;unicast - IP addresses used for one point to another point transmission. There is only one sender and one receiver in this case &lt;br /&gt;local - matches addresses assigned to router's interfaces &lt;br /&gt;broadcast - the IP packet is sent from one point to all other points in the IP subnetwork &lt;br /&gt;multicast - this type of IP addressing is responsible for transmission from one or more points to a set of other points &lt;br /&gt;&lt;br /&gt;src-mac-address (MAC address) - source MAC address&lt;br /&gt;&lt;br /&gt;src-port (integer: 0..65535-integer: 0..65535{*}) - source port number or range&lt;br /&gt;&lt;br /&gt;tcp-flags (ack | cwr | ece | fin | psh | rst | syn | urg) - tcp flags to matchack - acknowledging data &lt;br /&gt;cwr - congestion window reduced &lt;br /&gt;ece - ECN-echo flag (explicit congestion notification) &lt;br /&gt;fin - close connection &lt;br /&gt;psh - push function &lt;br /&gt;rst - drop connection &lt;br /&gt;syn - new connection &lt;br /&gt;urg - urgent data &lt;br /&gt;ack - acknowledging data &lt;br /&gt;cwr - congestion window reduced &lt;br /&gt;ece - ECN-echo flag (explicit congestion notification) &lt;br /&gt;fin - close connection &lt;br /&gt;psh - push function &lt;br /&gt;rst - drop connection &lt;br /&gt;syn - new connection &lt;br /&gt;urg - urgent data &lt;br /&gt;&lt;br /&gt;tcp-mss (integer: 0..65535) - matches TCP MSS value of an IP packet&lt;br /&gt;&lt;br /&gt;time (time-time,sat | fri | thu | wed | tue | mon | sun{+}) - allows to create filter based on the packets' arrival time and date or, for locally generated packets, departure time and date&lt;br /&gt;&lt;br /&gt;Notes&lt;br /&gt;&lt;br /&gt;Because the NAT rules are applied first, it is important to hold this in mind when setting up firewall rules, since the original packets might be already modified by the NAT&lt;br /&gt;Filter Applications&lt;br /&gt;Protect your RouterOS router&lt;br /&gt;&lt;br /&gt;To protect your router, you should not only change admin's password but also set up packet filtering. All packets with destination to the router are processed against the ip firewall input chain. Note, that the input chain does not affect packets which are being transferred through the router.&lt;br /&gt;/ ip firewall filter &lt;br /&gt;add chain=input connection-state=invalid action=drop \&lt;br /&gt; comment="Drop Invalid connections"  &lt;br /&gt;add chain=input connection-state=established action=accept \&lt;br /&gt; comment="Allow Established connections"  &lt;br /&gt;add chain=input protocol=udp action=accept \&lt;br /&gt; comment="Allow UDP"  &lt;br /&gt;add chain=input protocol=icmp action=accept \&lt;br /&gt; comment="Allow ICMP" &lt;br /&gt;add chain=input src-address=192.168.0.0/24 action=accept \&lt;br /&gt; comment="Allow access to router from known network" &lt;br /&gt;add chain=input action=drop comment="Drop anything else"  &lt;br /&gt;   &lt;br /&gt;Protecting the Customer's Network&lt;br /&gt;&lt;br /&gt;To protect the customer's network, we should check all traffic which goes through router and block unwanted. For icmp, tcp, udp traffic we will create chains, where will be droped all unwanted packets:&lt;br /&gt;/ip firewall filter&lt;br /&gt;add chain=forward protocol=tcp connection-state=invalid \&lt;br /&gt;  action=drop comment="drop invalid connections"  &lt;br /&gt;add chain=forward connection-state=established action=accept \ &lt;br /&gt;  comment="allow already established connections"  &lt;br /&gt;add chain=forward connection-state=related action=accept \&lt;br /&gt;  comment="allow related connections"  &lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;Block IP addreses called "bogons":&lt;br /&gt;add chain=forward src-address=0.0.0.0/8 action=drop  &lt;br /&gt;add chain=forward dst-address=0.0.0.0/8 action=drop  &lt;br /&gt;add chain=forward src-address=127.0.0.0/8 action=drop &lt;br /&gt;add chain=forward dst-address=127.0.0.0/8 action=drop &lt;br /&gt;add chain=forward src-address=224.0.0.0/3 action=drop &lt;br /&gt;add chain=forward dst-address=224.0.0.0/3 action=drop &lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;Make jumps to new chains:&lt;br /&gt;add chain=forward protocol=tcp action=jump jump-target=tcp  &lt;br /&gt;add chain=forward protocol=udp action=jump jump-target=udp  &lt;br /&gt;add chain=forward protocol=icmp action=jump jump-target=icmp &lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;Create tcp chain and deny some tcp ports in it:&lt;br /&gt;add chain=tcp protocol=tcp dst-port=69 action=drop \&lt;br /&gt;  comment="deny TFTP" &lt;br /&gt;add chain=tcp protocol=tcp dst-port=111 action=drop \&lt;br /&gt;  comment="deny RPC portmapper"  &lt;br /&gt;add chain=tcp protocol=tcp dst-port=135 action=drop \&lt;br /&gt;  comment="deny RPC portmapper"  &lt;br /&gt;add chain=tcp protocol=tcp dst-port=137-139 action=drop \&lt;br /&gt;  comment="deny NBT"  &lt;br /&gt;add chain=tcp protocol=tcp dst-port=445 action=drop \&lt;br /&gt;  comment="deny cifs"  &lt;br /&gt;add chain=tcp protocol=tcp dst-port=2049 action=drop comment="deny NFS"  &lt;br /&gt;add chain=tcp protocol=tcp dst-port=12345-12346 action=drop comment="deny NetBus"  &lt;br /&gt;add chain=tcp protocol=tcp dst-port=20034 action=drop comment="deny NetBus"  &lt;br /&gt;add chain=tcp protocol=tcp dst-port=3133 action=drop comment="deny BackOriffice"  &lt;br /&gt;add chain=tcp protocol=tcp dst-port=67-68 action=drop comment="deny DHCP"  &lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;Deny udp ports in udp chain:&lt;br /&gt;add chain=udp protocol=udp dst-port=69 action=drop comment="deny TFTP"  &lt;br /&gt;add chain=udp protocol=udp dst-port=111 action=drop comment="deny PRC portmapper"  &lt;br /&gt;add chain=udp protocol=udp dst-port=135 action=drop comment="deny PRC portmapper"  &lt;br /&gt;add chain=udp protocol=udp dst-port=137-139 action=drop comment="deny NBT"  &lt;br /&gt;add chain=udp protocol=udp dst-port=2049 action=drop comment="deny NFS"  &lt;br /&gt;add chain=udp protocol=udp dst-port=3133 action=drop comment="deny BackOriffice"  &lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;Allow only needed icmp codes in icmp chain:&lt;br /&gt;add chain=icmp protocol=icmp icmp-options=0:0 action=accept \&lt;br /&gt;  comment="drop invalid connections"  &lt;br /&gt;add chain=icmp protocol=icmp icmp-options=3:0 action=accept \&lt;br /&gt;  comment="allow established connections"  &lt;br /&gt;add chain=icmp protocol=icmp icmp-options=3:1 action=accept \&lt;br /&gt;  comment="allow already established connections"  &lt;br /&gt;add chain=icmp protocol=icmp icmp-options=4:0 action=accept \&lt;br /&gt;  comment="allow source quench"  &lt;br /&gt;add chain=icmp protocol=icmp icmp-options=8:0 action=accept \&lt;br /&gt;  comment="allow echo request"  &lt;br /&gt;add chain=icmp protocol=icmp icmp-options=11:0 action=accept \&lt;br /&gt;  comment="allow time exceed"  &lt;br /&gt;add chain=icmp protocol=icmp icmp-options=12:0 action=accept \ &lt;br /&gt;  comment="allow parameter bad"  &lt;br /&gt;add chain=icmp action=drop comment="deny all other types"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-1406710598266241481?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/1406710598266241481/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=1406710598266241481' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1406710598266241481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1406710598266241481'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/filter.html' title='Filter'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-5138508083126005246</id><published>2008-04-08T16:18:00.000+07:00</published><updated>2008-04-08T16:19:20.706+07:00</updated><title type='text'>Address Lists</title><content type='html'>General Information&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;Firewall address lists allow to create a list of IP addresses to be used for packet matching.&lt;br /&gt;Specifications&lt;br /&gt;Packages required: system&lt;br /&gt;License required: Level1&lt;br /&gt;Submenu level: /ip firewall address-list&lt;br /&gt;Standards and Technologies: IP&lt;br /&gt;Hardware usage: Not significant&lt;br /&gt;Address Lists&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;Firewall address lists allow user to create lists of IP addresses grouped together. Firewall filter, mangle and NAT facilities can use address lists to match packets against them.&lt;br /&gt;&lt;br /&gt;The address list records could be updated dynamically via the action=add-src-to-address-list or action=add-dst-to-address-list items found in NAT mangle and filter facilities.&lt;br /&gt;Property Description&lt;br /&gt;address (IP address/netmask | IP address-IP address) - specify the IP address or range to be added to the address list. Note that console converts entered address/netmask value to a valid network address, i.e.:1.1.1.1/24 is converted to 1.1.1.0/24 &lt;br /&gt;&lt;br /&gt;list (name) - specify the name of the address list to add IP address to&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;The following example creates an address list of people thet are connecting to port 23 (telnet) on the router and drops all further traffic from them. Additionaly, the address list will contain one static entry of address=192.0.34.166/32 (www.example.com):&lt;br /&gt;[admin@MikroTik] &gt; /ip firewall address-list add list=drop_traffic address=192.0.34.166/32&lt;br /&gt;[admin@MikroTik] &gt; /ip firewall address-list print&lt;br /&gt;Flags: X - disabled, D - dynamic&lt;br /&gt; #   LIST         ADDRESS&lt;br /&gt; 0   drop_traffic 192.0.34.166&lt;br /&gt;[admin@MikroTik] &gt; /ip firewall mangle add chain=prerouting protocol=tcp dst-port=23 \&lt;br /&gt;\... action=add-src-to-address-list address-list=drop_traffic&lt;br /&gt;[admin@MikroTik] &gt; /ip firewall filter add action=drop chain=input src-address-list=drop_traffic&lt;br /&gt;[admin@MikroTik] &gt; /ip firewall address-list print&lt;br /&gt;Flags: X - disabled, D - dynamic&lt;br /&gt; #   LIST         ADDRESS&lt;br /&gt; 0   drop_traffic 192.0.34.166&lt;br /&gt; 1 D drop_traffic 1.1.1.1&lt;br /&gt; 2 D drop_traffic 10.5.11.8&lt;br /&gt;[admin@MikroTik] &gt;&lt;br /&gt;&lt;br /&gt;As seen in the output of the last print command, two new dynamic entries appeared in the address list. Hosts with these IP addresses tried to initialize a telnet session to the router.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-5138508083126005246?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/5138508083126005246/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=5138508083126005246' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/5138508083126005246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/5138508083126005246'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/address-lists.html' title='Address Lists'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-689892381137437881</id><published>2008-04-08T16:15:00.000+07:00</published><updated>2008-04-08T16:18:01.707+07:00</updated><title type='text'>Mangle</title><content type='html'>General Information&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;The mangle facility allows to mark IP packets with special marks. These marks are used by various other router facilities to identify the packets. Additionaly, the mangle facility is used to modify some fields in the IP header, like TOS (DSCP) and TTL fields.&lt;br /&gt;Specifications&lt;br /&gt;Packages required: system&lt;br /&gt;License required: Level1&lt;br /&gt;Submenu level: /ip firewall mangle&lt;br /&gt;Standards and Technologies: IP&lt;br /&gt;Hardware usage: Increases with count of mangle rules&lt;br /&gt;Mangle&lt;br /&gt;Submenu level: /ip firewall mangle&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;Mangle is a kind of 'marker' that marks packets for future processing with special marks. Many other facilities in RouterOS make use of these marks, e.g. queue trees and NAT. They identify a packet based on its mark and process it accordingly. The mangle marks exist only within the router, they are not transmitted across the network.&lt;br /&gt;Property Description&lt;br /&gt;action (accept | add-dst-to-address-list | add-src-to-address-list | change-dscp | change-mss | change-ttl | jump | log | mark-connection | mark-packet | mark-routing | passthrough | return | set-priority | strip-ipv4-options; default: accept) - action to undertake if the packet matches the ruleaccept - accept the packet. No action, i.e., the packet is passed through and no more rules are applied to it &lt;br /&gt;add-dst-to-address-list - add destination address of an IP packet to the address list specified by address-list parameter &lt;br /&gt;add-src-to-address-list - add source address of an IP packet to the address list specified by address-list parameter &lt;br /&gt;change-dscp - change Differentiated Services Code Point (DSCP) field value specified by the new-dscp parameter &lt;br /&gt;change-mss - change Maximum Segment Size field value of the packet to a value specified by the new-mss parameter &lt;br /&gt;change-ttl - change Time to Live field value of the packet to a value specified by the new-ttl parameter &lt;br /&gt;jump - jump to the chain specified by the value of the jump-target parameter &lt;br /&gt;log - each match with this action will add a message to the system log &lt;br /&gt;mark-connection - place a mark specified by the new-connection-mark parameter on the entire connection that matches the rule &lt;br /&gt;mark-packet - place a mark specified by the new-packet-mark parameter on a packet that matches the rule &lt;br /&gt;mark-routing - place a mark specified by the new-routing-mark parameter on a packet. This kind of marks is used for policy routing purposes only &lt;br /&gt;passthrough - ignore this rule go on to the next one &lt;br /&gt;return - pass control back to the chain from where the jump took place &lt;br /&gt;set-priority - set priority speciefied by the new-priority parameter on the packets sent out through a link that is capable of transporting priority (VLAN or WMM-enabled wireless interface) &lt;br /&gt;strip-ipv4-options - strip IPv4 option fields from the IP packet &lt;br /&gt;accept - accept the packet. No action, i.e., the packet is passed through and no more rules are applied to it &lt;br /&gt;add-dst-to-address-list - add destination address of an IP packet to the address list specified by address-list parameter &lt;br /&gt;add-src-to-address-list - add source address of an IP packet to the address list specified by address-list parameter &lt;br /&gt;change-dscp - change Differentiated Services Code Point (DSCP) field value specified by the new-dscp parameter &lt;br /&gt;change-mss - change Maximum Segment Size field value of the packet to a value specified by the new-mss parameter &lt;br /&gt;change-ttl - change Time to Live field value of the packet to a value specified by the new-ttl parameter &lt;br /&gt;jump - jump to the chain specified by the value of the jump-target parameter &lt;br /&gt;log - each match with this action will add a message to the system log &lt;br /&gt;mark-connection - place a mark specified by the new-connection-mark parameter on the entire connection that matches the rule &lt;br /&gt;mark-packet - place a mark specified by the new-packet-mark parameter on a packet that matches the rule &lt;br /&gt;mark-routing - place a mark specified by the new-routing-mark parameter on a packet. This kind of marks is used for policy routing purposes only &lt;br /&gt;passthrough - ignore this rule go on to the next one &lt;br /&gt;return - pass control back to the chain from where the jump took place &lt;br /&gt;set-priority - set priority speciefied by the new-priority parameter on the packets sent out through a link that is capable of transporting priority (VLAN or WMM-enabled wireless interface) &lt;br /&gt;strip-ipv4-options - strip IPv4 option fields from the IP packet &lt;br /&gt;&lt;br /&gt;address-list (name) - specify the name of the address list to collect IP addresses from rules having action=add-dst-to-address-list or action=add-src-to-address-list actions. These address lists could be later used for packet matching&lt;br /&gt;&lt;br /&gt;address-list-timeout (time; default: 00:00:00) - time interval after which the address will be removed from the address list specified by address-list parameter. Used in conjunction with add-dst-to-address-list or add-src-to-address-list actions00:00:00 - leave the address in the address list forever &lt;br /&gt;00:00:00 - leave the address in the address list forever &lt;br /&gt;&lt;br /&gt;chain (forward | input | output | postrouting | prerouting) - specify the chain to put a particular rule into. As the different traffic is passed through different chains, always be careful in choosing the right chain for a new rule. If the input does not match the name of an already defined chain, a new chain will be created&lt;br /&gt;&lt;br /&gt;comment (text) - free form textual comment for the rule. A comment can be used to refer the particular rule from scripts&lt;br /&gt;&lt;br /&gt;connection-bytes (integer-integer) - match packets only if a given amount of bytes has been transfered through the particular connection0 - means infinity, exempli gratia: connection-bytes=2000000-0 means that the rule matches if more than 2MB has been transfered through the relevant connection &lt;br /&gt;0 - means infinity, exempli gratia: connection-bytes=2000000-0 means that the rule matches if more than 2MB has been transfered through the relevant connection &lt;br /&gt;&lt;br /&gt;connection-limit (integer,netmask) - restrict connection limit per address or address block&lt;br /&gt;&lt;br /&gt;connection-mark (name) - match packets marked via mangle facility with particular connection mark&lt;br /&gt;&lt;br /&gt;connection-state (estabilished | invalid | new | related) - interprets the connection tracking analysis data for a particular packetestabilished - a packet which belongs to an existing connection, exempli gratia a reply packet or a packet which belongs to already replied connection &lt;br /&gt;invalid - a packet which could not be identified for some reason. This includes out of memory condition and ICMP errors which do not correspond to any known connection. It is generally advised to drop these packets &lt;br /&gt;new - a packet which begins a new TCP connection &lt;br /&gt;related - a packet which is related to, but not part of an existing connection, such as ICMP errors or a packet which begins FTP data connection (the later requires enabled FTP connection tracking helper under /ip firewall service-port) &lt;br /&gt;estabilished - a packet which belongs to an existing connection, exempli gratia a reply packet or a packet which belongs to already replied connection &lt;br /&gt;invalid - a packet which could not be identified for some reason. This includes out of memory condition and ICMP errors which do not correspond to any known connection. It is generally advised to drop these packets &lt;br /&gt;new - a packet which begins a new TCP connection &lt;br /&gt;related - a packet which is related to, but not part of an existing connection, such as ICMP errors or a packet which begins FTP data connection (the later requires enabled FTP connection tracking helper under /ip firewall service-port) &lt;br /&gt;&lt;br /&gt;connection-type (ftp | gre | h323 | irc | mms | pptp | quake3 | tftp) - match packets from related connections based on information from their connection tracking helpers. A relevant connection helper must be enabled under /ip firewall service-port &lt;br /&gt;&lt;br /&gt;content (text) - the text packets should contain in order to match the rule&lt;br /&gt;&lt;br /&gt;dscp (integer: 0..63) - DSCP (ex-ToS) IP header field value&lt;br /&gt;&lt;br /&gt;dst-address (IP address/netmask | IP address-IP address) - specify the address range an IP packet is destined to. Note that console converts entered address/netmask value to a valid network address, i.e.:1.1.1.1/24 is converted to 1.1.1.0/24 &lt;br /&gt;&lt;br /&gt;dst-address-list (name) - match destination address of a packet against user-defined address list&lt;br /&gt;&lt;br /&gt;dst-address-type (unicast | local | broadcast | multicast) - match destination address type of the IP packet, one of the:unicast - IP addresses used for one point to another point transmission. There is only one sender and one receiver in this case &lt;br /&gt;local - match addresses assigned to router's interfaces &lt;br /&gt;broadcast - the IP packet is sent from one point to all other points in the IP subnetwork &lt;br /&gt;multicast - this type of IP addressing is responsible for transmission from one or more points to a set of other points &lt;br /&gt;unicast - IP addresses used for one point to another point transmission. There is only one sender and one receiver in this case &lt;br /&gt;local - match addresses assigned to router's interfaces &lt;br /&gt;broadcast - the IP packet is sent from one point to all other points in the IP subnetwork &lt;br /&gt;multicast - this type of IP addressing is responsible for transmission from one or more points to a set of other points &lt;br /&gt;&lt;br /&gt;dst-limit (integer/time{0,1},integer,dst-address | dst-port | src-address{+},time{0,1}) - limit the packet per second (pps) rate on a per destination IP or per destination port base. As opposed to the limit match, every destination IP address / destination port has it's own limit. The options are as follows (in order of appearance):count - maximum average packet rate, measured in packets per second (pps), unless followed by time option &lt;br /&gt;time - specifies the time interval over which the packet rate is measured &lt;br /&gt;burst - number of packets to match in a burst &lt;br /&gt;mode - the classifier(-s) for packet rate limiting &lt;br /&gt;expire - specifies interval after which recorded IP addresses / ports will be deleted &lt;br /&gt;count - maximum average packet rate, measured in packets per second (pps), unless followed by time option &lt;br /&gt;time - specifies the time interval over which the packet rate is measured &lt;br /&gt;burst - number of packets to match in a burst &lt;br /&gt;mode - the classifier(-s) for packet rate limiting &lt;br /&gt;expire - specifies interval after which recorded IP addresses / ports will be deleted &lt;br /&gt;&lt;br /&gt;dst-port (integer: 0..65535-integer: 0..65535{*}) - destination port number or range&lt;br /&gt;&lt;br /&gt;fragment (yes | no) - whether the packet is a fragment of an IP packet. Starting packet (i.e., first fragment) does not count. Note that is the connection tracking is enabled, there will be no fragments as the system automatically assembles every packet&lt;br /&gt;&lt;br /&gt;hotspot (multiple choice: auth | from-client | http | local-dst | to-client) - matches packets received from clients against various HotSpot conditions. All values can be negatedauth - true, if a packet comes from an authenticted HotSpotclient&lt;br /&gt;from-client - true, if a packet comes from any HotSpot client&lt;br /&gt;http - true, if a HotSpot client sends a packet to the address and port previously detected as his proxy server (Universal Proxy technique) or if the destination port is 80 and transparent proxying is enabled for that particular client&lt;br /&gt;local-dst - true, if a packet has local destination IP address&lt;br /&gt;to-client - true, if a packet is sent to a client&lt;br /&gt;auth - true, if a packet comes from an authenticted HotSpotclient&lt;br /&gt;from-client - true, if a packet comes from any HotSpot client&lt;br /&gt;http - true, if a HotSpot client sends a packet to the address and port previously detected as his proxy server (Universal Proxy technique) or if the destination port is 80 and transparent proxying is enabled for that particular client&lt;br /&gt;local-dst - true, if a packet has local destination IP address&lt;br /&gt;to-client - true, if a packet is sent to a client&lt;br /&gt;&lt;br /&gt;icmp-options (integer:integer) - match ICMP Type:Code fields&lt;br /&gt;&lt;br /&gt;in-bridge-port (name) - actual interface the packet has entered the router through (if bridged, this property matches the actual bridge port, while in-interface - the bridge itself)&lt;br /&gt;&lt;br /&gt;in-interface (name) - interface the packet has entered the router through (if the interface is bridged, then the packet will appear to come from the bridge interface itself)&lt;br /&gt;&lt;br /&gt;ingress-priority (integer: 0..63) - INGRESS (received) priority of the packet, if set (0 otherwise). The priority may be derived from either VLAN or WMM priority&lt;br /&gt;&lt;br /&gt;ipv4-options (any | loose-source-routing | no-record-route | no-router-alert | no-source-routing | no-timestamp | none | record-route | router-alert | strict-source-routing | timestamp) - match ipv4 header optionsany - match packet with at least one of the ipv4 options &lt;br /&gt;loose-source-routing - match packets with loose source routing option. This option is used to route the internet datagram based on information supplied by the source &lt;br /&gt;no-record-route - match packets with no record route option. This option is used to route the internet datagram based on information supplied by the source &lt;br /&gt;no-router-alert - match packets with no router alter option &lt;br /&gt;no-source-routing - match packets with no source routing option &lt;br /&gt;no-timestamp - match packets with no timestamp option &lt;br /&gt;record-route - match packets with record route option &lt;br /&gt;router-alert - match packets with router alter option &lt;br /&gt;strict-source-routing - match packets with strict source routing option &lt;br /&gt;timestamp - match packets with timestamp &lt;br /&gt;any - match packet with at least one of the ipv4 options &lt;br /&gt;loose-source-routing - match packets with loose source routing option. This option is used to route the internet datagram based on information supplied by the source &lt;br /&gt;no-record-route - match packets with no record route option. This option is used to route the internet datagram based on information supplied by the source &lt;br /&gt;no-router-alert - match packets with no router alter option &lt;br /&gt;no-source-routing - match packets with no source routing option &lt;br /&gt;no-timestamp - match packets with no timestamp option &lt;br /&gt;record-route - match packets with record route option &lt;br /&gt;router-alert - match packets with router alter option &lt;br /&gt;strict-source-routing - match packets with strict source routing option &lt;br /&gt;timestamp - match packets with timestamp &lt;br /&gt;&lt;br /&gt;jump-target (forward | input | output | postrouting | preroutingname) - name of the target chain to jump to, if the action=jump is used&lt;br /&gt;&lt;br /&gt;layer7-protocol (name) - Layer 7 filter name as set in the /ip firewall layer7-protocol menu. Caution: this matcher needs high computational power&lt;br /&gt;&lt;br /&gt;limit (integer/time{0,1},integer) - restrict packet match rate to a given limit. Usefull to reduce the amount of log messagescount - maximum average packet rate, measured in packets per second (pps), unless followed by time option &lt;br /&gt;time - specify the time interval over which the packet rate is measured &lt;br /&gt;burst - number of packets to match in a burst &lt;br /&gt;count - maximum average packet rate, measured in packets per second (pps), unless followed by time option &lt;br /&gt;time - specify the time interval over which the packet rate is measured &lt;br /&gt;burst - number of packets to match in a burst &lt;br /&gt;&lt;br /&gt;log-prefix (text) - all messages written to logs will contain the prefix specified herein. Used in conjunction with action=log &lt;br /&gt;&lt;br /&gt;new-connection-mark (name) - specify the new value of the connection mark to be used in conjunction with action=mark-connection&lt;br /&gt;&lt;br /&gt;new-dscp (integer: 0..63) - specify the new value of the DSCP field to be used in conjunction with action=change-dscp&lt;br /&gt;&lt;br /&gt;new-mss (integer) - specify MSS value to be used in conjunction with action=change-mss&lt;br /&gt;&lt;br /&gt;new-packet-mark (name) - specify the new value of the packet mark to be used in conjunction with action=mark-packet&lt;br /&gt;&lt;br /&gt;new-priority (integer) - specify the new value of packet priority for the priority-enabled interfaces, used in conjunction with action=set-priorityfrom-dscp - set packet priority form its DSCP field value &lt;br /&gt;from-ingress - set packet priority from the INGRESS priority of the packet (in case packet has been received from an interface that supports priorities - VLAN or WMM-enabled wireless interface; 0 if not set) &lt;br /&gt;from-dscp - set packet priority form its DSCP field value &lt;br /&gt;from-ingress - set packet priority from the INGRESS priority of the packet (in case packet has been received from an interface that supports priorities - VLAN or WMM-enabled wireless interface; 0 if not set) &lt;br /&gt;&lt;br /&gt;new-routing-mark (name) - specify the new value of the routing mark used in conjunction with action=mark-routing&lt;br /&gt;&lt;br /&gt;new-ttl (decrement | increment | set:integer) - specify the new TTL field value used in conjunction with action=change-ttldecrement - the value of the TTL field will be decremented for value &lt;br /&gt;increment - the value of the TTL field will be incremented for value &lt;br /&gt;set: - the value of the TTL field will be set to value &lt;br /&gt;decrement - the value of the TTL field will be decremented for value &lt;br /&gt;increment - the value of the TTL field will be incremented for value &lt;br /&gt;set: - the value of the TTL field will be set to value &lt;br /&gt;&lt;br /&gt;nth (integer,integer: 0..15,integer{0,1}) - match a particular Nth packet received by the rule. One of 16 available counters can be used to count packetsevery - match every every+1th packet. For example, if every=1 then the rule matches every 2nd packet &lt;br /&gt;counter - specifies which counter to use. A counter increments each time the rule containing nth match matches &lt;br /&gt;packet - match on the given packet number. The value by obvious reasons must be between 0 and every. If this option is used for a given counter, then there must be at least every+1 rules with this option, covering all values between 0 and every inclusively. &lt;br /&gt;every - match every every+1th packet. For example, if every=1 then the rule matches every 2nd packet &lt;br /&gt;counter - specifies which counter to use. A counter increments each time the rule containing nth match matches &lt;br /&gt;packet - match on the given packet number. The value by obvious reasons must be between 0 and every. If this option is used for a given counter, then there must be at least every+1 rules with this option, covering all values between 0 and every inclusively. &lt;br /&gt;&lt;br /&gt;out-bridge-port (name) - actual interface the packet is leaving the router through (if bridged, this property matches the actual bridge port, while out-interface - the bridge itself)&lt;br /&gt;&lt;br /&gt;out-interface (name) - interface the packet is leaving the router through (if the interface is bridged, then the packet will appear to leave through the bridge interface itself)&lt;br /&gt;&lt;br /&gt;p2p (all-p2p | bit-torrent | direct-connect | edonkey | fasttrack | gnutella | soulseek | warez | winmx) - match packets belonging to connections of the above P2P protocols&lt;br /&gt;&lt;br /&gt;packet-mark (name) - match the packets marked in mangle with specific packet mark&lt;br /&gt;&lt;br /&gt;packet-size (integer: 0..65535-integer: 0..65535{0,1}) - matches packet of the specified size or size range in bytesmin - specifies lower boundary of the size range or a standalone value &lt;br /&gt;max - specifies upper boundary of the size range &lt;br /&gt;min - specifies lower boundary of the size range or a standalone value &lt;br /&gt;max - specifies upper boundary of the size range &lt;br /&gt;&lt;br /&gt;passthrough (yes | no; default: yes) - whether to let the packet to pass further (like action passthrough) after marking it with a given mark (property only valid if action is mark packet, connection or routing mark)&lt;br /&gt;&lt;br /&gt;port (port{0-16}) - matches if any (source or destination) port matches the specified list of ports or port ranges (note that the protocol must still be selected, just like for the regular src-port and dst-port matchers)&lt;br /&gt;&lt;br /&gt;protocol (ddp | egp | encap | ggp | gre | hmp | icmp | idrp-cmtp | igmp | ipencap | ipip | ipsec-ah | ipsec-esp | iso-tp4 | ospf | pup | rdp | rspf | st | tcp | udp | vmtp | xns-idp | xtp | integer) - matches particular IP protocol specified by protocol name or number. You should specify this setting if you want to specify ports&lt;br /&gt;&lt;br /&gt;psd (integer,time,integer,integer) - attempts to detect TCP and UDP scans. It is advised to assign lower weight to ports with high numbers to reduce the frequency of false positives, such as from passive mode FTP transfersWeightThreshold - total weight of the latest TCP/UDP packets with different destination ports coming from the same host to be treated as port scan sequence &lt;br /&gt;DelayThreshold - delay for the packets with different destination ports coming from the same host to be treated as possible port scan subsequence &lt;br /&gt;LowPortWeight - weight of the packets with privileged (&lt;=1024) destination port &lt;br /&gt;HighPortWeight - weight of the packet with non-priviliged destination port &lt;br /&gt;WeightThreshold - total weight of the latest TCP/UDP packets with different destination ports coming from the same host to be treated as port scan sequence &lt;br /&gt;DelayThreshold - delay for the packets with different destination ports coming from the same host to be treated as possible port scan subsequence &lt;br /&gt;LowPortWeight - weight of the packets with privileged (&lt;=1024) destination port &lt;br /&gt;HighPortWeight - weight of the packet with non-priviliged destination port &lt;br /&gt;&lt;br /&gt;random (integer: 1..99) - matches packets randomly with given propability&lt;br /&gt;&lt;br /&gt;routing-mark (name) - matches packets marked with the specified routing mark&lt;br /&gt;&lt;br /&gt;src-address (IP address/netmask | IP address-IP address) - specifies the address range an IP packet is originated from. Note that console converts entered address/netmask value to a valid network address, i.e.:1.1.1.1/24 is converted to 1.1.1.0/24 &lt;br /&gt;&lt;br /&gt;src-address-list (name) - matches source address of a packet against user-defined address list&lt;br /&gt;&lt;br /&gt;src-address-type (unicast | local | broadcast | multicast) - matches source address type of the IP packet, one of the:unicast - IP addresses used for one point to another point transmission. There is only one sender and one receiver in this case &lt;br /&gt;local - matches addresses assigned to router's interfaces &lt;br /&gt;broadcast - the IP packet is sent from one point to all other points in the IP subnetwork &lt;br /&gt;multicast - this type of IP addressing is responsible for transmission from one or more points to a set of other points &lt;br /&gt;unicast - IP addresses used for one point to another point transmission. There is only one sender and one receiver in this case &lt;br /&gt;local - matches addresses assigned to router's interfaces &lt;br /&gt;broadcast - the IP packet is sent from one point to all other points in the IP subnetwork &lt;br /&gt;multicast - this type of IP addressing is responsible for transmission from one or more points to a set of other points &lt;br /&gt;&lt;br /&gt;src-mac-address (MAC address) - source MAC address&lt;br /&gt;&lt;br /&gt;src-port (integer: 0..65535-integer: 0..65535{*}) - source port number or range&lt;br /&gt;&lt;br /&gt;tcp-flags (multiple choice: ack | cwr | ece | fin | psh | rst | syn | urg) - tcp flags to matchack - acknowledging data &lt;br /&gt;cwr - congestion window reduced &lt;br /&gt;ece - ECN-echo flag (explicit congestion notification) &lt;br /&gt;fin - close connection &lt;br /&gt;psh - push function &lt;br /&gt;rst - drop connection &lt;br /&gt;syn - new connection &lt;br /&gt;urg - urgent data &lt;br /&gt;ack - acknowledging data &lt;br /&gt;cwr - congestion window reduced &lt;br /&gt;ece - ECN-echo flag (explicit congestion notification) &lt;br /&gt;fin - close connection &lt;br /&gt;psh - push function &lt;br /&gt;rst - drop connection &lt;br /&gt;syn - new connection &lt;br /&gt;urg - urgent data &lt;br /&gt;&lt;br /&gt;tcp-mss (integer: 0..65535) - matches TCP MSS value of an IP packet&lt;br /&gt;&lt;br /&gt;time (time-time,sat | fri | thu | wed | tue | mon | sun{+}) - allows to create filter based on the packets' arrival time and date or, for locally generated packets, departure time and date&lt;br /&gt;&lt;br /&gt;Notes&lt;br /&gt;&lt;br /&gt;Instead of making two rules if you want to mark a packet, connection or routing-mark and finish mangle table processing on that event (in other words, mark and simultaneously accept the packet), you may disable the set by default passthrough property of the marking rule.&lt;br /&gt;&lt;br /&gt;Usually routing-mark is not used for P2P, since P2P traffic always is routed over a default getaway.&lt;br /&gt;Application Examples&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;The following section discusses some examples of using the mangle facility.&lt;br /&gt;Peer-to-Peer Traffic Marking&lt;br /&gt;&lt;br /&gt;To ensure the quality of service for network connection, interactive traffic types such as VoIP and HTTP should be prioritized over non-interactive, such as peer-to-peer network traffic. RouterOS QOS implementation uses mangle to mark different types of traffic first, and then place them into queues with different limits.&lt;br /&gt;&lt;br /&gt;The following example enforces the P2P traffic will get no more than 1Mbps of the total link capacity when the link is heavily used by other traffic otherwice expanding to the full link capacity:&lt;br /&gt;[admin@MikroTik] &gt; /ip firewall mangle add chain=forward \&lt;br /&gt;\... p2p=all-p2p action=mark-connection new-connection-mark=p2p_conn&lt;br /&gt;[admin@MikroTik] &gt; /ip firewall mangle add chain=forward \&lt;br /&gt;\... connection-mark=p2p_conn action=mark-packet new-packet-mark=p2p&lt;br /&gt;[admin@MikroTik] &gt; /ip firewall mangle add chain=forward \&lt;br /&gt;\... connection-mark=!p2p_conn action=mark-packet new-packet-mark=other&lt;br /&gt;[admin@MikroTik] &gt; /ip firewall mangle print&lt;br /&gt;Flags: X - disabled, I - invalid, D - dynamic&lt;br /&gt; 0   chain=forward p2p=all-p2p action=mark-connection new-connection-mark=p2p_conn&lt;br /&gt;&lt;br /&gt; 1   chain=forward connection-mark=p2p_conn action=mark-packet new-packet-mark=p2p&lt;br /&gt;&lt;br /&gt; 2   chain=forward packet-mark=!p2p_conn action=mark-packet new-packet-mark=other&lt;br /&gt;[admin@MikroTik] &gt;&lt;br /&gt;[admin@MikroTik] &gt; /queue tree add parent=Public packet-mark=p2p limit-at=1000000 \&lt;br /&gt;\... max-limit=100000000 priority=8&lt;br /&gt;[admin@MikroTik] &gt; /queue tree add parent=Local packet-mark=p2p limit-at=1000000 \&lt;br /&gt;\... max-limit=100000000 priority=8                                     &lt;br /&gt;[admin@MikroTik] &gt; /queue tree add parent=Public packet-mark=other  limit-at=1000000 \&lt;br /&gt;\... max-limit=100000000 priority=1&lt;br /&gt;[admin@MikroTik] &gt; /queue tree add parent=Local packet-mark=other  limit-at=1000000 \&lt;br /&gt;\... max-limit=100000000 priority=1&lt;br /&gt;Mark by MAC address&lt;br /&gt;&lt;br /&gt;To mark traffic from a known MAC address which goes to the router or through it, do the following:&lt;br /&gt;[admin@MikroTik] &gt; / ip firewall mangle add chain=prerouting \&lt;br /&gt;\... src-mac-address=00:01:29:60:36:E7 action=mark-connection new-connection-mark=known_mac_conn&lt;br /&gt;[admin@MikroTik] &gt; / ip firewall mangle add chain=prerouting \&lt;br /&gt;\... connection-mark=known_mac_conn action=mark-packet new-packet-mark=known_mac  &lt;br /&gt;   &lt;br /&gt;Change MSS&lt;br /&gt;&lt;br /&gt;It is a well known fact that VPN links have smaller packet size due to incapsulation overhead. A large packet with MSS that exceeds the MSS of the VPN link should be fragmented prior to sending it via that kind of connection. However, if the packet has DF flag set, it cannot be fragmented and should be discarded. On links that have broken path MTU discovery (PMTUD) it may lead to a number of problems, including problems with FTP and HTTP data transfer and e-mail services.&lt;br /&gt;&lt;br /&gt;In case of link with broken PMTUD, a decrease of the MSS of the packets coming through the VPN link solves the problem. The following example demonstrates how to decrease the MSS value via mangle:&lt;br /&gt;[admin@MikroTik] &gt; /ip firewall mangle add out-interface=pppoe-out \&lt;br /&gt;\... protocol=tcp tcp-flags=syn action=change-mss new-mss=1300 chain=forward&lt;br /&gt;[admin@MikroTik] &gt; /ip firewall mangle print&lt;br /&gt;Flags: X - disabled, I - invalid, D - dynamic&lt;br /&gt; 0   chain=forward out-interface=pppoe-out protocol=tcp tcp-flags=syn&lt;br /&gt;     action=change-mss new-mss=1300&lt;br /&gt;&lt;br /&gt;[admin@MikroTik] &gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-689892381137437881?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/689892381137437881/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=689892381137437881' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/689892381137437881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/689892381137437881'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/mangle.html' title='Mangle'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-91773518340537234</id><published>2008-04-08T16:14:00.000+07:00</published><updated>2008-04-08T16:15:16.900+07:00</updated><title type='text'>NAT</title><content type='html'>General Information&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;Network Address Translation (NAT) is a router facility that replaces source and (or) destination IP addresses of the IP packet as it pass through thhe router. It is most commonly used to enable multiple host on a private network to access the Internet using a single public IP address.&lt;br /&gt;Specifications&lt;br /&gt;Packages required: system&lt;br /&gt;License required: Level1 (number of rules limited to 1) , Level3&lt;br /&gt;Submenu level: /ip firewall nat&lt;br /&gt;Standards and Technologies: IP, RFC1631, RFC2663&lt;br /&gt;Hardware usage: Increases with the count of rules&lt;br /&gt;NAT&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;Network Address Translation is an Internet standard that allows hosts on local area networks to use one set of IP addresses for internal communications and another set of IP addresses for external communications. A LAN that uses NAT is referred as natted network. For NAT to function, there should be a NAT gateway in each natted network. The NAT gateway (NAT router) performs IP address rewriting on the way a packet travel from/to LAN.&lt;br /&gt;&lt;br /&gt;There are two types of NAT:&lt;br /&gt;source NAT or srcnat. This type of NAT is performed on packets that are originated from a natted network. A NAT router replaces the private source address of an IP packet with a new public IP address as it travels through the router. A reverse operation is applied to the reply packets travelling in the other direction. &lt;br /&gt;destination NAT or dstnat. This type of NAT is performed on packets that are destined to the natted network. It is most comonly used to make hosts on a private network to be acceesible from the Internet. A NAT router performing dstnat replaces the destination IP address of an IP packet as it travel through the router towards a private network. &lt;br /&gt;NAT Drawbacks &lt;br /&gt;&lt;br /&gt;Hosts behind a NAT-enabled router do not have true end-to-end connectivity. Therefore some Internet protocols might not work in scenarios with NAT. Services that require the initiation of TCP connection from outside the private network or stateless protocols such as UDP, can be disrupted. Moreover, some protocols are inherently incompatible with NAT, a bold example is AH protocol from the IPsec suite.&lt;br /&gt;&lt;br /&gt;RouterOS includes a number of so-called NAT helpers, that enable NAT traversal for various protocols.&lt;br /&gt;Redirect and Masquerade &lt;br /&gt;&lt;br /&gt;Redirect and masquerade are special forms of destination NAT and source NAT, respectively. Redirect is similar to the regular destination NAT in the same way as masquerade is similar to the source NAT - masquerade is a special form of source NAT without need to specify to-addresses - outgoing interface address is used automatically. The same is for redirect - it is a form of destination NAT where to-addresses is not used - incoming interface address is used instead. Note that to-ports is meaningful for redirect rules - this is the port of the service on the router that will handle these requests (e.g. web proxy).&lt;br /&gt;&lt;br /&gt;When packet is dst-natted (no matter - action=nat or action=redirect), dst address is changed. Information about translation of addresses (including original dst address) is kept in router's internal tables. Transparent web proxy working on router (when web requests get redirected to proxy port on router) can access this information from internal tables and get address of web server from them. If you are dst-natting to some different proxy server, it has no way to find web server's address from IP header (because dst address of IP packet that previously was address of web server has changed to address of proxy server). Starting from HTTP/1.1 there is special header in HTTP request which tells web server address, so proxy server can use it, instead of dst address of IP packet. If there is no such header (older HTTP version on client), proxy server can not determine web server address and therefore can not work.&lt;br /&gt;&lt;br /&gt;It means, that it is impossible to correctly transparently redirect HTTP traffic from router to some other transparent-proxy box. Only correct way is to add transparent proxy on the router itself, and configure it so that your "real" proxy is its parent-proxy. In this situation your "real" proxy does not have to be transparent any more, as proxy on router will be transparent and will forward proxy-style requests (according to standard; these requests include all necessary information about web server) to "real" proxy.&lt;br /&gt;Property Description&lt;br /&gt;action (accept | add-dst-to-address-list | add-src-to-address-list | dst-nat | jump | log | masquerade | netmap | passthrough | redirect | return | same | src-nat; default: accept) - action to undertake if the packet matches the ruleaccept - accepts the packet. No action is taken, i.e. the packet is passed through and no more rules are applied to it &lt;br /&gt;add-dst-to-address-list - adds destination address of an IP packet to the address list specified by address-list parameter &lt;br /&gt;add-src-to-address-list - adds source address of an IP packet to the address list specified by address-list parameter &lt;br /&gt;dst-nat - replaces destination address of an IP packet to values specified by to-addresses and to-ports parameters &lt;br /&gt;jump - jump to the chain specified by the value of the jump-target parameter &lt;br /&gt;log - each match with this action will add a message to the system log &lt;br /&gt;masquerade - replaces source address of an IP packet to an automatically determined by the routing facility IP address &lt;br /&gt;netmap - creates a static 1:1 mapping of one set of IP addresses to another one. Often used to distribute public IP addresses to hosts on private networks &lt;br /&gt;passthrough - ignores this rule goes on to the next one &lt;br /&gt;redirect - replaces destination address of an IP packet to one of the router's local addresses &lt;br /&gt;return - passes control back to the chain from where the jump took place &lt;br /&gt;same - gives a particular client the same source/destination IP address from supplied range for each connection. This is most frequently used for services that expect the same client address for multiple connections from the same client &lt;br /&gt;src-nat - replaces source address of an IP packet to values specified by to-addresses and to-ports parameters &lt;br /&gt;accept - accepts the packet. No action is taken, i.e. the packet is passed through and no more rules are applied to it &lt;br /&gt;add-dst-to-address-list - adds destination address of an IP packet to the address list specified by address-list parameter &lt;br /&gt;add-src-to-address-list - adds source address of an IP packet to the address list specified by address-list parameter &lt;br /&gt;dst-nat - replaces destination address of an IP packet to values specified by to-addresses and to-ports parameters &lt;br /&gt;jump - jump to the chain specified by the value of the jump-target parameter &lt;br /&gt;log - each match with this action will add a message to the system log &lt;br /&gt;masquerade - replaces source address of an IP packet to an automatically determined by the routing facility IP address &lt;br /&gt;netmap - creates a static 1:1 mapping of one set of IP addresses to another one. Often used to distribute public IP addresses to hosts on private networks &lt;br /&gt;passthrough - ignores this rule goes on to the next one &lt;br /&gt;redirect - replaces destination address of an IP packet to one of the router's local addresses &lt;br /&gt;return - passes control back to the chain from where the jump took place &lt;br /&gt;same - gives a particular client the same source/destination IP address from supplied range for each connection. This is most frequently used for services that expect the same client address for multiple connections from the same client &lt;br /&gt;src-nat - replaces source address of an IP packet to values specified by to-addresses and to-ports parameters &lt;br /&gt;&lt;br /&gt;address-list (name) - specifies the name of the address list to collect IP addresses from rules having action=add-dst-to-address-list or action=add-src-to-address-list actions. These address lists could be later used for packet matching&lt;br /&gt;&lt;br /&gt;address-list-timeout (time; default: 00:00:00) - time interval after which the address will be removed from the address list specified by address-list parameter. Used in conjunction with add-dst-to-address-list or add-src-to-address-list actions00:00:00 - leave the address in the address list forever &lt;br /&gt;00:00:00 - leave the address in the address list forever &lt;br /&gt;&lt;br /&gt;chain (dstnat | srcnat | name) - specifies the chain to put a particular rule into. As the different traffic is passed through different chains, always be careful in choosing the right chain for a new rule. If the input does not match the name of an already defined chain, a new chain will be createddstnat - a rule placed in this chain is applied before routing. The rules that replace destination addresses of IP packets should be placed there &lt;br /&gt;srcnat - a rule placed in this chain is applied after routing. The rules that replace the source addresses of IP packets should be placed there &lt;br /&gt;dstnat - a rule placed in this chain is applied before routing. The rules that replace destination addresses of IP packets should be placed there &lt;br /&gt;srcnat - a rule placed in this chain is applied after routing. The rules that replace the source addresses of IP packets should be placed there &lt;br /&gt;&lt;br /&gt;comment (text) - a descriptive comment for the rule. A comment can be used to identify rules form scripts&lt;br /&gt;&lt;br /&gt;connection-bytes (integer-integer) - matches packets only if a given amount of bytes has already been transfered through the particular connection0 - means infinity, exempli gratia: connection-bytes=2000000-0 means that the rule matches if more than 2MB has been transfered through the relevant connection &lt;br /&gt;0 - means infinity, exempli gratia: connection-bytes=2000000-0 means that the rule matches if more than 2MB has been transfered through the relevant connection &lt;br /&gt;&lt;br /&gt;connection-limit (integer,netmask) - restrict connection number per address or address block (matches if the specified number of connection has already been established)&lt;br /&gt;&lt;br /&gt;connection-mark (name) - matches packets marked via mangle facility with particular connection mark&lt;br /&gt;&lt;br /&gt;connection-type (ftp | gre | h323 | irc | mms | pptp | quake3 | tftp) - matches packets from related connections based on information from their connection tracking helpers. A relevant connection helper must be enabled under /ip firewall service-port &lt;br /&gt;&lt;br /&gt;content (text) - the text packets should contain in order to match the rule&lt;br /&gt;&lt;br /&gt;dscp (integer: 0..63) - DSCP (ex-ToS) IP header field value&lt;br /&gt;&lt;br /&gt;dst-address (IP address/netmask | IP address-IP address) - specifies the address range an IP packet is destined to. Note that console converts entered address/netmask value to a valid network address, i.e.:1.1.1.1/24 is converted to 1.1.1.0/24 &lt;br /&gt;&lt;br /&gt;dst-address-list (name) - matches destination address of a packet against user-defined address list&lt;br /&gt;&lt;br /&gt;dst-address-type (unicast | local | broadcast | multicast) - matches destination address type of the IP packet, one of the:unicast - IP addresses used for one point to another point transmission. There is only one sender and one receiver in this case &lt;br /&gt;local - matches addresses assigned to router's interfaces &lt;br /&gt;broadcast - the IP packet is sent from one point to all other points in the IP subnetwork &lt;br /&gt;multicast - this type of IP addressing is responsible for transmission from one or more points to a set of other points &lt;br /&gt;unicast - IP addresses used for one point to another point transmission. There is only one sender and one receiver in this case &lt;br /&gt;local - matches addresses assigned to router's interfaces &lt;br /&gt;broadcast - the IP packet is sent from one point to all other points in the IP subnetwork &lt;br /&gt;multicast - this type of IP addressing is responsible for transmission from one or more points to a set of other points &lt;br /&gt;&lt;br /&gt;dst-limit (integer/time{0,1},integer,dst-address | dst-port | src-address{+},time{0,1}) - limits the packet per second (pps) rate on a per destination IP or per destination port base. As opposed to the limit match, every destination IP address / destination port has it's own limit. The options are as follows (in order of appearance):count - maximum average packet rate, measured in packets per second (pps), unless followed by time option &lt;br /&gt;time - specifies the time interval over which the packet rate is measured &lt;br /&gt;burst - number of packets to match in a burst &lt;br /&gt;mode - the classifier(-s) for packet rate limiting &lt;br /&gt;expire - specifies interval after which recorded IP addresses / ports will be deleted &lt;br /&gt;count - maximum average packet rate, measured in packets per second (pps), unless followed by time option &lt;br /&gt;time - specifies the time interval over which the packet rate is measured &lt;br /&gt;burst - number of packets to match in a burst &lt;br /&gt;mode - the classifier(-s) for packet rate limiting &lt;br /&gt;expire - specifies interval after which recorded IP addresses / ports will be deleted &lt;br /&gt;&lt;br /&gt;dst-port (integer: 0..65535-integer: 0..65535{*}) - destination port number or range&lt;br /&gt;&lt;br /&gt;fragment (yes | no) - whether the packet is a fragment of an IP packet. Starting packet (i.e., first fragment) does not count. Note that is the connection tracking is enabled, there will be no fragments as the system automatically assembles every packet&lt;br /&gt;&lt;br /&gt;hotspot (multiple choice: auth | from-client | http | local-dst | to-client) - matches packets received from clients against various HotSpot conditions. All values can be negatedauth - true, if a packet comes from an authenticted HotSpotclient&lt;br /&gt;from-client - true, if a packet comes from any HotSpot client&lt;br /&gt;http - true, if a HotSpot client sends a packet to the address and port previously detected as his proxy server (Universal Proxy technique) or if the destination port is 80 and transparent proxying is enabled for that particular client&lt;br /&gt;local-dst - true, if a packet has local destination IP address&lt;br /&gt;to-client - true, if a packet is sent to a client&lt;br /&gt;auth - true, if a packet comes from an authenticted HotSpotclient&lt;br /&gt;from-client - true, if a packet comes from any HotSpot client&lt;br /&gt;http - true, if a HotSpot client sends a packet to the address and port previously detected as his proxy server (Universal Proxy technique) or if the destination port is 80 and transparent proxying is enabled for that particular client&lt;br /&gt;local-dst - true, if a packet has local destination IP address&lt;br /&gt;to-client - true, if a packet is sent to a client&lt;br /&gt;&lt;br /&gt;icmp-options (integer:integer) - matches ICMP Type:Code fields&lt;br /&gt;&lt;br /&gt;in-bridge-port (name) - actual interface the packet has entered the router through (if bridged, this property matches the actual bridge port, while in-interface - the bridge itself)&lt;br /&gt;&lt;br /&gt;in-interface (name) - interface the packet has entered the router through (if the interface is bridged, then the packet will appear to come from the bridge interface itself)&lt;br /&gt;&lt;br /&gt;ingress-priority (integer: 0..63) - INGRESS (received) priority of the packet, if set (0 otherwise). The priority may be derived from either VLAN or WMM priority&lt;br /&gt;&lt;br /&gt;ipv4-options (any | loose-source-routing | no-record-route | no-router-alert | no-source-routing | no-timestamp | none | record-route | router-alert | strict-source-routing | timestamp) - match ipv4 header optionsany - match packet with at least one of the ipv4 options &lt;br /&gt;loose-source-routing - match packets with loose source routing option. This option is used to route the internet datagram based on information supplied by the source &lt;br /&gt;no-record-route - match packets with no record route option. This option is used to route the internet datagram based on information supplied by the source &lt;br /&gt;no-router-alert - match packets with no router alter option &lt;br /&gt;no-source-routing - match packets with no source routing option &lt;br /&gt;no-timestamp - match packets with no timestamp option &lt;br /&gt;record-route - match packets with record route option &lt;br /&gt;router-alert - match packets with router alter option &lt;br /&gt;strict-source-routing - match packets with strict source routing option &lt;br /&gt;timestamp - match packets with timestamp &lt;br /&gt;any - match packet with at least one of the ipv4 options &lt;br /&gt;loose-source-routing - match packets with loose source routing option. This option is used to route the internet datagram based on information supplied by the source &lt;br /&gt;no-record-route - match packets with no record route option. This option is used to route the internet datagram based on information supplied by the source &lt;br /&gt;no-router-alert - match packets with no router alter option &lt;br /&gt;no-source-routing - match packets with no source routing option &lt;br /&gt;no-timestamp - match packets with no timestamp option &lt;br /&gt;record-route - match packets with record route option &lt;br /&gt;router-alert - match packets with router alter option &lt;br /&gt;strict-source-routing - match packets with strict source routing option &lt;br /&gt;timestamp - match packets with timestamp &lt;br /&gt;&lt;br /&gt;jump-target (dstnat | srcnatname) - name of the target chain to jump to, if the action=jump is used&lt;br /&gt;&lt;br /&gt;layer7-protocol (name) - Layer 7 filter name as set in the /ip firewall layer7-protocol menu. Caution: this matcher needs high computational power&lt;br /&gt;&lt;br /&gt;limit (integer/time{0,1},integer) - restricts packet match rate to a given limit. Usefull to reduce the amount of log messagescount - maximum average packet rate, measured in packets per second (pps), unless followed by time option &lt;br /&gt;time - specifies the time interval over which the packet rate is measured &lt;br /&gt;burst - number of packets to match in a burst &lt;br /&gt;count - maximum average packet rate, measured in packets per second (pps), unless followed by time option &lt;br /&gt;time - specifies the time interval over which the packet rate is measured &lt;br /&gt;burst - number of packets to match in a burst &lt;br /&gt;&lt;br /&gt;log-prefix (text) - all messages written to logs will contain the prefix specified herein. Used in conjunction with action=log &lt;br /&gt;&lt;br /&gt;nth (integer,integer: 0..15,integer{0,1}) - match a particular Nth packet received by the rule. One of 16 available counters can be used to count packetsevery - match every every+1th packet. For example, if every=1 then the rule matches every 2nd packet &lt;br /&gt;counter - specifies which counter to use. A counter increments each time the rule containing nth match matches &lt;br /&gt;packet - match on the given packet number. The value by obvious reasons must be between 0 and every. If this option is used for a given counter, then there must be at least every+1 rules with this option, covering all values between 0 and every inclusively. &lt;br /&gt;every - match every every+1th packet. For example, if every=1 then the rule matches every 2nd packet &lt;br /&gt;counter - specifies which counter to use. A counter increments each time the rule containing nth match matches &lt;br /&gt;packet - match on the given packet number. The value by obvious reasons must be between 0 and every. If this option is used for a given counter, then there must be at least every+1 rules with this option, covering all values between 0 and every inclusively. &lt;br /&gt;&lt;br /&gt;out-bridge-port (name) - actual interface the packet is leaving the router through (if bridged, this property matches the actual bridge port, while out-interface - the bridge itself)&lt;br /&gt;&lt;br /&gt;out-interface (name) - interface the packet is leaving the router through (if the interface is bridged, then the packet will appear to leave through the bridge interface itself)&lt;br /&gt;&lt;br /&gt;packet-mark (text) - matches packets marked via mangle facility with particular packet mark&lt;br /&gt;&lt;br /&gt;packet-size (integer: 0..65535-integer: 0..65535{0,1}) - matches packet of the specified size or size range in bytesmin - specifies lower boundary of the size range or a standalone value &lt;br /&gt;max - specifies upper boundary of the size range &lt;br /&gt;min - specifies lower boundary of the size range or a standalone value &lt;br /&gt;max - specifies upper boundary of the size range &lt;br /&gt;&lt;br /&gt;port (port{0-16}) - matches if any (source or destination) port matches the specified list of ports or port ranges (note that the protocol must still be selected, just like for the regular src-port and dst-port matchers)&lt;br /&gt;&lt;br /&gt;protocol (ddp | egp | encap | ggp | gre | hmp | icmp | idrp-cmtp | igmp | ipencap | ipip | ipsec-ah | ipsec-esp | iso-tp4 | ospf | pup | rdp | rspf | st | tcp | udp | vmtp | xns-idp | xtp | integer) - matches particular IP protocol specified by protocol name or number. You should specify this setting if you want to specify ports&lt;br /&gt;&lt;br /&gt;psd (integer,time,integer,integer) - attempts to detect TCP and UDP scans. It is advised to assign lower weight to ports with high numbers to reduce the frequency of false positives, such as from passive mode FTP transfersWeightThreshold - total weight of the latest TCP/UDP packets with different destination ports coming from the same host to be treated as port scan sequence &lt;br /&gt;DelayThreshold - delay for the packets with different destination ports coming from the same host to be treated as possible port scan subsequence &lt;br /&gt;LowPortWeight - weight of the packets with privileged (&lt;=1024) destination port &lt;br /&gt;HighPortWeight - weight of the packet with non-priviliged destination port &lt;br /&gt;WeightThreshold - total weight of the latest TCP/UDP packets with different destination ports coming from the same host to be treated as port scan sequence &lt;br /&gt;DelayThreshold - delay for the packets with different destination ports coming from the same host to be treated as possible port scan subsequence &lt;br /&gt;LowPortWeight - weight of the packets with privileged (&lt;=1024) destination port &lt;br /&gt;HighPortWeight - weight of the packet with non-priviliged destination port &lt;br /&gt;&lt;br /&gt;random (integer) - match packets randomly with given propability&lt;br /&gt;&lt;br /&gt;routing-mark (name) - matches packets marked by mangle facility with particular routing mark&lt;br /&gt;&lt;br /&gt;same-not-by-dst (yes | no) - specifies whether to account or not to account for destination IP address when selecting a new source IP address for packets matched by rules with action=same&lt;br /&gt;&lt;br /&gt;src-address (IP address/netmask | IP address-IP address) - specifies the address range an IP packet is originated from. Note that console converts entered address/netmask value to a valid network address, i.e.:1.1.1.1/24 is converted to 1.1.1.0/24 &lt;br /&gt;&lt;br /&gt;src-address-list (name) - matches source address of a packet against user-defined address list&lt;br /&gt;&lt;br /&gt;src-address-type (unicast | local | broadcast | multicast) - matches source address type of the IP packet, one of the:unicast - IP addresses used for one point to another point transmission. There is only one sender and one receiver in this case &lt;br /&gt;local - matches addresses assigned to router's interfaces &lt;br /&gt;broadcast - the IP packet is sent from one point to all other points in the IP subnetwork &lt;br /&gt;multicast - this type of IP addressing is responsible for transmission from one or more points to a set of other points &lt;br /&gt;unicast - IP addresses used for one point to another point transmission. There is only one sender and one receiver in this case &lt;br /&gt;local - matches addresses assigned to router's interfaces &lt;br /&gt;broadcast - the IP packet is sent from one point to all other points in the IP subnetwork &lt;br /&gt;multicast - this type of IP addressing is responsible for transmission from one or more points to a set of other points &lt;br /&gt;&lt;br /&gt;src-mac-address (MAC address) - source MAC address&lt;br /&gt;&lt;br /&gt;src-port (integer: 0..65535-integer: 0..65535{*}) - source port number or range&lt;br /&gt;&lt;br /&gt;tcp-mss (integer: 0..65535) - matches TCP MSS value of an IP packet&lt;br /&gt;&lt;br /&gt;time (time-time,sat | fri | thu | wed | tue | mon | sun{+}) - allows to create filter based on the packets' arrival time and date or, for locally generated packets, departure time and date&lt;br /&gt;&lt;br /&gt;to-addresses (IP address-IP address{0,1}; default: 0.0.0.0) - address or address range to replace original address of an IP packet with&lt;br /&gt;&lt;br /&gt;to-ports (integer: 0..65535-integer: 0..65535{0,1}) - port or port range to replace original port of an IP packet with&lt;br /&gt;&lt;br /&gt;NAT Applications&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;In this section some NAT applications and examples of them are discussed.&lt;br /&gt;Basic NAT configuration &lt;br /&gt;&lt;br /&gt;Assume we want to create router that:&lt;br /&gt;"hides" the private LAN "behind" one address &lt;br /&gt;provides Public IP to the Local server &lt;br /&gt;creates 1:1 mapping of network addresses &lt;br /&gt;Example of Source NAT (Masquerading)&lt;br /&gt;&lt;br /&gt;If you want to "hide" the private LAN 192.168.0.0/24 "behind" one address 10.5.8.109 given to you by the ISP, you should use the source network address translation (masquerading) feature of the MikroTik router. The masquerading will change the source IP address and port of the packets originated from the network 192.168.0.0/24 to the address 10.5.8.109 of the router when the packet is routed through it.&lt;br /&gt;&lt;br /&gt;To use masquerading, a source NAT rule with action 'masquerade' should be added to the firewall configuration:&lt;br /&gt;/ip firewall nat add chain=srcnat action=masquerade out-interface=Public&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;All outgoing connections from the network 192.168.0.0/24 will have source address 10.5.8.109 of the router and source port above 1024. No access from the Internet will be possible to the Local addresses. If you want to allow connections to the server on the local network, you should use destination Network Address Translation (NAT).&lt;br /&gt;Example of Destination NAT&lt;br /&gt;&lt;br /&gt;If you want to link Public IP 10.5.8.200 address to Local one 192.168.0.109, you should use destination address translation feature of the MikroTik router. Also if you want allow Local server to talk with outside with given Public IP you should use source address translation, too&lt;br /&gt;&lt;br /&gt;Add Public IP to Public interface:&lt;br /&gt;/ip address add address=10.5.8.200/32 interface=Public   &lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;Add rule allowing access to the internal server from external networks:&lt;br /&gt;/ip firewall nat add chain=dstnat dst-address=10.5.8.200 action=dst-nat \&lt;br /&gt; to-addresses=192.168.0.109 &lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;Add rule allowing the internal server to talk to the outer networks having its source address translated to 10.5.8.200:&lt;br /&gt;/ip firewall nat add chain=srcnat src-address=192.168.0.109 action=src-nat \&lt;br /&gt; to-addresses=10.5.8.200&lt;br /&gt;   &lt;br /&gt;Example of 1:1 mapping&lt;br /&gt;&lt;br /&gt;If you want to link Public IP subnet 11.11.11.0/24 to local one 2.2.2.0/24, you should use destination address translation and source address translation features with action=netmap.&lt;br /&gt;/ip firewall nat add chain=dstnat dst-address=11.11.11.1-11.11.11.254 \&lt;br /&gt; action=netmap to-addresses=2.2.2.1-2.2.2.254&lt;br /&gt;&lt;br /&gt;/ip firewall nat add chain=srcnat src-address=2.2.2.1-2.2.2.254 \&lt;br /&gt; action=netmap to-addresses=11.11.11.1-11.11.11.254&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-91773518340537234?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/91773518340537234/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=91773518340537234' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/91773518340537234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/91773518340537234'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/nat.html' title='NAT'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-6426813355306169402</id><published>2008-04-08T16:08:00.000+07:00</published><updated>2008-04-08T16:12:23.700+07:00</updated><title type='text'>SOCKS Proxy Server</title><content type='html'>General Information&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;This manual discusses the SOCKS proxy server which is implemented in RouterOS. MikroTik RouterOS supports SOCKS version 4.&lt;br /&gt;Specifications&lt;br /&gt;Packages required: system&lt;br /&gt;License required: Level1&lt;br /&gt;Submenu level: /ip socks&lt;br /&gt;Standards and Technologies: SOCKS version 4&lt;br /&gt;Hardware usage: Not significant&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;SOCKS is a proxy server that allows TCP based application data to relay across the firewall, even if the firewall would block the packets. The SOCKS protocol is independent from application protocols, so it can be used for many services, e.g, WWW, FTP, TELNET, and others.&lt;br /&gt;&lt;br /&gt;At first, an application client connects to the SOCKS proxy server, then the proxy server looks in its access list to see whether the client is permited to access the remote application resource or not, if it is permitted, the proxy server relies the packet to the application server and creates a connection between the application server and client.&lt;br /&gt;Notes&lt;br /&gt;&lt;br /&gt;Remember to configure your application client to use SOCKS version 4.&lt;br /&gt;&lt;br /&gt;You should secure the SOCKS proxy using its access list and/or firewall to disallow access from outisde. Failing to secure the proxy server may introduce security issues to your network, and may provide a way for spammers to send junk mail through the router.&lt;br /&gt;Additional Resources&lt;br /&gt;Information about SOCKS &lt;br /&gt;SOCKS Configuration&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;In this section you will learn how to enable the SOCKS proxy server and do its configuration.&lt;br /&gt;Property Description&lt;br /&gt;connection-idle-timeout (time; default: 2m) - time after which idle connections are terminated&lt;br /&gt;&lt;br /&gt;enabled (yes | no; default: no) - whether to enable or no the SOCKS proxy&lt;br /&gt;&lt;br /&gt;max-connections (integer: 1..500; default: 200) - maxumum number of simultaneous connections&lt;br /&gt;&lt;br /&gt;port (integer: 1..65535; default: 1080) - TCP port on which the SOCKS server listens for connections&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;To enable SOCKS:&lt;br /&gt;[admin@MikroTik] ip socks&gt; set enabled=yes&lt;br /&gt;[admin@MikroTik] ip socks&gt; print&lt;br /&gt;                    enabled: yes&lt;br /&gt;                       port: 1080&lt;br /&gt;    connection-idle-timeout: 2m&lt;br /&gt;            max-connections: 200&lt;br /&gt;[admin@MikroTik] ip socks&gt;&lt;br /&gt;Access List&lt;br /&gt;Submenu level: /ip socks access&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;In the SOCKS access list you can add rules which will control access to SOCKS server. This list is similar to firewall lists.&lt;br /&gt;Property Description&lt;br /&gt;action (allow | deny; default: allow) - action to be performed for this ruleallow - allow packets, matching this rule, to be forwarded for further processing &lt;br /&gt;deny - deny access for packets, matching this rule &lt;br /&gt;allow - allow packets, matching this rule, to be forwarded for further processing &lt;br /&gt;deny - deny access for packets, matching this rule &lt;br /&gt;&lt;br /&gt;dst-address (IP address/netmask) - destination (server's) address&lt;br /&gt;&lt;br /&gt;dst-port (port) - destination TCP port&lt;br /&gt;&lt;br /&gt;src-address (IP address/netmask) - source (client's) address for a packet&lt;br /&gt;&lt;br /&gt;src-port (port) - source TCP port&lt;br /&gt;&lt;br /&gt;Active Connections&lt;br /&gt;Submenu level: /ip socks connections&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;The Active Connection list shows all established TCP connections, which are maintained through the SOCKS proxy server.&lt;br /&gt;Property Description&lt;br /&gt;dst-address (read-only: IP address) - destination (application server) IP address&lt;br /&gt;&lt;br /&gt;rx (read-only: integer) - bytes received&lt;br /&gt;&lt;br /&gt;src-address (read-only: IP address) - source (application client) IP address&lt;br /&gt;&lt;br /&gt;tx (read-only: integer) - bytes sent&lt;br /&gt;&lt;br /&gt;type (read-only: in | out | unknown) - connection typein - incoming connection &lt;br /&gt;out - outgoing connection &lt;br /&gt;unknown - connection has just been initiated &lt;br /&gt;in - incoming connection &lt;br /&gt;out - outgoing connection &lt;br /&gt;unknown - connection has just been initiated &lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;To see current TCP connections:&lt;br /&gt;[admin@MikroTik] ip socks connections&gt; print&lt;br /&gt; # SRC-ADDRESS                DST-ADDRESS                TX         RX&lt;br /&gt; 0 192.168.0.2:3242           159.148.147.196:80         4847       2880&lt;br /&gt; 1 192.168.0.2:3243           159.148.147.196:80         3408       2127&lt;br /&gt; 2 192.168.0.2:3246           159.148.95.16:80           10172      25207&lt;br /&gt; 3 192.168.0.2:3248           194.8.18.26:80             474        1629&lt;br /&gt; 4 192.168.0.2:3249           159.148.95.16:80           6477       18695&lt;br /&gt; 5 192.168.0.2:3250           159.148.95.16:80           4137       27568&lt;br /&gt; 6 192.168.0.2:3251           159.148.95.16:80           1712       14296&lt;br /&gt; 7 192.168.0.2:3258           80.91.34.241:80            314        208&lt;br /&gt; 8 192.168.0.2:3259           80.91.34.241:80            934        524&lt;br /&gt; 9 192.168.0.2:3260           80.91.34.241:80            930        524&lt;br /&gt;10 192.168.0.2:3261           80.91.34.241:80            312        158&lt;br /&gt;11 192.168.0.2:3262           80.91.34.241:80            312        158&lt;br /&gt;[admin@MikroTik] ip socks connections&gt;&lt;br /&gt;Application Examples&lt;br /&gt;FTP service through SOCKS server&lt;br /&gt;&lt;br /&gt;Let us consider that we have a network 192.168.0.0/24 which is masqueraded, using a router with a public IP 10.1.0.104/24 and a private IP 192.168.0.1/24. Somewhere in the network is an FTP server with IP address 10.5.8.8. We want to allow access to this FTP server for a client in our local network with IP address 192.168.0.2/24.&lt;br /&gt;&lt;br /&gt;We have already masqueraded our local network:&lt;br /&gt;[admin@MikroTik] ip firewall nat&gt; print&lt;br /&gt;Flags: X - disabled, I - invalid, D - dynamic&lt;br /&gt; 0   chain=srcnat action=masquerade src-address=192.168.0.0/24&lt;br /&gt;[admin@MikroTik] ip firewall nat&gt;&lt;br /&gt;&lt;br /&gt;And the access to public FTP servers is denied in firewall:&lt;br /&gt;[admin@MikroTik] ip firewall filter&gt; print&lt;br /&gt;Flags: X - disabled, I - invalid, D - dynamic&lt;br /&gt; 0   chain=forward action=drop src-address=192.168.0.0/24 dst-port=21 protocol=tcp&lt;br /&gt;[admin@MikroTik] ip firewall filter&gt;&lt;br /&gt;&lt;br /&gt;We need to enable the SOCKS server:&lt;br /&gt;[admin@MikroTik] ip socks&gt; set enabled=yes&lt;br /&gt;[admin@MikroTik] ip socks&gt; print&lt;br /&gt;                    enabled: yes&lt;br /&gt;                       port: 1080&lt;br /&gt;    connection-idle-timeout: 2m&lt;br /&gt;            max-connections: 200&lt;br /&gt;[admin@MikroTik] ip socks&gt;&lt;br /&gt;&lt;br /&gt;Add access to a client with an IP address 192.168.0.2/32 to SOCKS access list, allow data transfer from FTP server to client (allow destionation ports from 1024 to 65535 for any IP address), and drop everything else:&lt;br /&gt;[admin@MikroTik] ip socks access&gt; add src-address=192.168.0.2 dst-port=21 \&lt;br /&gt;\... action=allow&lt;br /&gt;[admin@MikroTik] ip socks access&gt; add dst-port=1024-65535 action=allow&lt;br /&gt;[admin@MikroTik] ip socks access&gt; add action=deny&lt;br /&gt;[admin@MikroTik] ip socks access&gt; print&lt;br /&gt;Flags: X - disabled&lt;br /&gt; 0   src-address=192.168.0.2 dst-port=21 action=allow&lt;br /&gt; 1   dst-port=1024-65535 action=allow&lt;br /&gt; 2   action=deny&lt;br /&gt;[admin@MikroTik] ip socks access&gt;&lt;br /&gt;&lt;br /&gt;That's all - the SOCKS server is configured. To see active connections and data transmitted and received:&lt;br /&gt;[admin@MikroTik] ip socks connections&gt; print&lt;br /&gt; # SRC-ADDRESS                DST-ADDRESS                TX         RX&lt;br /&gt; 0 192.168.0.2:1238           10.5.8.8:21                1163       4625&lt;br /&gt; 1 192.168.0.2:1258           10.5.8.8:3423              0          3231744&lt;br /&gt;[admin@MikroTik] ip socks connections&gt;&lt;br /&gt;&lt;br /&gt;Note! In order to use SOCKS proxy server, you have to specify its IP address and port in your FTP client. In this case IP address would be 192.168.0.1 (local IP address of the router/SOCKS server) and TCP port 1080.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-6426813355306169402?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/6426813355306169402/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=6426813355306169402' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/6426813355306169402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/6426813355306169402'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/socks-proxy-server.html' title='SOCKS Proxy Server'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-744787733332773483</id><published>2008-04-08T16:06:00.000+07:00</published><updated>2008-04-08T16:08:16.543+07:00</updated><title type='text'>Packet Sniffer</title><content type='html'>General Information&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;Packet sniffer is a feature that catches all the data travelling over the network, that it is able to get (when using switched network, a computer may catch only the data addressed to it or is forwarded through it).&lt;br /&gt;Specifications&lt;br /&gt;Packages required: system&lt;br /&gt;License required: Level1&lt;br /&gt;Submenu level: /tool sniffer&lt;br /&gt;Standards and Technologies: none&lt;br /&gt;Hardware usage: Not significant&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;It allows you to "sniff" (listen and record) packets going through the router (and any other traffic that gets to the router, when there is no switching in the network) and view them using specific software.&lt;br /&gt;Packet Sniffer Configuration&lt;br /&gt;Submenu level: /tool sniffer&lt;br /&gt;Property Description&lt;br /&gt;file-limit (integer; default: 10) - the limit of the file in KB. Sniffer will stop after this limit is reached&lt;br /&gt;&lt;br /&gt;file-name (text; default: "") - the name of the file where the sniffed packets will be saved to&lt;br /&gt;&lt;br /&gt;filter-address1 (IP address/netmask:port; default: 0.0.0.0/0:0-65535) - criterion of choosing the packets to process&lt;br /&gt;&lt;br /&gt;filter-address2 (IP address/netmask:port; default: 0.0.0.0/0:0-65535) - criterion of choosing the packets to process&lt;br /&gt;&lt;br /&gt;filter-protocol (all-frames | ip-only | mac-only-no-ip; default: ip-only) - specific protocol group to filterall-frames - sniff all packets &lt;br /&gt;ip-only - sniff IP packets only &lt;br /&gt;mac-only-no-ip - sniff non-IP packets only &lt;br /&gt;all-frames - sniff all packets &lt;br /&gt;ip-only - sniff IP packets only &lt;br /&gt;mac-only-no-ip - sniff non-IP packets only &lt;br /&gt;&lt;br /&gt;filter-stream (yes | no; default: yes) - whether to ignore sniffed packets that are destined to the stream server&lt;br /&gt;&lt;br /&gt;interface (name | all; default: all) - the name of the interface that receives the packets&lt;br /&gt;&lt;br /&gt;memory-limit (integer; default: 10) - maximum amount of memory to use. Sniffer will stop after this limit is reached&lt;br /&gt;&lt;br /&gt;only-headers (yes | no; default: no) - whether to save in the memory packets' headers only (not the whole packet)&lt;br /&gt;&lt;br /&gt;running (read-only: yes | no; default: no) - if the sniffer is started then the value is yes otherwise no &lt;br /&gt;&lt;br /&gt;streaming-enabled (yes | no; default: no) - whether to send sniffed packets to a remote server&lt;br /&gt;&lt;br /&gt;streaming-server (IP address; default: 0.0.0.0) - Tazmen Sniffer Protocol (TZSP) stream receiver&lt;br /&gt;&lt;br /&gt;Notes&lt;br /&gt;&lt;br /&gt;filter-address1 and filter-address2 are used to specify the two participients in communication (i.e. they will match only in the case if one of them matches the source address and the other one matches the destination address of a packet). These properties are taken in account only if filter-protocol is ip-only.&lt;br /&gt;&lt;br /&gt;Not only Wireshark (ex-Ethereal, http://www.wireshark.org) and Packetyzer (http://www.packetyzer.com) can receive the sniffer's stream but also MikroTik's program trafr (http://www.mikrotik.com/download.html) that runs on any IA32 Linux computer and saves received packets libpcap file format.&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;In the following example streaming-server will be added, streaming will be enabled, file-name will be set to test and packet sniffer will be started and stopped after some time:&lt;br /&gt;[admin@MikroTik] tool sniffer&gt;set streaming-server=10.0.0.241 \&lt;br /&gt;\... streaming-enabled=yes file-name=test&lt;br /&gt;[admin@MikroTik] tool sniffer&gt; prin&lt;br /&gt;            interface: all&lt;br /&gt;         only-headers: no&lt;br /&gt;         memory-limit: 10&lt;br /&gt;            file-name: "test"&lt;br /&gt;           file-limit: 10&lt;br /&gt;    streaming-enabled: yes&lt;br /&gt;     streaming-server: 10.0.0.241&lt;br /&gt;        filter-stream: yes&lt;br /&gt;      filter-protocol: ip-only&lt;br /&gt;      filter-address1: 0.0.0.0/0:0-65535&lt;br /&gt;      filter-address2: 0.0.0.0/0:0-65535&lt;br /&gt;              running: no&lt;br /&gt;[admin@MikroTik] tool sniffer&gt;start&lt;br /&gt;[admin@MikroTik] tool sniffer&gt;stop&lt;br /&gt;Running Packet Sniffer&lt;br /&gt;Specifications&lt;br /&gt;Command name: /tool sniffer start, /tool sniffer stop, /tool sniffer save&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;The commands are used to control runtime operation of the packet sniffer. The start command is used to start/reset sniffering, stop - stops sniffering. To save currently sniffed packets in a specific file save command is used.&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;In the following example the packet sniffer will be started and after some time - stopped:&lt;br /&gt;[admin@MikroTik] tool sniffer&gt; start&lt;br /&gt;[admin@MikroTik] tool sniffer&gt; stop&lt;br /&gt;&lt;br /&gt;Below the sniffed packets will be saved in the file named test:&lt;br /&gt;[admin@MikroTik] tool sniffer&gt; save file-name=test&lt;br /&gt;[admin@MikroTik] tool sniffer&gt; /file print&lt;br /&gt;  # NAME                           TYPE         SIZE       CREATION-TIME&lt;br /&gt;  0 test                           unknown      1350       apr/07/2003 16:01:52&lt;br /&gt;&lt;br /&gt;[admin@MikroTik] tool sniffer&gt;&lt;br /&gt;Sniffed Packets&lt;br /&gt;Submenu level: /tool sniffer packet&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;The submenu allows to see the list of sniffed packets.&lt;br /&gt;Property Description&lt;br /&gt;data (read-only: text) - specified data inclusion in packets&lt;br /&gt;&lt;br /&gt;dst-address (read-only: IP address) - destination IP address&lt;br /&gt;&lt;br /&gt;dst-mac-address (MAC address) - destination MAC address&lt;br /&gt;&lt;br /&gt;fragment-offset (read-only: integer) - IP fragment offset&lt;br /&gt;&lt;br /&gt;identification (read-only: integer) - IP identification&lt;br /&gt;&lt;br /&gt;interface (read-only: name) - name of the interface the packet has been captured on&lt;br /&gt;&lt;br /&gt;ip-header-size (read-only: integer) - the size of IP header&lt;br /&gt;&lt;br /&gt;ip-packet-size (read-only: integer) - the size of IP packet&lt;br /&gt;&lt;br /&gt;ip-protocol (ip | icmp | igmp | ggp | ipencap | st | tcp | egp | pup | udp | hmp | xns-idp | rdp | iso-tp4 | xtp | ddp | idrp-cmtp | gre | esp | ah | rspf | vmtp | ospf | ipip | encap) - the name/number of IP protocolip - Internet Protocol &lt;br /&gt;icmp - Internet Control Message Protocol &lt;br /&gt;igmp - Internet Group Management Protocol &lt;br /&gt;ggp - Gateway-Gateway Protocol &lt;br /&gt;ipencap - IP Encapsulated in IP &lt;br /&gt;st - st datagram mode &lt;br /&gt;tcp - Transmission Control Protocol &lt;br /&gt;egp - Exterior Gateway Protocol &lt;br /&gt;pup - Parc Universal packet Protocol &lt;br /&gt;udp - User Datagram Protocol &lt;br /&gt;hmp - Host Monitoring Protocol &lt;br /&gt;xns-idp - Xerox ns idp &lt;br /&gt;rdp - Reliable Datagram Protocol &lt;br /&gt;iso-tp4 - ISO Transport Protocol class 4 &lt;br /&gt;xtp - Xpress Transfer Protocol &lt;br /&gt;ddp - Datagram Delivery Protocol &lt;br /&gt;idpr-cmtp - idpr Control Message Transport &lt;br /&gt;gre - General Routing Encapsulation &lt;br /&gt;esp - IPsec ESP protocol &lt;br /&gt;ah - IPsec AH protocol &lt;br /&gt;rspf - Radio Shortest Path First &lt;br /&gt;vmtp - Versatile Message Transport Protocol &lt;br /&gt;ospf - Open Shortest Path First &lt;br /&gt;ipip - IP encapsulation (protocol 4) &lt;br /&gt;encap - IP encapsulation (protocol 98) &lt;br /&gt;ip - Internet Protocol &lt;br /&gt;icmp - Internet Control Message Protocol &lt;br /&gt;igmp - Internet Group Management Protocol &lt;br /&gt;ggp - Gateway-Gateway Protocol &lt;br /&gt;ipencap - IP Encapsulated in IP &lt;br /&gt;st - st datagram mode &lt;br /&gt;tcp - Transmission Control Protocol &lt;br /&gt;egp - Exterior Gateway Protocol &lt;br /&gt;pup - Parc Universal packet Protocol &lt;br /&gt;udp - User Datagram Protocol &lt;br /&gt;hmp - Host Monitoring Protocol &lt;br /&gt;xns-idp - Xerox ns idp &lt;br /&gt;rdp - Reliable Datagram Protocol &lt;br /&gt;iso-tp4 - ISO Transport Protocol class 4 &lt;br /&gt;xtp - Xpress Transfer Protocol &lt;br /&gt;ddp - Datagram Delivery Protocol &lt;br /&gt;idpr-cmtp - idpr Control Message Transport &lt;br /&gt;gre - General Routing Encapsulation &lt;br /&gt;esp - IPsec ESP protocol &lt;br /&gt;ah - IPsec AH protocol &lt;br /&gt;rspf - Radio Shortest Path First &lt;br /&gt;vmtp - Versatile Message Transport Protocol &lt;br /&gt;ospf - Open Shortest Path First &lt;br /&gt;ipip - IP encapsulation (protocol 4) &lt;br /&gt;encap - IP encapsulation (protocol 98) &lt;br /&gt;&lt;br /&gt;protocol (read-only: ip | arp | rarp | ipx | ipv6) - the name/number of ethernet protocolip - Internet Protocol &lt;br /&gt;arp - Address Resolution Protocol &lt;br /&gt;rarp - Reverse Address Resolution Protocol &lt;br /&gt;ipx - Internet Packet exchange protocol &lt;br /&gt;ipv6 - Internet Protocol next generation &lt;br /&gt;ip - Internet Protocol &lt;br /&gt;arp - Address Resolution Protocol &lt;br /&gt;rarp - Reverse Address Resolution Protocol &lt;br /&gt;ipx - Internet Packet exchange protocol &lt;br /&gt;ipv6 - Internet Protocol next generation &lt;br /&gt;&lt;br /&gt;size (read-only: integer) - size of packet&lt;br /&gt;&lt;br /&gt;src-address (IP address) - source address&lt;br /&gt;&lt;br /&gt;src-mac-address (MAC address) - source MAC address&lt;br /&gt;&lt;br /&gt;time (read-only: time) - time when packet arrived&lt;br /&gt;&lt;br /&gt;tos (read-only: integer) - IP Type Of Service&lt;br /&gt;&lt;br /&gt;ttl (read-only: integer) - IP Time To Live&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;In the example below it's seen, how to get the list of sniffed packets:&lt;br /&gt;[admin@MikroTik] tool sniffer packet&gt; print&lt;br /&gt;  # TIME    INTERFACE SRC-ADDRESS             DST-ADDRESS            IP-.. SIZE&lt;br /&gt;  0 0.12    ether1    10.0.0.241:1839         10.0.0.181:23 (telnet) tcp   46&lt;br /&gt;  1 0.12    ether1    10.0.0.241:1839         10.0.0.181:23 (telnet) tcp   40&lt;br /&gt;  2 0.12    ether1    10.0.0.181:23 (telnet)  10.0.0.241:1839        tcp   78&lt;br /&gt;  3 0.292   ether1    10.0.0.181              10.0.0.4               gre   88&lt;br /&gt;  4 0.32    ether1    10.0.0.241:1839         10.0.0.181:23 (telnet) tcp   40&lt;br /&gt;  5 0.744   ether1    10.0.0.144:2265         10.0.0.181:22 (ssh)    tcp   76&lt;br /&gt;  6 0.744   ether1    10.0.0.144:2265         10.0.0.181:22 (ssh)    tcp   76&lt;br /&gt;  7 0.744   ether1    10.0.0.181:22 (ssh)     10.0.0.144:2265        tcp   40&lt;br /&gt;  8 0.744   ether1    10.0.0.181:22 (ssh)     10.0.0.144:2265        tcp   76&lt;br /&gt;[admin@MikroTik] tool sniffer packet&gt;&lt;br /&gt;Packet Sniffer Protocols&lt;br /&gt;Submenu level: /tool sniffer protocol&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;In this submenu you can see all kind of protocols that have been sniffed.&lt;br /&gt;Property Description&lt;br /&gt;bytes (integer) - total number of data bytes&lt;br /&gt;&lt;br /&gt;ip-protocol (ip | icmp | igmp | ggp | ipencap | st | tcp | egp | pup | udp | hmp | xns-idp | rdp | iso-tp4 | xtp | ddp | idrp-cmtp | gre | esp | ah | rspf | vmtp | ospf | ipip | encap) - the name/number of IP protocolip - Internet Protocol &lt;br /&gt;icmp - Internet Control Message Protocol &lt;br /&gt;igmp - Internet Group Management Protocol &lt;br /&gt;ggp - Gateway-Gateway Protocol &lt;br /&gt;ipencap - IP Encapsulated in IP &lt;br /&gt;st - st datagram mode &lt;br /&gt;tcp - Transmission Control Protocol &lt;br /&gt;egp - Exterior Gateway Protocol &lt;br /&gt;pup - Parc Universal packet Protocol &lt;br /&gt;udp - User Datagram Protocol &lt;br /&gt;hmp - Host Monitoring Protocol &lt;br /&gt;xns-idp - Xerox ns idp &lt;br /&gt;rdp - Reliable Datagram Protocol &lt;br /&gt;iso-tp4 - ISO Transport Protocol class 4 &lt;br /&gt;xtp - Xpress Transfer Protocol &lt;br /&gt;ddp - Datagram Delivery Protocol &lt;br /&gt;idpr-cmtp - idpr Control Message Transport &lt;br /&gt;gre - General Routing Encapsulation &lt;br /&gt;esp - IPsec ESP protocol &lt;br /&gt;ah - IPsec AH protocol &lt;br /&gt;rspf - Radio Shortest Path First &lt;br /&gt;vmtp - Versatile Message Transport Protocol &lt;br /&gt;ospf - Open Shortest Path First &lt;br /&gt;ipip - IP encapsulation &lt;br /&gt;encap - IP encapsulation &lt;br /&gt;ip - Internet Protocol &lt;br /&gt;icmp - Internet Control Message Protocol &lt;br /&gt;igmp - Internet Group Management Protocol &lt;br /&gt;ggp - Gateway-Gateway Protocol &lt;br /&gt;ipencap - IP Encapsulated in IP &lt;br /&gt;st - st datagram mode &lt;br /&gt;tcp - Transmission Control Protocol &lt;br /&gt;egp - Exterior Gateway Protocol &lt;br /&gt;pup - Parc Universal packet Protocol &lt;br /&gt;udp - User Datagram Protocol &lt;br /&gt;hmp - Host Monitoring Protocol &lt;br /&gt;xns-idp - Xerox ns idp &lt;br /&gt;rdp - Reliable Datagram Protocol &lt;br /&gt;iso-tp4 - ISO Transport Protocol class 4 &lt;br /&gt;xtp - Xpress Transfer Protocol &lt;br /&gt;ddp - Datagram Delivery Protocol &lt;br /&gt;idpr-cmtp - idpr Control Message Transport &lt;br /&gt;gre - General Routing Encapsulation &lt;br /&gt;esp - IPsec ESP protocol &lt;br /&gt;ah - IPsec AH protocol &lt;br /&gt;rspf - Radio Shortest Path First &lt;br /&gt;vmtp - Versatile Message Transport Protocol &lt;br /&gt;ospf - Open Shortest Path First &lt;br /&gt;ipip - IP encapsulation &lt;br /&gt;encap - IP encapsulation &lt;br /&gt;&lt;br /&gt;packets (integer) - the number of packets&lt;br /&gt;&lt;br /&gt;port (name) - the port of TCP/UDP protocol&lt;br /&gt;&lt;br /&gt;protocol (read-only: ip | arp | rarp | ipx | ipv6) - the name/number of ethernet protocolip - Internet Protocol &lt;br /&gt;arp - Address Resolution Protocol &lt;br /&gt;rarp - Reverse Address Resolution Protocol &lt;br /&gt;ipx - Internet Packet exchange protocol &lt;br /&gt;ipv6 - Internet Protocol next generation &lt;br /&gt;ip - Internet Protocol &lt;br /&gt;arp - Address Resolution Protocol &lt;br /&gt;rarp - Reverse Address Resolution Protocol &lt;br /&gt;ipx - Internet Packet exchange protocol &lt;br /&gt;ipv6 - Internet Protocol next generation &lt;br /&gt;&lt;br /&gt;share (integer) - specific type of traffic share compared to all traffic in bytes&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;[admin@MikroTik] tool sniffer protocol&gt; print&lt;br /&gt;  # PROTOCOL IP-PR... PORT          PACKETS   BYTES   SHARE&lt;br /&gt;  0 ip                              77        4592    100 %&lt;br /&gt;  1 ip       tcp                    74        4328    94.25 %&lt;br /&gt;  2 ip       gre                    3         264     5.74 %&lt;br /&gt;  3 ip       tcp      22 (ssh)      49        3220    70.12 %&lt;br /&gt;  4 ip       tcp      23 (telnet)   25        1108    24.12 %&lt;br /&gt;&lt;br /&gt;[admin@MikroTik] tool sniffer protocol&gt;&lt;br /&gt;Packet Sniffer Host&lt;br /&gt;Submenu level: /tool sniffer host&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;The submenu shows the list of hosts that were participating in data excange you've sniffed.&lt;br /&gt;Property Description&lt;br /&gt;address (read-only: IP address) - IP address of the host&lt;br /&gt;&lt;br /&gt;peek-rate (read-only: integer/integer) - the maximum data-rate received/transmitted&lt;br /&gt;&lt;br /&gt;rate (read-only: integer/integer) - current data-rate received/transmitted&lt;br /&gt;&lt;br /&gt;total (read-only: integer/integer) - total packets received/transmitted&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;In the following example we'll see the list of hosts:&lt;br /&gt;[admin@MikroTik] tool sniffer host&gt; print                                                  &lt;br /&gt;  # ADDRESS       RATE         PEEK-RATE           TOTAL            &lt;br /&gt;  0 10.0.0.4      0bps/0bps    704bps/0bps         264/0            &lt;br /&gt;  1 10.0.0.144    0bps/0bps    6.24kbps/12.2kbps   1092/2128        &lt;br /&gt;  2 10.0.0.181    0bps/0bps    12.2kbps/6.24kbps   2994/1598        &lt;br /&gt;  3 10.0.0.241    0bps/0bps    1.31kbps/4.85kbps   242/866          &lt;br /&gt;&lt;br /&gt;[admin@MikroTik] tool sniffer host&gt;&lt;br /&gt;Packet Sniffer Connections&lt;br /&gt;Submenu level: /tool sniffer connection&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;Here you can get a list of the connections that have been watched during the sniffing time.&lt;br /&gt;Property Description&lt;br /&gt;active (read-only: yes | no) - if yes the find active connections&lt;br /&gt;&lt;br /&gt;bytes (read-only: integer/integer) - bytes in the current connection&lt;br /&gt;&lt;br /&gt;dst-address (read-only: IP address) - destination address&lt;br /&gt;&lt;br /&gt;mss (read-only: integer/integer) - Maximum Segment Size&lt;br /&gt;&lt;br /&gt;resends (read-only: integer/integer) - the number of packets resends in the current connection&lt;br /&gt;&lt;br /&gt;src-address (read-only: IP address) - source address&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;The example shows how to get the list of connections:&lt;br /&gt;[admin@MikroTik] tool sniffer connection&gt; print                                &lt;br /&gt;Flags: A - active &lt;br /&gt;  #   SRC-ADDRESS       DST-ADDRESS             BYTES     RESENDS   MSS      &lt;br /&gt;  0 A 10.0.0.241:1839   10.0.0.181:23 (telnet)  6/42      60/0      0/0      &lt;br /&gt;  1 A 10.0.0.144:2265   10.0.0.181:22 (ssh)     504/252   504/0     0/0&lt;br /&gt;&lt;br /&gt;[admin@MikroTik] tool sniffer connection&gt;&lt;br /&gt;Sniff MAC Address&lt;br /&gt;&lt;br /&gt;You can also see the source and destination MAC Addresses. To do so, at first stop the sniffer if it is running, and select a specific interface:&lt;br /&gt;[admin@MikroTik] tool sniffer&gt; stop&lt;br /&gt;[admin@MikroTik] tool sniffer&gt; set interface=bridge1&lt;br /&gt;[admin@MikroTik] tool sniffer&gt; start&lt;br /&gt;[admin@MikroTik] tool sniffer&gt; print&lt;br /&gt;            interface: bridge1&lt;br /&gt;         only-headers: no&lt;br /&gt;         memory-limit: 10&lt;br /&gt;            file-name:&lt;br /&gt;           file-limit: 10&lt;br /&gt;    streaming-enabled: no&lt;br /&gt;     streaming-server: 0.0.0.0&lt;br /&gt;        filter-stream: yes&lt;br /&gt;      filter-protocol: ip-only&lt;br /&gt;      filter-address1: 0.0.0.0/0:0-65535&lt;br /&gt;      filter-address2: 0.0.0.0/0:0-65535&lt;br /&gt;              running: yes&lt;br /&gt;[admin@MikroTik] tool sniffer&gt;&lt;br /&gt;&lt;br /&gt;Now you have the source and destination MAC Addresses:&lt;br /&gt;[admin@MikroTik] tool sniffer packet&gt; print detail&lt;br /&gt; 0 time=0 src-mac-address=00:0C:42:03:02:C7 dst-mac-address=00:30:4F:08:3A:E7&lt;br /&gt;   interface=bridge1 src-address=10.5.8.104:1125&lt;br /&gt;   dst-address=10.1.0.172:3987 (winbox-tls) protocol=ip ip-protocol=tcp&lt;br /&gt;   size=146 ip-packet-size=146 ip-header-size=20 tos=0 identification=5088&lt;br /&gt;   fragment-offset=0 ttl=126&lt;br /&gt;&lt;br /&gt; 1 time=0 src-mac-address=00:30:4F:08:3A:E7 dst-mac-address=00:0C:42:03:02:C7&lt;br /&gt;   interface=bridge1 src-address=10.1.0.172:3987 (winbox-tls)&lt;br /&gt;   dst-address=10.5.8.104:1125 protocol=ip ip-protocol=tcp size=253&lt;br /&gt;   ip-packet-size=253 ip-header-size=20 tos=0 identification=41744&lt;br /&gt;   fragment-offset=0 ttl=64&lt;br /&gt;&lt;br /&gt; 2 time=0.071 src-mac-address=00:0C:42:03:02:C7&lt;br /&gt;   dst-mac-address=00:30:4F:08:3A:E7 interface=bridge1&lt;br /&gt;   src-address=10.5.8.104:1125 dst-address=10.1.0.172:3987 (winbox-tls)&lt;br /&gt;   protocol=ip ip-protocol=tcp size=40 ip-packet-size=40 ip-header-size=20&lt;br /&gt;   tos=0 identification=5089 fragment-offset=0 ttl=126&lt;br /&gt;&lt;br /&gt; 3 time=0.071 src-mac-address=00:30:4F:08:3A:E7&lt;br /&gt;   dst-mac-address=00:0C:42:03:02:C7 interface=bridge1&lt;br /&gt;   src-address=10.1.0.172:3987 (winbox-tls) dst-address=10.5.8.104:1125&lt;br /&gt;   protocol=ip ip-protocol=tcp size=213 ip-packet-size=213 ip-header-size=20&lt;br /&gt;   tos=0 identification=41745 fragment-offset=0 ttl=64&lt;br /&gt;   &lt;br /&gt;-- [Q quit|D dump|down]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-744787733332773483?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/744787733332773483/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=744787733332773483' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/744787733332773483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/744787733332773483'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/packet-sniffer.html' title='Packet Sniffer'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-5567886189937130243</id><published>2008-04-08T16:00:00.000+07:00</published><updated>2008-04-08T16:06:34.134+07:00</updated><title type='text'>Torch (Realtime Traffic Monitor)</title><content type='html'>General Information&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;Realtime traffic monitor may be used to monitor the traffic flow through an interface.&lt;br /&gt;Specifications&lt;br /&gt;Packages required: system&lt;br /&gt;License required: Level1&lt;br /&gt;Submenu level: /tool&lt;br /&gt;Standards and Technologies: none&lt;br /&gt;Hardware usage: Not significant&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;Realtime Traffic Monitor called also torch is used for monitoring traffic that is going through an interface. You can monitor traffic classified by protocol name, source address, destination address, port. Torch shows the protocols you have chosen and mean transmitted and received data rate for each of them.&lt;br /&gt;The Torch Command&lt;br /&gt;Command name: /tool torch&lt;br /&gt;Property Description&lt;br /&gt;(name) - the name of the interface to monitor&lt;br /&gt;&lt;br /&gt;dst-address (IP address/netmask) - destination address and network mask to filter the traffic only with such an address, any destination address: 0.0.0.0/0&lt;br /&gt;&lt;br /&gt;freeze-frame-interval (time) - time in seconds for which the screen output is paused&lt;br /&gt;&lt;br /&gt;port (name | integer) - the name or number of the port&lt;br /&gt;&lt;br /&gt;protocol (any | any-ip | ddp | egp | encap | ggp | gre | hmp | icmp | idpr-cmtp | igmp | ipencap | ipip | ipsec-ah | ipsec-esp | iso-tp4 | ospf | pup | rdp | rspf | st | tcp | udp | vmtp | xns-idp | xtp) - the name or number of the protocolany - any ethernet or IP protocol &lt;br /&gt;any-ip - any IP protocol &lt;br /&gt;any - any ethernet or IP protocol &lt;br /&gt;any-ip - any IP protocol &lt;br /&gt;&lt;br /&gt;src-address (IP address/netmask) - source address and network mask to filter the traffic only with such an address, any source address: 0.0.0.0/0&lt;br /&gt;&lt;br /&gt;Notes&lt;br /&gt;&lt;br /&gt;If there will be specific port given, then only tcp and udp protocols will be filtered, i.e., the name of the protocol can be any, any-ip, tcp, udp.&lt;br /&gt;&lt;br /&gt;Except TX and RX, there will be only the field you've specified in command line in the command's output (e.g., you will get PROTOCOL column only in case if protocol property is explicitly specified).&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;The following example monitors the traffic that goes through the ether1 interface generated by telnet protocol:&lt;br /&gt;[admin@MikroTik] tool&gt; torch ether1 port=telnet&lt;br /&gt; SRC-PORT                     DST-PORT                     TX         RX&lt;br /&gt; 1439                         23 (telnet)                  1.7kbps    368bps&lt;br /&gt;&lt;br /&gt;[admin@MikroTik] tool&gt;&lt;br /&gt;&lt;br /&gt;To see what IP protocols are going through the ether1 interface:&lt;br /&gt;[admin@MikroTik] tool&gt; torch ether1 protocol=any-ip&lt;br /&gt; PRO.. TX         RX&lt;br /&gt; tcp   1.06kbps   608bps&lt;br /&gt; udp   896bps     3.7kbps&lt;br /&gt; icmp  480bps     480bps&lt;br /&gt; ospf  0bps       192bps&lt;br /&gt;&lt;br /&gt;[admin@MikroTik] tool&gt;&lt;br /&gt;&lt;br /&gt;To see what IP protocols are interacting with 10.0.0.144/32 host connected to the ether1 interface:&lt;br /&gt;[admin@MikroTik] tool&gt; torch ether1 src-address=10.0.0.144/32 protocol=any&lt;br /&gt; PRO.. SRC-ADDRESS     TX         RX&lt;br /&gt; tcp   10.0.0.144      1.01kbps   608bps&lt;br /&gt; icmp  10.0.0.144      480bps     480bps&lt;br /&gt;&lt;br /&gt;[admin@MikroTik] tool&gt;&lt;br /&gt;&lt;br /&gt;To see what tcp/udp protocols are going through the ether1 interface:&lt;br /&gt;[admin@MikroTik] tool&gt; torch ether1 protocol=any-ip port=any&lt;br /&gt; PRO.. SRC-PORT                  DST-PORT                  TX         RX&lt;br /&gt; tcp   3430                      22 (ssh)                  1.06kbps   608bps&lt;br /&gt; udp   2812                      1813 (radius-acct)        512bps     2.11kbps&lt;br /&gt; tcp   1059                      139 (netbios-ssn)         248bps     360bps&lt;br /&gt;[admin@MikroTik] tool&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-5567886189937130243?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/5567886189937130243/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=5567886189937130243' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/5567886189937130243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/5567886189937130243'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/torch-realtime-traffic-monitor.html' title='Torch (Realtime Traffic Monitor)'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-3203461720049327816</id><published>2008-04-08T15:59:00.000+07:00</published><updated>2008-04-08T16:00:16.893+07:00</updated><title type='text'>MAC Level Access (Telnet and Winbox)</title><content type='html'>General Information&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;MAC telnet is used to provide access to a router that has no IP address set. It works just like IP telnet. MAC telnet is possible between two MikroTik RouterOS routers only.&lt;br /&gt;Specifications&lt;br /&gt;Packages required: system&lt;br /&gt;License required: Level1&lt;br /&gt;Submenu level: /tool, /tool mac-server&lt;br /&gt;Standards and Technologies: MAC Telnet&lt;br /&gt;Hardware usage: Not significant&lt;br /&gt;MAC Telnet Server&lt;br /&gt;Submenu level: /tool mac-server&lt;br /&gt;Property Description&lt;br /&gt;interface (name | all; default: all) - interface name to which the mac-server clients will connectall - all interfaces &lt;br /&gt;all - all interfaces &lt;br /&gt;&lt;br /&gt;Notes&lt;br /&gt;&lt;br /&gt;There is an interface list in this submenu level. If you add some interfaces to this list, you allow MAC telnet to that interface. Disabled (disabled=yes) item means that interface is not allowed to accept MAC telnet sessions on that interface. all interfaces iss the default setting to allow MAC teltet on any interface.&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;To enable MAC telnet server on ether1 interface only:&lt;br /&gt;[admin@MikroTik] tool mac-server&gt; print&lt;br /&gt;Flags: X - disabled&lt;br /&gt; #   INTERFACE&lt;br /&gt; 0   all&lt;br /&gt;[admin@MikroTik] tool mac-server&gt; remove 0&lt;br /&gt;[admin@MikroTik] tool mac-server&gt; add interface=ether1 disabled=no&lt;br /&gt;[admin@MikroTik] tool mac-server&gt; print&lt;br /&gt;Flags: X - disabled&lt;br /&gt; #   INTERFACE&lt;br /&gt; 0   ether1&lt;br /&gt;[admin@MikroTik] tool mac-server&gt;&lt;br /&gt;MAC WinBox Server&lt;br /&gt;Submenu level: /tool mac-server mac-winbox&lt;br /&gt;Property Description&lt;br /&gt;interface (name | all; default: all) - interface name to which it is alowed to connect with Winbox using MAC-based protocolall - all interfaces &lt;br /&gt;all - all interfaces &lt;br /&gt;&lt;br /&gt;Notes&lt;br /&gt;&lt;br /&gt;There is an interface list in this submenu level. If you add some interfaces to this list, you allow MAC Winbox to that interface. Disabled (disabled=yes) item means that interface is not allowed to accept MAC Winbox sessions on that interface.&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;To enable MAC Winbox server on ether1 interface only:&lt;br /&gt;[admin@MikroTik] tool mac-server mac-winbox&gt; print&lt;br /&gt;Flags: X - disabled&lt;br /&gt; #   INTERFACE&lt;br /&gt; 0   all&lt;br /&gt;[admin@MikroTik] tool mac-server mac-winbox&gt; remove 0&lt;br /&gt;[admin@MikroTik] tool mac-server mac-winbox&gt; add interface=ether1 disabled=no&lt;br /&gt;[admin@MikroTik] tool mac-server mac-winbox&gt; print&lt;br /&gt;Flags: X - disabled&lt;br /&gt; #   INTERFACE&lt;br /&gt; 0   ether1&lt;br /&gt;[admin@MikroTik] tool mac-server mac-winbox&gt;&lt;br /&gt;Monitoring Active Session List&lt;br /&gt;Submenu level: /tool mac-server sessions&lt;br /&gt;Property Description&lt;br /&gt;interface (read-only: name) - interface to which the client is connected to&lt;br /&gt;&lt;br /&gt;src-address (read-only: MAC address) - client's MAC address&lt;br /&gt;&lt;br /&gt;uptime (read-only: time) - how long the client is connected to the server&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;To see active MAC Telnet sessions:&lt;br /&gt;[admin@MikroTik] tool mac-server sessions&gt; print&lt;br /&gt; # INTERFACE SRC-ADDRESS       UPTIME&lt;br /&gt; 0 wlan1     00:0B:6B:31:08:22 00:03:01&lt;br /&gt;[admin@MikroTik] tool mac-server sessions&gt;&lt;br /&gt;MAC Scan&lt;br /&gt;Command name: /tool mac-scan&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;This command discovers all devices, which support MAC telnet protocol on the given network.&lt;br /&gt;Property Description&lt;br /&gt;(name) - interface name to perform the scan on&lt;br /&gt;&lt;br /&gt;MAC Telnet Client&lt;br /&gt;Command name: /tool mac-telnet&lt;br /&gt;Property Description&lt;br /&gt;(MAC address) - MAC address of a compatible device&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;[admin@MikroTik] &gt; /tool mac-telnet 00:02:6F:06:59:42&lt;br /&gt;Login: admin&lt;br /&gt;Password:&lt;br /&gt;Trying 00:02:6F:06:59:42...&lt;br /&gt;Connected to 00:02:6F:06:59:42&lt;br /&gt;&lt;br /&gt;  MMM      MMM       KKK                          TTTTTTTTTTT      KKK&lt;br /&gt;  MMMM    MMMM       KKK                          TTTTTTTTTTT      KKK&lt;br /&gt;  MMM MMMM MMM  III  KKK  KKK  RRRRRR     OOOOOO      TTT     III  KKK  KKK&lt;br /&gt;  MMM  MM  MMM  III  KKKKK     RRR  RRR  OOO  OOO     TTT     III  KKKKK&lt;br /&gt;  MMM      MMM  III  KKK KKK   RRRRRR    OOO  OOO     TTT     III  KKK KKK&lt;br /&gt;  MMM      MMM  III  KKK  KKK  RRR  RRR   OOOOOO      TTT     III  KKK  KKK&lt;br /&gt;&lt;br /&gt;  MikroTik RouterOS 3.0beta10 (c) 1999-2007       http://www.mikrotik.com/&lt;br /&gt;&lt;br /&gt;Terminal linux detected, using multiline input mode&lt;br /&gt;[admin@MikroTik] &gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-3203461720049327816?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/3203461720049327816/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=3203461720049327816' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3203461720049327816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3203461720049327816'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/mac-level-access-telnet-and-winbox.html' title='MAC Level Access (Telnet and Winbox)'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-7447259997416561682</id><published>2008-04-08T15:58:00.000+07:00</published><updated>2008-04-08T15:59:09.386+07:00</updated><title type='text'>FTP (File Transfer Protocol) Server</title><content type='html'>General Information&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;MikroTik RouterOS implements File Transfer Protocol (FTP) server feature. It is intended to be used for software packages uploading, configuration script exporting and importing procedures, as well as for storing HotSpot servlet pages.&lt;br /&gt;Specifications&lt;br /&gt;Packages required: system&lt;br /&gt;License required: Level1&lt;br /&gt;Submenu level: /file&lt;br /&gt;Standards and Technologies: FTP (RFC 959)&lt;br /&gt;Hardware usage: Not significant&lt;br /&gt;File Transfer Protocol Server&lt;br /&gt;Submenu level: /file&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;MikroTik RouterOS has an industry standard FTP server facility. It uses ports 20 and 21 for communication with other hosts on the network.&lt;br /&gt;&lt;br /&gt;Uploaded files as well as exported configuration or backup files can be accessed under /file menu. There you can delete unnecessary files from the router.&lt;br /&gt;&lt;br /&gt;Authorization for FTP service uses router's system user account names and passwords. The ftp local user policy controls the access rights to the FTP server.&lt;br /&gt;Property Description&lt;br /&gt;contents (text) - file contents (for text files only; size limit - 4kB)&lt;br /&gt;&lt;br /&gt;creation-time (read-only: time) - item creation date and time&lt;br /&gt;&lt;br /&gt;name (read-only: name) - item name&lt;br /&gt;&lt;br /&gt;package-architecture (read-only: [text]) - RouterOS software package target machine architecture (for package files only)&lt;br /&gt;&lt;br /&gt;package-build-time (read-only: [date]) - RouterOS software package build time (for package files only)&lt;br /&gt;&lt;br /&gt;package-name (read-only: [text]) - RouterOS software package name (for package files only)&lt;br /&gt;&lt;br /&gt;package-version (read-only: [text]) - RouterOS software package version number (for package files only)&lt;br /&gt;&lt;br /&gt;size (read-only: integer) - package size in bytes&lt;br /&gt;&lt;br /&gt;type (read-only: text) - item type. Few file types are recognized by extension: backup, directory, package, script, ssh key, but other files are just marked by their extension (.html file, for example)&lt;br /&gt;&lt;br /&gt;Command Description&lt;br /&gt;print - shows a list of files storedInput Parameters&lt;br /&gt;detail - shows contents of files less that 4kB long &lt;br /&gt;edit [item] contents - offers to edit file's contents with editor &lt;br /&gt;set [item] contents=[content] - sets the file's contents to 'content'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-7447259997416561682?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/7447259997416561682/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=7447259997416561682' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/7447259997416561682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/7447259997416561682'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/ftp-file-transfer-protocol-server.html' title='FTP (File Transfer Protocol) Server'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-3001897857287985757</id><published>2008-04-08T15:57:00.000+07:00</published><updated>2008-04-08T15:58:22.287+07:00</updated><title type='text'>Configuration Management</title><content type='html'>General Information&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;This manual introduces you with commands which are used to perform the following functions:&lt;br /&gt;system backup; &lt;br /&gt;system restore from a backup; &lt;br /&gt;configuration export; &lt;br /&gt;configuration import; &lt;br /&gt;system configuration reset. &lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;The configuration backup can be used for backing up MikroTik RouterOS configuration to a binary file, which can be stored on the router or downloaded from it using FTP for future use. The configuration restore can be used for restoring the router's configuration, exactly as it was at the backup creation moment, from a backup file. The restoration procedure assumes the cofiguration is restored on the same router, where the backup file was originally created, so it will create partially broken configuration if the hardware has been changed.&lt;br /&gt;&lt;br /&gt;The configuration export can be used for dumping out complete or partial MikroTik RouterOS configuration to the console screen or to a text (script) file, which can be downloaded from the router using FTP protocol. The configuration dumped is actually a batch of commands that add (without removing the existing configuration) the selected configuration to a router. The configuration import facility executes a batch of console commands from a script file.&lt;br /&gt;&lt;br /&gt;System reset command is used to erase all configuration on the router. Before doing that, it might be useful to backup the router's configuration.&lt;br /&gt;System Backup&lt;br /&gt;Submenu level: /system backup&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;The save command is used to store the entire router configuration in a backup file. The file is shown in the /file submenu. It can be downloaded via ftp to keep it as a backup for your configuration.&lt;br /&gt;&lt;br /&gt;To restore the system configuration, for example, after a /system reset-configuration, it is possible to upload that file via ftp and load that backup file using load command in /system backup submenu.&lt;br /&gt;Command Description&lt;br /&gt;load name=[filename] - Load configuration backup from a file&lt;br /&gt;&lt;br /&gt;save name=[filename] - Save configuration backup to a file&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;To save the router configuration to file test:&lt;br /&gt;[admin@MikroTik] system backup&gt; save name=test&lt;br /&gt;Configuration backup saved&lt;br /&gt;[admin@MikroTik] system backup&gt;&lt;br /&gt;&lt;br /&gt;To see the files stored on the router:&lt;br /&gt;[admin@MikroTik] &gt; file print&lt;br /&gt;  # NAME                           TYPE         SIZE       CREATION-TIME&lt;br /&gt;  0 test.backup                    backup       12567      sep/08/2004 21:07:50&lt;br /&gt;[admin@MikroTik] &gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;To load the saved backup file test:&lt;br /&gt;[admin@MikroTik] &gt; system backup load name=test &lt;br /&gt;Restore and reboot? [y/N]: &lt;br /&gt;y&lt;br /&gt;Restoring system configuration&lt;br /&gt;System configuration restored, rebooting now&lt;br /&gt;Exporting Configuration&lt;br /&gt;Command name: /export&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;The export command prints a script that can be used to restore configuration. The command can be invoked at any menu level, and it acts for that menu level and all menu levels below it. The output can be saved into a file, available for download using FTP.&lt;br /&gt;Command Description&lt;br /&gt;file=[filename] - saves the export to a file&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;[admin@MikroTik] &gt; ip address print&lt;br /&gt;Flags: X - disabled, I - invalid, D - dynamic&lt;br /&gt; #   ADDRESS            NETWORK         BROADCAST       INTERFACE&lt;br /&gt; 0   10.1.0.172/24      10.1.0.0        10.1.0.255      bridge1&lt;br /&gt; 1   10.5.1.1/24        10.5.1.0        10.5.1.255      ether1&lt;br /&gt;[admin@MikroTik] &gt;&lt;br /&gt;&lt;br /&gt;To make an export file:&lt;br /&gt;[admin@MikroTik] ip address&gt; export file=address&lt;br /&gt;[admin@MikroTik] ip address&gt;&lt;br /&gt;&lt;br /&gt;To see the files stored on the router:&lt;br /&gt;[admin@MikroTik] &gt; file print&lt;br /&gt; # NAME                            TYPE         SIZE       CREATION-TIME&lt;br /&gt;0  address.rsc                     script       315        dec/23/2003 13:21:48&lt;br /&gt;[admin@MikroTik] &gt;&lt;br /&gt;Importing Configuration&lt;br /&gt;Command name: /import&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;The root level command /import [file_name] executes a script, stored in the specified file adds the configuration from the specified file to the existing setup. This file may contain any console comands, including scripts. is used to restore configuration or part of it after a /system reset event or anything that causes configuration data loss.&lt;br /&gt;&lt;br /&gt;Note that it is impossible to import the whole router configuration using this feature. It can only be used to import a part of configuration (for example, firewall rules) in order to spare you some typing.&lt;br /&gt;Command Description&lt;br /&gt;file=[filename] - loads the exported configuration from a file to router&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;To load the saved export file use the following command:&lt;br /&gt;[admin@MikroTik] &gt; import address.rsc&lt;br /&gt;Opening script file address.rsc&lt;br /&gt;&lt;br /&gt;Script file loaded and executed successfully&lt;br /&gt;[admin@MikroTik] &gt;&lt;br /&gt;Configuration Reset&lt;br /&gt;Command name: /system reset-configuration&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;The command clears all configuration of the router and sets it to the default including the login name and password ('admin' and no password), IP addresses and other configuration is erased, interfaces will become disabled. After the reset command router will reboot.&lt;br /&gt;Command Description&lt;br /&gt;reset - erases router's configuration&lt;br /&gt;&lt;br /&gt;Notes&lt;br /&gt;&lt;br /&gt;If the router has been installed using netinstall and had a script specified as the initial configuration, the reset command executes this script after purging the configuration. To stop it doing so, you will have to reinstall the router.&lt;br /&gt;Example&lt;br /&gt;[admin@MikroTik] &gt; system reset-configuration&lt;br /&gt;Dangerous! Reset anyway? [y/N]: n&lt;br /&gt;action cancelled&lt;br /&gt;[admin@MikroTik] &gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-3001897857287985757?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/3001897857287985757/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=3001897857287985757' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3001897857287985757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3001897857287985757'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/configuration-management.html' title='Configuration Management'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-1931803290947982228</id><published>2008-04-08T15:07:00.000+07:00</published><updated>2008-04-08T15:10:29.592+07:00</updated><title type='text'>Nstreme dual Step-by-Step</title><content type='html'>Here is a step-by-step explanation how to enable nstreme dual on a fresh installed MikroTik devices: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I. MikroTik Device 1 &lt;br /&gt;&lt;br /&gt;1.1. Enabling wireless cards 1 and 2: &lt;br /&gt;[admin@MikroTik] &gt; interface enable wlan1&lt;br /&gt;[admin@MikroTik] &gt; interface enable wlan2&lt;br /&gt;&lt;br /&gt;1.2. Assigning IP address to the ethernet interface: &lt;br /&gt;[admin@MikroTik] &gt; ip address add address=192.168.1.1/24 interface=ether1 &lt;br /&gt;&lt;br /&gt;1.3. Creating bridge interface: &lt;br /&gt;  &lt;br /&gt;[admin@MikroTik] &gt; interface bridge add &lt;br /&gt;&lt;br /&gt;1.4. Adding ethernet interface to the bridge interface: &lt;br /&gt;  &lt;br /&gt;[admin@MikroTik] &gt; interface bridge port add interface=ether1 bridge=bridge1 &lt;br /&gt;&lt;br /&gt;1.5. Setting wireless cards 1 and 2 to nstreme mode: &lt;br /&gt;  &lt;br /&gt;[admin@MikroTik] &gt; interface wireless set wlan1 mode=nstremedualslave &lt;br /&gt;[admin@MikroTik] &gt; interface wireless set wlan2 mode=nstremedualslave  &lt;br /&gt;&lt;br /&gt;1.6. Creating nstreme dual interface and setting Tx and Rx radios and frequencies: &lt;br /&gt;[admin@MikroTik] &gt; interface wireless nstremedual add rxradio=wlan1 txradio=wlan2 &lt;br /&gt;rx-=5ghz tx-=5ghz rx-=5180 txfrequency=5300&lt;br /&gt;&lt;br /&gt;1.7. Adding nstreme interface to the bridge: &lt;br /&gt;[admin@MikroTik] &gt; interface bridge port add interface=nstreme1 bridge=bridge1 &lt;br /&gt;&lt;br /&gt;1.8. Checking the MAC address of the nstreme interface (in this example: 11:11:11:11:11:11): &lt;br /&gt;[admin@MikroTik] &gt; interface wireless nstreme print &lt;br /&gt;Flags: X disabled, R running &lt;br /&gt;0 X  name="nstreme1" mtu=1500 mac=11:11:11:11:11:11 arp=enabled &lt;br /&gt;disable=no txradio=wlan2 rxradio=wlan1 remote=00:00:00:00:00:00 &lt;br /&gt;tx-=5ghz txfrequency=5300 rxband=5ghz rxfrequency=5180 &lt;br /&gt;rates=1Mbps,2Mbps,5.5Mbps,11Mbps&lt;br /&gt;rates/g=6Mbps,9Mbps,12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps &lt;br /&gt;framer=none framer=2560 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;II. MikroTik Device 2 &lt;br /&gt;&lt;br /&gt;2.1. Enabling wireless cards 1 and 2: &lt;br /&gt; &lt;br /&gt;[admin@MikroTik] &gt; interface enable wlan1&lt;br /&gt;[admin@MikroTik] &gt; interface enable wlan2&lt;br /&gt;&lt;br /&gt;2.2. Assigning IP address to the ethernet interface: &lt;br /&gt;  &lt;br /&gt;[admin@MikroTik] &gt; ip address add address=192.168.1.2/24 interface=ether1 &lt;br /&gt;&lt;br /&gt;2.3. Creating bridge interface: &lt;br /&gt;[admin@MikroTik] &gt; interface bridge add &lt;br /&gt;&lt;br /&gt;2.4. Adding ethernet interface to the bridge interface: &lt;br /&gt;[admin@MikroTik] &gt; interface bridge port add interface=ether1 bridge=bridge1 &lt;br /&gt;&lt;br /&gt;2.5. Setting wireless cards 1 and 2 to nstreme mode: &lt;br /&gt;[admin@MikroTik] &gt; interface wireless set wlan1 mode=nstremedual- &lt;br /&gt;[admin@MikroTik] &gt; interface wireless set wlan2 mode=nstremedualslave  &lt;br /&gt;&lt;br /&gt;2.6. Creating Nstreme dual interface and setting Tx and Rx radios and frequencies and setting the MAC address of the remote nstreme interface (in this example: 11:11:11:11:11:11 [step 1.8]): &lt;br /&gt;[admin@MikroTik] &gt; interface wireless nstremedual add rxradio=wlan1 txradio=wlan2 &lt;br /&gt;rxband=5ghz tx-=5ghz rx-=5300 txfrequency=5180 &lt;br /&gt;remote=11:11:11:11:11:11 disabled=no &lt;br /&gt;&lt;br /&gt;2.7. Adding nstreme interface to the bridge: &lt;br /&gt;[admin@MikroTik] &gt; interface bridge port add interface=nstreme1 bridge=bridge1 &lt;br /&gt;&lt;br /&gt;2.8. Checking the MAC address of the nstreme interface (in this example: 22:22:22:22:22:22): &lt;br /&gt;[admin@MikroTik] &gt; interface wireless nstreme print &lt;br /&gt;Flags: X disabled, R running &lt;br /&gt;0  R name="nstreme1" mtu=1500 mac=22:22:22:22:22:22 arp=enabled &lt;br /&gt;disable=no txradio=wlan2  rxradio=wlan1 remote=11:11:11:11:11:11 &lt;br /&gt;txband=5ghz tx-=5180 rx-=5ghz rx-=5300 &lt;br /&gt;rates=1Mbps,2Mbps,5.5Mbps,11Mbps &lt;br /&gt;rates/g=6Mbps,9Mbps,12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps &lt;br /&gt;framer=none framer=2560 &lt;br /&gt;&lt;br /&gt;III. MikroTik Device 1 &lt;br /&gt;&lt;br /&gt;1.9. Setting the MAC address of the remote nstreme interface (in this example: 22:22:22:22:22:22 [step 2.8]): &lt;br /&gt;[admin@MikroTik] &gt; interface wireless nstremedual set nstreme1 &lt;br /&gt;remote=22:22:22:22:22:22 disabled=no&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-1931803290947982228?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/1931803290947982228/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=1931803290947982228' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1931803290947982228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1931803290947982228'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/nstreme-dual-step-by-step.html' title='Nstreme dual Step-by-Step'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-3076005671762921973</id><published>2008-04-08T15:06:00.000+07:00</published><updated>2008-04-08T15:07:54.385+07:00</updated><title type='text'>Wireless repeater</title><content type='html'>Introduction&lt;br /&gt;&lt;br /&gt;This example shows how to configure a wireless repeater. Wireless repeater extends the range of an existing WLAN instead of adding more access points. Consider the network layout:&lt;br /&gt;We will use two wireless interfaces (two antennas) on the repeater router. WDS links will be established between 'Main gateway' and 'Repeater', 'Repeater' and 'AP1', 'AP2' (end-users are connected to the AP1 and AP2). &lt;br /&gt;&lt;br /&gt;Note, client wireless interfaces (station, ad-hoc, infrastructure) do not support bridging because of the limitations of 802.11. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Quick Start&lt;br /&gt;&lt;br /&gt;Main Gateway configuration export: &lt;br /&gt;/ ip address add address=192.168.0.1/24 interface=wlan1&lt;br /&gt;/ interface wireless set wlan1 disabled=no mode=ap-bridge band=5ghz frequency=5180 ssid=Main_gw wds-mode=static&lt;br /&gt;/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X2  master-interface=wlan1&lt;br /&gt;/ interface bridge add&lt;br /&gt;/ interface bridge port add interface=wlan1 bridge=bridge1&lt;br /&gt;/ interface bridge port add interface=wds1 bridge=bridge1&lt;br /&gt;&lt;br /&gt;Repeater configuration export: &lt;br /&gt;/ interface wireless set wlan1 disabled=no mode=ap-bridge band=5ghz frequency=5180 ssid=Main_gw wds-mode=static&lt;br /&gt;/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X1  master-interface=wlan1&lt;br /&gt;/ interface bridge add&lt;br /&gt;/ interface bridge port add interface=wlan1 bridge=bridge1&lt;br /&gt;/ interface bridge port add interface=wds1 bridge=bridge1&lt;br /&gt;&lt;br /&gt;/ interface wireless set wlan2 disabled=no mode=ap-bridge band=5ghz frequency=5805 ssid=To_clients wds-mode=static&lt;br /&gt;/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X4  master-interface=wlan2&lt;br /&gt;/ interface bridge port add interface=wlan2 bridge=bridge1&lt;br /&gt;/ interface bridge port add interface=wds2 bridge=bridge1&lt;br /&gt;/ ip address add address=192.168.0.2/24 interface=bridge1&lt;br /&gt;&lt;br /&gt;AP1, AP2 configuration export: &lt;br /&gt;/ interface wireless set wlan1 disabled=no mode=ap-bridge band=5ghz frequency=5805 ssid=To_clients wds-mode=static&lt;br /&gt;/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X3  master-interface=wlan1&lt;br /&gt;/ interface bridge add&lt;br /&gt;/ interface bridge port add interface=wlan1 bridge=bridge1&lt;br /&gt;/ interface bridge port add interface=wds1 bridge=bridge1&lt;br /&gt;/ ip adress add address=192.168.0.3/24 interface=wlan1&lt;br /&gt;Explanation&lt;br /&gt;Main Gateway&lt;br /&gt;/ ip address add address=192.168.0.1/24 interface=wlan1&lt;br /&gt;&lt;br /&gt;The wireless interface has the name 'wlan1' and IP address of 192.168.0.1/24. It will be the default gateway for other nodes in the network. &lt;br /&gt;/ interface wireless set wlan1 disabled=no mode=ap-bridge band=5ghz frequency=5180 ssid=Main_gw wds-mode=static&lt;br /&gt;&lt;br /&gt;Rule enables wireless interface and sets up appropriate configuration: band, frequency (WDS peers all need to be on the same frequency), SSID, wds-mode (static - WDS interfaces created manually in static mode). &lt;br /&gt;/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X2  master-interface=wlan1&lt;br /&gt;&lt;br /&gt;The rule creates WDS interface on the particular 'master-interface', where 'wds-address' is the remote WDS peer MAC-address. &lt;br /&gt;/ interface bridge add&lt;br /&gt;/ interface bridge port add interface=wlan1 bridge=bridge1&lt;br /&gt;/ interface bridge port add interface=wds1 bridge=bridge1&lt;br /&gt;&lt;br /&gt;First we create bridge interface on the router, then 'wlan1' and 'wds1' interface are added to the bridge. &lt;br /&gt;Repeater&lt;br /&gt;&lt;br /&gt;Let us consider wireless repeater configuration. First we need to establish communication to 'Main Gateway' router. &lt;br /&gt;/ interface wireless set wlan1 disabled=no mode=ap-bridge band=5ghz frequency=5180 ssid=Main_gw wds-mode=static&lt;br /&gt;/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X1  master-interface=wlan1&lt;br /&gt;/ interface bridge add&lt;br /&gt;/ interface bridge port add interface=wlan1 bridge=bridge1&lt;br /&gt;/ interface bridge port add interface=wds1 bridge=bridge1&lt;br /&gt;&lt;br /&gt;The rules are quite similar to 'Main Gateway' configuration rules. We need to enable wireless interface, than set appropriate wireless and WDS configuration (don't forget about the same frequency channel) and add interface to created bridge. &lt;br /&gt;/ interface wireless set wlan2 disabled=no mode=ap-bridge band=5ghz frequency=5805 ssid=To_clients wds-mode=static&lt;br /&gt;/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X4  master-interface=wlan2&lt;br /&gt;/ interface bridge port add interface=wlan2 bridge=bridge1&lt;br /&gt;/ interface bridge port add interface=wds2 bridge=bridge1&lt;br /&gt;/ ip address add address=192.168.0.2/24 interface=bridge1&lt;br /&gt;&lt;br /&gt;Next, we should configure second wireless interface. Rules are very similar to the previous one. IP address configuration is required for troubleshoot options. Repetear will work fine without IP address configuration. &lt;br /&gt;AP1, AP2 configuration&lt;br /&gt;/ interface wireless set wlan1 disabled=no mode=ap-bridge band=5ghz frequency=5805 ssid=To_clients wds-mode=static&lt;br /&gt;/ interface wireless wds add disabled=no wds-address=XX:XX:XX:XX:XX:X3  master-interface=wlan1&lt;br /&gt;/ interface bridge add&lt;br /&gt;/ interface bridge port add interface=wlan1 bridge=bridge1&lt;br /&gt;/ interface bridge port add interface=wds1 bridge=bridge1&lt;br /&gt;/ ip adress add address=192.168.0.3/24 interface=wlan1&lt;br /&gt;&lt;br /&gt;Finally, we need to configure AP1, AP2 client routers, which will provide connection to the Internet for the end-user. Add client interface to bridge (Ethernet, wireless). AP1 and AP2 clients will use 192.168.0.0/24 subnet, AP1 and AP2 clients will communicate as they are connected to the one switch.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-3076005671762921973?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/3076005671762921973/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=3076005671762921973' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3076005671762921973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3076005671762921973'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/wireless-repeater.html' title='Wireless repeater'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-8290280552104696374</id><published>2008-04-08T15:03:00.000+07:00</published><updated>2008-04-08T15:05:16.326+07:00</updated><title type='text'>How to create a transparent AP with more than 1 wireless cards</title><content type='html'>I was in need of this transparent AP because I had a linux server and 2 transparent AP-s that clients use to connect to my network. I wanted to change the AP-s so that more bandwith can be provided for the clients. The clients configuration was something like this: &lt;br /&gt;IP       = 10.100.11.x&lt;br /&gt;netmask  = 255.255.255.0&lt;br /&gt;gateway  = 10.100.11.1&lt;br /&gt;&lt;br /&gt;I purchased a routerboard with 1 ethernet card and 2 wireless cards. Performing the routing, the configuration of my network had to change so that the wireless cards` IP-s would be the gateways for the clients. In this scenario I had to change the routing of the linux server in a way that the Mikrotik box would be the gateway for the clients. Beside this, we had to change half of the clients` IP because wlan1 became 10.100.11.1 and wlan2 was 10.100.12.1 (new network). People who connect on wlan2 need to be in the 10.100.12.x/24 range. &lt;br /&gt;&lt;br /&gt;With a little help from the Mikrotik forum (thanks guys) I succedded in doing this: &lt;br /&gt;eth1  = 10.100.13.1/24&lt;br /&gt;wlan1 = 10.100.12.254/24&lt;br /&gt;wlan2 = 10.100.11.254/24&lt;br /&gt;&lt;br /&gt;Now, all 3 interfaces are in bridge and they forward traffic without any question to my Linux box . The wlan1 and wlan2 still have IP-s in that range accidentally, they can have any private IP address, it doesn`t matter anymore. &lt;br /&gt;&lt;br /&gt;Here is what you have to do (everything in telnet console): &lt;br /&gt;interface bridge add name=bridge1 (bridge1 being the name of the bridge, in lack of ideas)&lt;br /&gt;interface bridge port add interface=ether1 bridge=bridge1&lt;br /&gt;interface bridge port add interface=wlan1 bridge=bridge1&lt;br /&gt;interface bridge port add interface=wlan2 bridge=bridge1&lt;br /&gt;&lt;br /&gt;The wireless cards are in ap-bridge operating mode. &lt;br /&gt;interface wireless set wlan1 mode=ap-bridge ssid=greaca1&lt;br /&gt;interface wireless set wlan2 mode=ap-bridge ssid=greaca2&lt;br /&gt;And now, we have this configuration: &lt;br /&gt;&lt;br /&gt;Client IP 10.100.11.2 netmask 255.255.255.0 gateway 10.100.11.1 -&gt; Mikrotik wlan1 (IP=10.100.12.254/24) -&gt; linux server ip 10.100.11.1. &lt;br /&gt;&lt;br /&gt;Here are the connected client APs, 28 on that moment. &lt;br /&gt;&lt;br /&gt;The default gateway for the mikrotik box is 10.100.13.2, an IP alias on the same ethernet card in the linux server that is 10.100.11.1, but it doesn`t count... it can be any IP, doesn`t have to be in the same range with the linux server. &lt;br /&gt;&lt;br /&gt;Here is the complete scheme of my network in that town:&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-8290280552104696374?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/8290280552104696374/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=8290280552104696374' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8290280552104696374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8290280552104696374'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/how-to-create-transparent-ap-with-more.html' title='How to create a transparent AP with more than 1 wireless cards'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-3146444996395623400</id><published>2008-04-08T15:01:00.001+07:00</published><updated>2008-04-08T15:03:54.180+07:00</updated><title type='text'>Transparently Bridge two Networks without using WDS (EoIP)</title><content type='html'>Server Setup: &lt;br /&gt;Server IP Addresses &lt;br /&gt;&lt;br /&gt;/ ip address add address=192.168.0.1/24 interface=ether1 disabled=no&lt;br /&gt;/ ip address add address=192.168.1.1/24 interface=wlan1 disabled=no&lt;br /&gt;&lt;br /&gt;Client Setup: &lt;br /&gt;Client IP Addresses &lt;br /&gt;&lt;br /&gt;/ ip address add address=192.168.0.2/24 interface=ether1 disabled=no&lt;br /&gt;/ ip address add address=192.168.1.2/24 interface=wlan1 disabled=no&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-3146444996395623400?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/3146444996395623400/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=3146444996395623400' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3146444996395623400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3146444996395623400'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/transparently-bridge-two-networks.html' title='Transparently Bridge two Networks without using WDS (EoIP)'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-1162311452850645067</id><published>2008-04-08T15:00:00.002+07:00</published><updated>2008-04-08T15:01:43.461+07:00</updated><title type='text'>Wireless Area</title><content type='html'>Area is a part of a mesh network, for limiting station access to a certain number of APs (e.g., a building or a block). All APs within the mesh may have the same SSID, but stations will select only a few ones, based on their area code. &lt;br /&gt;&lt;br /&gt;The Area setting is configured on APs in the wireless menu. This can be done with the goal to limit connectivity (to force the station to stay within a certain area) , or to improve connection quality (as the station will not try to connect to APs from other areas, which may have worse signal quality). &lt;br /&gt;[admin@router] /interface wireless&gt; set wlan1 area=&lt;br /&gt;&lt;br /&gt;The stations can be configured to connect to any AP that has its area code beginning with a certain string (area-prefix parameter in wireless connect list), so you configure areas within areas, and make some stations only work within a subarea, and allow some other stations to work within a larger area. &lt;br /&gt;[admin@router] /interface wireless connect list&gt; add area-prefix=&lt;br /&gt;&lt;br /&gt;For example stations with area-prefix="area1" will connect to any AP with area code "area1.1" and "area1.2", but if you specify area prefix as "area1.1", then that station will only connect to APs with area code "area1.1"; you can subdivide areas even further.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-1162311452850645067?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/1162311452850645067/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=1162311452850645067' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1162311452850645067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1162311452850645067'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/wireless-area.html' title='Wireless Area'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-8270688738141061318</id><published>2008-04-08T15:00:00.001+07:00</published><updated>2008-04-08T15:00:40.097+07:00</updated><title type='text'>Layer2 VPN Server</title><content type='html'>Ethernet over IP (EoIP) Tunneling is a MikroTik RouterOS protocol that creates an Ethernet tunnel between two routers on top of an IP connection. A VLAN is a logical grouping that allows end users to communicate as if they were physically connected to a single isolated LAN, independent of the physical configuration of the network. &lt;br /&gt;&lt;br /&gt;It's required that you have switch that support 802.1Q VLAN and shows how to setup Layer 2 VPN Server. Configuration of switches not added coz it depends on how network you have. &lt;br /&gt;&lt;br /&gt;With this example we group devices on one or more LANs that are configured ,so that they can communicate as if they were attached to the same wire when in fact they are located on a number of different LAN segments. Using EoIP you can reach routers that are connected by wireless and with vlans we then segment network. Because VLANs are based on logical instead of physical connections, they are extremely flexible. So, in my network i added a few location that goes througt fiber optic and about 40 wireless locations. &lt;br /&gt;&lt;br /&gt;Server Side: &lt;br /&gt;   First, install latest  Mikrotik OS on computer with 2 ethernet intefaces.&lt;br /&gt;&lt;br /&gt;Now lets configure them. &lt;br /&gt;   /interface  set 0 name=ether1-internet  &lt;br /&gt;     set 1 name=ether2-trunk     &lt;br /&gt;  &lt;br /&gt;   /ip address  add address=195.101.10.5/29 interface=ether1-internet comment="" disabled=no&lt;br /&gt;     &lt;br /&gt;&lt;br /&gt;  Create Eoip interface for remote router1:&lt;br /&gt;&lt;br /&gt;  /interface eoip&lt;br /&gt;   add name=eoip-router1 tunnel-id=310 remote-address=196.200.50.5 comment="" disabled=no&lt;br /&gt;   &lt;br /&gt;  Create vlan for remote router1:&lt;br /&gt;  &lt;br /&gt;   /interface vlan &lt;br /&gt;   add name=vlan-router1 interface=ether2-trunk vlan-id=310 comment="" disabled=no&lt;br /&gt;  Now bridge eoip and vlan:&lt;br /&gt;  &lt;br /&gt;   /interface bridge &lt;br /&gt;   add name=bridge-to-router1&lt;br /&gt;   &lt;br /&gt;  /interface bridge port&lt;br /&gt;   add interface=eoip-router1 bridge=bridge-to-router1&lt;br /&gt;   add interface=vlan-router1 bridge=bridge-to-router1&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;Now we add configuration for remote router2 &lt;br /&gt;  Create Eoip interface for remote router2:&lt;br /&gt;&lt;br /&gt;  /interface eoip&lt;br /&gt;   add name="eoip-router2" tunnel-id=312 remote-address=196.200.50.6 comment="" disabled=no&lt;br /&gt;   &lt;br /&gt;  Create vlan for remote router2:&lt;br /&gt;  &lt;br /&gt;   /interface vlan &lt;br /&gt;   add name=vlan-router2 interface=ether2-trunk vlan-id=312 comment="" disabled=no&lt;br /&gt;  Now bridge eoip and vlan:&lt;br /&gt;  &lt;br /&gt;   /interface bridge &lt;br /&gt;   add name=bridge-to-router2 &lt;br /&gt;   &lt;br /&gt;  /interface bridge port&lt;br /&gt;   add interface=eoip-router2 bridge=bridge-to-router2 comment="" disabled=no&lt;br /&gt;   add interface=vlan-router2 bridge=bridge-to-router2 comment="" disabled=no &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Remote Router1 side: &lt;br /&gt;  /interface eoip &lt;br /&gt;   add name=eoip-client remote-address=195.101.10.5 tunnel-id=310 comment="" disabled=no&lt;br /&gt;  &lt;br /&gt;  /interface bridge &lt;br /&gt;   add name=bridge-to-router1 &lt;br /&gt;     &lt;br /&gt;  /interface bridge port&lt;br /&gt;   add interface=eoip-client bridge=bridge-to-router1 comment="" disabled=no&lt;br /&gt;   add interface=ether1 bridge=bridge-to-router1 comment="" disabled=no&lt;br /&gt;&lt;br /&gt;Remote Router2 side: &lt;br /&gt;   /interface eoip &lt;br /&gt;   add name=eoip-client remote-address=195.101.10.5 tunnel-id=312 comment="" disabled=no&lt;br /&gt;  &lt;br /&gt;  /interface bridge &lt;br /&gt;   add name=bridge-to-router2 &lt;br /&gt;     &lt;br /&gt;  /interface bridge port&lt;br /&gt;   add interface=eoip-client bridge=bridge-to-router2 comment="" disabled=no&lt;br /&gt;   add interface=ether1 bridge=bridge-to-router2 comment="" disabled=no&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Depends on the network you have , some modifications are required , and dont forget to add and configure conresponding VLANS on Allied Telesyn, Cisco , etc. switches. &lt;br /&gt;&lt;br /&gt;TIP: You can always add some address to bridge, just to check if there is connectivity to remote router with ping command. &lt;br /&gt;&lt;br /&gt;Server side: /ip address &lt;br /&gt; add adress=192.168.100.1/30 interface=bridge-to-router1 comment="" disabled=no&lt;br /&gt;&lt;br /&gt;Remote router side: /ip address &lt;br /&gt; add address=192.168.100.2/30 interface=bridge-to-router1 comment="" disabled=no&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-8270688738141061318?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/8270688738141061318/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=8270688738141061318' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8270688738141061318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8270688738141061318'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/layer2-vpn-server.html' title='Layer2 VPN Server'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-4845477771384849278</id><published>2008-04-08T14:48:00.000+07:00</published><updated>2008-04-08T14:49:52.411+07:00</updated><title type='text'>OpenVPN</title><content type='html'>Generic &lt;br /&gt;[edit]&lt;br /&gt;Why to use OpenVPN ? &lt;br /&gt;&lt;br /&gt;OpenVPN has been ported to various platforms, including Linux and Windows, and it's configuration is throughout likewise on each of these systems, so it makes it easier to support and maintain. Also, OpenVPN is one of the few VPN protocols that can make use of a proxy, which might be handy sometimes.&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;Download OpenVPN &lt;br /&gt;&lt;br /&gt;Debian provides OpenVPN packages as part of the standard distribution, just install them by typing apt-get install openvpn.&lt;br /&gt;For a server, you want additionally to install the openssl package.&lt;br /&gt;For easy client access, you would want to install network-manager, network-manager-openvpn and network-manager-gnome or network-manager-kde. This is a nice gui for handling wired and wireless network connections, connections via openvpn and cisco vpn (vpnc) and ppp connections (like a regular or 3g modem for example).&lt;br /&gt;&lt;br /&gt;RouterOS requires v3.x and you will need to install and enable the ppp package. There is one limitation to using OpenVPN on the RouterOS platform: currently only tcp is supported. udp will not work.&lt;br /&gt;&lt;br /&gt;For Windows you probably also want the GUI, that allows you to choose and activate certain VPN configuration from a simple click in the systray. A complete package for installation of OpenVPN incl. OpenVPN GUI can be downloaded at http://www.openvpn.se/download.html .&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;Certificates &lt;br /&gt;&lt;br /&gt;OpenVPN works with SSL certificates. You can either use http://cacert.org to issue these or use the easy-rsa scripts, that come with most OpenVPN distributions. In Debian these scripts can be found in the directory /usr/share/doc/openvpn/examples/easy-rsa. Please read the README.gz file for the usage. On RouterOS, all you have to do is to upload them via ftp (ca certificate and router certificate and private key) and import them with /certificate import .&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;Naming Linux/Windows vs. RouterOS &lt;br /&gt;&lt;br /&gt;There are two interface types within OpenVPN, that are used. &lt;br /&gt;tun, RouterOS defines this as ip. &lt;br /&gt;tap, which is needed for bridge mode gateways. RouterOS defines this as ethernet. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;A few comments &lt;br /&gt;&lt;br /&gt;The configuation files here are fully layed out for Debian and Ubuntu. If you're using something else, you'll have to do your own research, what you need. Hope they'll give a guideline.&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;Server configuration &lt;br /&gt;[edit]&lt;br /&gt;Seperate segment for VPN and destination network &lt;br /&gt;[edit]&lt;br /&gt;RouterOS &lt;br /&gt;[edit]&lt;br /&gt;The network configuration of your box: &lt;br /&gt;/ip address add address=10.15.30.31/24 interface=ether1 comment=Lan &lt;br /&gt;/ip address add address=189.64.0.2/24 interface=ether2 comment=Internet &lt;br /&gt;/ip route add dst-address=10.0.0.0/8 gateway=10.15.30.5 comment=Wan&lt;br /&gt;/ip route add gateway=189.64.0.1 comment=Internet&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Lan and Wan are the internal networks, Internet is obviously the Internet.&lt;br /&gt;If NAT/masquerading is needed, this will do the job: &lt;br /&gt;/ip firewall nat add chain=srcnat  out-interface=ether2 action=masquerade&lt;br /&gt;[edit]&lt;br /&gt;Define an IP pool: &lt;br /&gt; /ip pool add name=ovpn-pool ranges=10.15.32.34-10.15.32.38&lt;br /&gt;&lt;br /&gt;This pool is used for the OpenVPN clients. &lt;br /&gt;[edit]&lt;br /&gt;Define a profile: &lt;br /&gt;/ppp profile &lt;br /&gt;add change-tcp-mss=default comment="" local-address=10.15.32.33 \&lt;br /&gt;name="your_profile" only-one=default remote-address=ovpn-pool \&lt;br /&gt;use-compression=default use-encryption=required use-vj-compression=default&lt;br /&gt;[edit]&lt;br /&gt;Add a vpn user: &lt;br /&gt;/ppp secret &lt;br /&gt;add caller-id="" comment="" disabled=no limit-bytes-in=0 \&lt;br /&gt;limit-bytes-out=0 name="username" password="password" \&lt;br /&gt;routes="" service=any&lt;br /&gt;[edit]&lt;br /&gt;OpenVPN server configuration: &lt;br /&gt;/interface ovpn-server server &lt;br /&gt;set auth=sha1,md5 certificate=router_cert \&lt;br /&gt;cipher=blowfish128,aes128,aes192,aes256 default-profile=your_profile \&lt;br /&gt;enabled=yes keepalive-timeout=disabled max-mtu=1500 mode=ip netmask=29 \&lt;br /&gt;port=1194 require-client-certificate=no&lt;br /&gt;&lt;br /&gt;Bug: There is currently a bug in the implementation of OpenVPN in RouterOS, so require-client-certificate has to be set to no. Otherwise you'll end up with TLS errors.&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;Firewall &lt;br /&gt;&lt;br /&gt;If you have a firewall defined, that denies access, you would want to allow access to OpenVPN: &lt;br /&gt;/ip firewall filter &lt;br /&gt;add action=accept chain=input comment="OpenVPN" disabled=no dst-port=1194 protocol=tcp&lt;br /&gt;[edit]&lt;br /&gt;Default Route &lt;br /&gt;&lt;br /&gt;I haven't figured out, how to redistribute the default route from the OpenVPN server, so you'll have to add it yourself on the client by specifying the add-default-route option (if you have a RouterOS client). &lt;br /&gt;If you have a Linux or a Windows client, you can use the route-up dyrective. Place it on your OpenVPN configuration (client) file with a command in append, and OpenVPN will execute it when the default route comes up. &lt;br /&gt;For example, if you want to add a static route for 192.168.0.0 (obviously this net are on the remote side) through your OpenVPN gateway (IP 10.15.30.31), you have to add for Linux: &lt;br /&gt;route-up "route add -net 192.168.0.0 netmask 255.255.255.0 gw 10.15.30.31" &lt;br /&gt;or, for Windows: &lt;br /&gt;route-up "route add 192.168.0.0 mask 255.255.255.0 10.15.30.31" &lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;/etc/network/interfaces: &lt;br /&gt;iface eth0 inet static&lt;br /&gt;       address 10.15.30.31&lt;br /&gt;       netmask 255.255.255.0&lt;br /&gt;       network 10.15.30.0&lt;br /&gt;       broadcast 10.15.30.255&lt;br /&gt;       up /sbin/route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.15.30.5&lt;br /&gt;#&lt;br /&gt;iface eth1 inet static&lt;br /&gt;       address 189.64.15.2&lt;br /&gt;       netmask 255.255.255.0&lt;br /&gt;       gateway 189.64.15.1&lt;br /&gt;       up echo "1" &gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;&lt;br /&gt;eth0 is the network, that we want to get access to. eth1 is our outside interface. &lt;br /&gt;&lt;br /&gt;/etc/openvpn/gw.conf: &lt;br /&gt;port 1194&lt;br /&gt;proto tcp&lt;br /&gt;dev tun&lt;br /&gt;ca keys/ca.crt&lt;br /&gt;cert keys/vpngate.crt&lt;br /&gt;key keys/vpngate.key&lt;br /&gt;dh keys/dh1024.pem&lt;br /&gt;server 10.15.32.32 255.255.255.224&lt;br /&gt;ifconfig-pool-persist ipp.txt&lt;br /&gt;keepalive 10 120&lt;br /&gt;cipher none&lt;br /&gt;#comp-lzo&lt;br /&gt;user nobody&lt;br /&gt;group nogroup&lt;br /&gt;persist-key&lt;br /&gt;persist-tun&lt;br /&gt;status /var/log/openvpn/vpngate-status.log&lt;br /&gt;verb 3&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you want to push a route to the client, this can be added: &lt;br /&gt;push "route 10.0.0.0 255.0.0.0 10.15.32.33"&lt;br /&gt;&lt;br /&gt;For a default gw to the client, usually, this is added: &lt;br /&gt;push "redirect-gateway"&lt;br /&gt;&lt;br /&gt;With RouterOS, this has no effect, whatsover, so if you want to push the default route from the server, please add: &lt;br /&gt;push "route 0.0.0.0 0.0.0.0 10.15.32.33"&lt;br /&gt;&lt;br /&gt;And to tell the client, what DNS servers to use, this will do the job: &lt;br /&gt;push "dhcp-option DNS 10.15.15.10"&lt;br /&gt;push "dhcp-option DNS 10.15.30.10"&lt;br /&gt;[edit]&lt;br /&gt;Bridge mode &lt;br /&gt;[edit]&lt;br /&gt;RouterOS &lt;br /&gt;[edit]&lt;br /&gt;Create the bridge &lt;br /&gt;/interface bridge add name=vpn-bridge&lt;br /&gt;/interface bridge port add interface=ether1 bridge=vpn-bridge&lt;br /&gt;[edit]&lt;br /&gt;The network configuration of your box: &lt;br /&gt;/ip address add address=10.15.30.31/24 interface=vpn-bridge comment=Lan &lt;br /&gt;/ip address add address=189.64.0.2/24 interface=ether2 comment=Internet &lt;br /&gt;/ip route add dst-address=10.0.0.0/8 gateway=10.15.30.5 comment=Wan&lt;br /&gt;/ip route add gateway=189.64.0.1 comment=Internet&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Lan and Wan are the internal networks, Internet is obviously the Internet.&lt;br /&gt;If NAT/masquerading is needed, this will do the job: &lt;br /&gt;/ip firewall nat add chain=srcnat  out-interface=ether2 action=masquerade&lt;br /&gt;[edit]&lt;br /&gt;Define an IP pool: &lt;br /&gt; /ip pool add name=ovpn-pool ranges=10.15.30.32-10.15.30.40&lt;br /&gt;&lt;br /&gt;This pool is used for the OpenVPN clients. &lt;br /&gt;[edit]&lt;br /&gt;Define a profile: &lt;br /&gt;/ppp profile &lt;br /&gt;add change-tcp-mss=default comment="" bridge=vpn-bridge \&lt;br /&gt;name="your_profile" only-one=default remote-address=ovpn-pool \&lt;br /&gt;use-compression=default use-encryption=required use-vj-compression=default&lt;br /&gt;[edit]&lt;br /&gt;Add a vpn user: &lt;br /&gt;/ppp secret &lt;br /&gt;add caller-id="" comment="" disabled=no limit-bytes-in=0 \&lt;br /&gt;limit-bytes-out=0 name="username" password="password" \&lt;br /&gt;routes="" service=any&lt;br /&gt;[edit]&lt;br /&gt;OpenVPN server configuration: &lt;br /&gt;/interface ovpn-server server &lt;br /&gt;set auth=sha1,md5 certificate=router_cert \&lt;br /&gt;cipher=blowfish128,aes128,aes192,aes256 default-profile=your_profile \&lt;br /&gt;enabled=yes keepalive-timeout=disabled max-mtu=1500 mode=ethernet netmask=24 \&lt;br /&gt;port=1194 require-client-certificate=no&lt;br /&gt;&lt;br /&gt;Before using require-client-certificate option, CA and correct server/client certificate must be imported to both OpenVpn server and client.&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;OpenVPN server Instance &lt;br /&gt;&lt;br /&gt;At the moment, it looks like, that even though we've specified the vpn-bridge in the profile, RouterOS does not honour that fact. So we need to add a OpenVPN server Instance ourselfes for each user and add it to the bridge. (Not required after RC11). &lt;br /&gt;/interface ovpn-server add name=ovpn-username user=username&lt;br /&gt;/interface bridge port add interface=ovpn-username bridge=vpn-bridge&lt;br /&gt;&lt;br /&gt;This will result in, that the dynamically created openvpn server instance automatically get's assigned to this interface and thus the bridge. &lt;br /&gt;[edit]&lt;br /&gt;Firewall &lt;br /&gt;&lt;br /&gt;If you have a firewall defined, that denies access, you would want to allow access to OpenVPN: &lt;br /&gt;/ip firewall filter &lt;br /&gt;add action=accept chain=input comment="OpenVPN" disabled=no dst-port=1194 protocol=tcp&lt;br /&gt;[edit]&lt;br /&gt;Default Route &lt;br /&gt;&lt;br /&gt;I haven't figured out, how to redistribute the default route from the OpenVPN server, so you'll have to add it yourself on the client by specifying the add-default-route option (if you have a RouterOS client). &lt;br /&gt;If you have a Linux or a Windows client, you can use the route-up dyrective. Place it on your OpenVPN configuration (client) file with a command in append, and OpenVPN will execute it when the default route comes up. &lt;br /&gt;For example, if you want to add a static route for 192.168.0.0 (obviously this net are on the remote side) through your OpenVPN gateway (IP 10.15.30.31), you have to add for Linux: &lt;br /&gt;route-up "route add -net 192.168.0.0 netmask 255.255.255.0 gw 10.15.30.31" &lt;br /&gt;or, for Windows: &lt;br /&gt;route-up "route add 192.168.0.0 mask 255.255.255.0 10.15.30.31" &lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;Linux &lt;br /&gt;[edit]&lt;br /&gt;Packages &lt;br /&gt;&lt;br /&gt;These packages are needed: openvpn bridge-utils openssl&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;Configuration &lt;br /&gt;&lt;br /&gt;The configuration bits here are needed to set up a bridged gateway. &lt;br /&gt;&lt;br /&gt;/etc/network/interfaces: &lt;br /&gt; auto eth0 eth1 br0&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; # WAN interface&lt;br /&gt; iface eth0 inet static&lt;br /&gt;   address 10.15.30.31&lt;br /&gt;   netmask 255.255.255.0&lt;br /&gt;   network 10.15.30.0&lt;br /&gt;   broadcast 10.15.30.255&lt;br /&gt;   post-up route add -net 10.0.0.0/8 gw 10.15.30.5&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; # Internet interface&lt;br /&gt; iface eth1 inet static&lt;br /&gt;   address 189.64.15.2&lt;br /&gt;   netmask 255.255.255.252&lt;br /&gt;   gateway 189.64.15.1&lt;br /&gt;   dns-nameservers 195.222.111.222 80.190.248.148 91.189.64.189&lt;br /&gt;   pre-up echo 1 &gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;   up /sbin/iptables -t nat -A POSTROUTING -o $IFACE -j MASQUERADE&lt;br /&gt;   down /sbin/iptables -t nat -F&lt;br /&gt;   post-down echo 0 &gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; # OpenVPN interface&lt;br /&gt; iface br0 inet manual&lt;br /&gt;   up openvpn --mktun --dev tap0&lt;br /&gt;   up ifconfig eth0 0.0.0.0 promisc up&lt;br /&gt;   up ifconfig tap0 0.0.0.0 promisc up&lt;br /&gt;   up brctl addbr br0&lt;br /&gt;   up brctl setfd br0 0&lt;br /&gt;   up brctl stp br0 off&lt;br /&gt;   up brctl addif br0 eth0&lt;br /&gt;   up brctl addif br0 tap0&lt;br /&gt;   up ifconfig br0 10.15.30.31 netmask 255.255.255.0 up&lt;br /&gt;   up route add -net 10.0.0.0/8 gw 10.15.30.5&lt;br /&gt;   down ifconfig br0 down&lt;br /&gt;   down brctl delif br0 tap0&lt;br /&gt;   down brctl delif br0 eth0&lt;br /&gt;   down brctl delbr br0&lt;br /&gt;   down openvpn --rmtun --dev tap0&lt;br /&gt;   down ifconfig eth0 10.15.30.31 netmask 255.255.255.0 broadcast 10.15.30.255 network 10.15.30.0&lt;br /&gt;   down route add -net 10.0.0.0/8 gw 10.15.30.5&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/etc/openvpn/bridge-gw.conf &lt;br /&gt;port 1194&lt;br /&gt;proto udp&lt;br /&gt;dev tap0&lt;br /&gt;ca keys/ca.crt&lt;br /&gt;cert keys/bridge-gw.crt&lt;br /&gt;key keys/bridge-gw.key&lt;br /&gt;dh keys/dh1024.pem&lt;br /&gt;ifconfig-pool-persist ipp.txt&lt;br /&gt;server-bridge 10.15.30.31 255.255.255.0 10.15.30.100 10.15.30.119&lt;br /&gt;keepalive 10 120&lt;br /&gt;user nobody&lt;br /&gt;group nogroup&lt;br /&gt;persist-key&lt;br /&gt;persist-tun&lt;br /&gt;status openvpn-status-gw.log&lt;br /&gt;verb 3&lt;br /&gt;&lt;br /&gt;If you want to push a route to the client, this can be added: &lt;br /&gt;push "route 10.0.0.0 255.0.0.0 10.15.30.5"&lt;br /&gt;&lt;br /&gt;For a default gw to the client, usually, this is added: &lt;br /&gt;push "redirect-gateway"&lt;br /&gt;&lt;br /&gt;With RouterOS, this has no effect, whatsover, so if you want to push the default route from the server, please add: &lt;br /&gt;push "route 0.0.0.0 0.0.0.0 10.15.32.33"&lt;br /&gt;&lt;br /&gt;And to tell the client, what DNS servers to use, this will do the job: &lt;br /&gt;push "dhcp-option DNS 10.15.15.10"&lt;br /&gt;push "dhcp-option DNS 10.15.30.10"&lt;br /&gt;[edit]&lt;br /&gt;Client configuration&lt;br /&gt;[edit]&lt;br /&gt;RouterOS&lt;br /&gt;[edit]&lt;br /&gt;client of a routed server (tun) &lt;br /&gt;/interface ovpn-client \&lt;br /&gt;  name="ovpn-out1" connect-to=189.64.0.1 port=1194 mode=ip user="username" password="password" profile=default \&lt;br /&gt;  certificate=vpngate-client cipher=aes256 add-default-route=no&lt;br /&gt;[edit]&lt;br /&gt;client of a bridged server (tap) &lt;br /&gt;/interface ovpn-client \&lt;br /&gt;  name="ovpn-out1" connect-to=189.64.0.1 port=1194 mode=ethernet user="username" password="password" profile=default \&lt;br /&gt;  certificate=vpngate-client cipher=aes256 add-default-route=no&lt;br /&gt;[edit]&lt;br /&gt;Linux&lt;br /&gt;[edit]&lt;br /&gt;client of a routed server (tun) &lt;br /&gt;dev tun&lt;br /&gt;proto tcp-client&lt;br /&gt;&lt;br /&gt;remote openvpn.example.com 1194 # Remote OpenVPN Servername or IP address&lt;br /&gt;&lt;br /&gt;ca   keys/ca.crt&lt;br /&gt;cert keys/client.crt&lt;br /&gt;key  keys/client.key&lt;br /&gt;&lt;br /&gt;tls-client&lt;br /&gt;port 1194 &lt;br /&gt;&lt;br /&gt;user nobody&lt;br /&gt;group nogroup&lt;br /&gt;&lt;br /&gt;#comp-lzo # Do not use compression. It doesn't work with RouterOS (at least up to RouterOS 3.0rc9)&lt;br /&gt;&lt;br /&gt;# More reliable detection when a system loses its connection.&lt;br /&gt;ping 15&lt;br /&gt;ping-restart 45&lt;br /&gt;ping-timer-rem&lt;br /&gt;persist-tun&lt;br /&gt;persist-key&lt;br /&gt;&lt;br /&gt;# Silence  the output of replay warnings, which are a common false&lt;br /&gt;# alarm on WiFi networks.  This option preserves the  security  of&lt;br /&gt;# the replay protection code without the verbosity associated with&lt;br /&gt;# warnings about duplicate packets.&lt;br /&gt;mute-replay-warnings&lt;br /&gt;&lt;br /&gt;# Verbosity level.&lt;br /&gt;# 0 = quiet, 1 = mostly quiet, 3 = medium output, 9 = verbose&lt;br /&gt;verb 3&lt;br /&gt;&lt;br /&gt;cipher AES-256-CBC&lt;br /&gt;auth SHA1&lt;br /&gt;pull&lt;br /&gt;&lt;br /&gt;auth-user-pass auth.cfg &lt;br /&gt;&lt;br /&gt;The file auth.cfg holds your username/password combination. On the first line must be the username and on the second line your password. &lt;br /&gt;username&lt;br /&gt;password&lt;br /&gt;[edit]&lt;br /&gt;client of a bridged server (tap) &lt;br /&gt;&lt;br /&gt;Please replace dev tun with dev tap. Otherwise the configuration on the bridged client is exactly the same as the routed client.&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;Windows&lt;br /&gt;[edit]&lt;br /&gt;client of a bridged server (tap) &lt;br /&gt;proto tcp-client&lt;br /&gt;&lt;br /&gt;remote openvpn.example.com 1194 # Remote OpenVPN Servername or IP address&lt;br /&gt;dev tap&lt;br /&gt;&lt;br /&gt;nobind&lt;br /&gt;persist-key&lt;br /&gt;&lt;br /&gt;tls-client&lt;br /&gt;ca ca.crt # Root certificate in the same directory as this configuration file.&lt;br /&gt;&lt;br /&gt;ping 10&lt;br /&gt;verb 3&lt;br /&gt;&lt;br /&gt;cipher AES-256-CBC&lt;br /&gt;auth SHA1&lt;br /&gt;pull&lt;br /&gt;&lt;br /&gt;auth-user-pass auth.cfg&lt;br /&gt;&lt;br /&gt;The file auth.cfg holds your username/password combination. On the first line must be the username and on the second line your password. &lt;br /&gt;username&lt;br /&gt;password&lt;br /&gt;&lt;br /&gt;Alternatively, if you don't specify the filename the client will prompt for the details. &lt;br /&gt;[edit]&lt;br /&gt;Additional tweaks &lt;br /&gt;[edit]&lt;br /&gt;Disable encryption &lt;br /&gt;&lt;br /&gt;If you just want to use OpenVPN for providing people with access to the internet through the WAN, encryption just adds overhead to the traffic. In this case it really isn't needed and would just affect the bandwidth available in the WAN. &lt;br /&gt;&lt;br /&gt;Add this to your configuration: &lt;br /&gt;&lt;br /&gt; cipher none&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This should be done both on server and clients. It disables the encryption and leaves you with a plain, unencrypted ip tunnel.&lt;br /&gt;&lt;br /&gt;For RouterOS the syntax is: &lt;br /&gt; /interface ovpn-[client|server] set &lt;interface-name&gt; auth=sha1 cipher=none&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-4845477771384849278?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/4845477771384849278/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=4845477771384849278' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/4845477771384849278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/4845477771384849278'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/openvpn.html' title='OpenVPN'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-6724540800901860806</id><published>2008-04-08T14:47:00.000+07:00</published><updated>2008-04-08T14:48:22.775+07:00</updated><title type='text'>VPN with Virtual Routing and Forwarding / Mikrotik and Cisco</title><content type='html'>This example shows how to setup an VPN using Virtual Routing and Forwarding (VRF), Virtual Routing and Forwarding (VRF) is a technology used in computer networks that allows multiple instances of a routing table to co-exist within the same router at the same time. Because the routing instances are independent, the same or overlapping IP addresses can be used without conflicting with each other. In this example you can find setup between Mikrotik and Cisco routers. Below are the steps to complete the configuration. &lt;br /&gt;&lt;br /&gt;First should configure a Tunnel Interface on Mikrotik Router1 and Router2 &lt;br /&gt;&lt;br /&gt;Router1: &lt;br /&gt;  / interface ipip&lt;br /&gt;  add name="tunnel" local-address=218.100.100.29 remote-address=218.100.98.5 comment="" disabled=no&lt;br /&gt;&lt;br /&gt;Router2: &lt;br /&gt;  / interface ipip&lt;br /&gt;  add name="tunnel" local-address=218.100.100.30 remote-address=218.100.98.5 comment="" disabled=no&lt;br /&gt;&lt;br /&gt;After all interfaces are configured, we should asign IP addresses for interfaces on Router1 and Router2 &lt;br /&gt;&lt;br /&gt;Router1: &lt;br /&gt;    add address=218.100.100.29/27 network=218.100.100.0 broadcast=218.100.100.31 interface=uplink comment="" disabled=no &lt;br /&gt;    add address=192.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether1 comment="" disabled=no &lt;br /&gt;    add address=172.16.1.1/30 network=172.16.1.0 broadcast=172.16.1.3 interface=tunnel comment="" disabled=no&lt;br /&gt;&lt;br /&gt;Router2: &lt;br /&gt;    add address=218.100.100.30/27 network=218.100.100.0 broadcast=218.100.100.31 interface=uplink comment="" disabled=no &lt;br /&gt;    add address=192.168.2.1/24 network=192.168.2.0 broadcast=192.168.2.255 interface=ether1 comment="" disabled=no &lt;br /&gt;    add address=172.16.1.5/30 network=172.16.1.4 broadcast=172.16.1.7 interface=tunnel comment="" disabled=no&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;On Cisco router create VRF instance : &lt;br /&gt;   cisco#conf t&lt;br /&gt;   cisco(config)#ip vrf TEST&lt;br /&gt;   cisco(config-vrf)#rd 10:10&lt;br /&gt;   cisco(config-vrf)#end&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;Create interface on Router1 and add to vrf TEST: &lt;br /&gt;   cisco#conf t&lt;br /&gt;   cisco(config)#interface Tunnel 900&lt;br /&gt;   cisco(config-if)#ip vrf forwarding TEST&lt;br /&gt;   cisco(config-if)#description Tunnel_to_Mikrotik_router1&lt;br /&gt;   cisco(config-if)#tunnel destination &lt;IP_Adress_router1&gt;        &lt;br /&gt;   cisco(config-if)#tunnel source Loopback1 &lt;br /&gt;   cisco(config-if)#load-interval 30&lt;br /&gt;   cisco(config-if)#tunnel mode ipip&lt;br /&gt;   cisco(config-if)#tunnel path-mtu-discovery&lt;br /&gt;   cisco(config-if)#ip address 172.16.1.2 255.255.255.0&lt;br /&gt;   cisco(config-if)#end&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create Interface on Router2 and add to vrf TEST: &lt;br /&gt;   cisco#conf t&lt;br /&gt;   cisco(config)#interface Tunnel 901&lt;br /&gt;   cisco(config-if)#ip vrf forwarding TEST&lt;br /&gt;   cisco(config-if)#description Tunnel_to_Mikrotik_router2&lt;br /&gt;   cisco(config-if)#tunnel destination &lt;IP_Adress_router2&gt;        &lt;br /&gt;   cisco(config-if)#tunnel source Loopback1 &lt;br /&gt;   cisco(config-if)#load-interval 30&lt;br /&gt;   cisco(config-if)#tunnel mode ipip&lt;br /&gt;   cisco(config-if)#tunnel path-mtu-discovery&lt;br /&gt;   cisco(config-if)#ip address 172.16.1.6 255.255.255.0&lt;br /&gt;   cisco(config-if)#end&lt;br /&gt;&lt;br /&gt;Set up route and some rules on Mikrotik and Cisco &lt;br /&gt;&lt;br /&gt;Router1: &lt;br /&gt;    /ip firewall mangle&lt;br /&gt;      add chain=prerouting action=mark-routing new-routing-mark=tun passthrough=yes &lt;br /&gt;      in-interface=ether1 src-address=192.168.1.0/24 disabled=no &lt;br /&gt;    /ip route rule&lt;br /&gt;     add  add routing-mark=tun action=lookup table=tun &lt;br /&gt;    /ip route &lt;br /&gt;     add dst-address=192.168.2.0/24 gateway=172.16.1.2 routing-mark=tun&lt;br /&gt;&lt;br /&gt;Router2: &lt;br /&gt;     /ip firewall mangle&lt;br /&gt;      add chain=prerouting action=mark-routing new-routing-mark=tun passthrough=yes &lt;br /&gt;      in-interface=ether1 src-address=192.168.2.0/24 disabled=no &lt;br /&gt;    /ip route rule&lt;br /&gt;     add  add routing-mark=tun action=lookup table=tun &lt;br /&gt;    /ip route &lt;br /&gt;     add dst-address=192.168.1.0/24 gateway=172.16.1.6 routing-mark=tun     &lt;br /&gt;&lt;br /&gt;Cisco Router: &lt;br /&gt;      cisco#conf t&lt;br /&gt;      cisco(config)#ip ro vrf TEST 192.168.1.0 255.255.255.0 Tunnel900&lt;br /&gt;      cisco(config)#ip ro vrf TEST 192.168.2.0 255.255.255.0 Tunnel901&lt;br /&gt;      cisco(config)#end&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It can be done vpn directly from Router1 to Router2, but when you have a lot customers with a lot routers and many of them have same address space , this is a great and easy solution. &lt;br /&gt;&lt;br /&gt;All adresses are for example only.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-6724540800901860806?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/6724540800901860806/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=6724540800901860806' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/6724540800901860806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/6724540800901860806'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/vpn-with-virtual-routing-and-forwarding.html' title='VPN with Virtual Routing and Forwarding / Mikrotik and Cisco'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-1264814507141913068</id><published>2008-04-08T14:46:00.000+07:00</published><updated>2008-04-08T14:47:38.628+07:00</updated><title type='text'>IPSec VPN with Dynamic Routing / Mikrotik and Cisco</title><content type='html'>This example shows how to setup an IPSec VPN using dynamic routing protocol (RIP), it can be use also another protocol. In this exaple you can find setup between Mikrotik and Cisco routers, but it can be done also just between Mikrotik routers, but to be more colorfull I decided to use Mikrotik and Cisco. Below are the steps to complete the configuration of IPSec VPN with Dynamic Routing. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;Mikrotik RouterOS &lt;br /&gt;&lt;br /&gt;If you are using ROS v3.0 or above, be sure to check the end of this list to see a list of necessary mod. &lt;br /&gt;&lt;br /&gt;First should configure a Tunnel Interface: &lt;br /&gt;   / interface ipip &lt;br /&gt;   add name="Tunnel1" mtu=1480 local-address=10.10.1.100 remote-address=10.10.1.200 comment="" disabled=no&lt;br /&gt;&lt;br /&gt;After that all interfaces are configured, than should asign IP addresses for interfaces: &lt;br /&gt;   / ip address&lt;br /&gt;   add address=10.10.1.100/24 network=10.10.1.0 broadcast=10.10.1.255 interface=WAN comment="" disabled=no &lt;br /&gt;   add address=192.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 interface=LAN comment="" disabled=no &lt;br /&gt;   add address=172.16.0.1/30 network=172.16.0.0 broadcast=192.168.0.3 interface=Tunnel1 comment="" disabled=no&lt;br /&gt;&lt;br /&gt;Enable Routing in Mikrotik Router, in this case RIP: &lt;br /&gt;  / routing rip &lt;br /&gt;  set redistribute-static=no redistribute-connected=no redistribute-ospf=no redistribute-bgp=no metric-static=1 \&lt;br /&gt;  metric-connected=1  metric-ospf=1 metric-bgp=1 update-timer=30s timeout-timer=3m garbage-timer=2m &lt;br /&gt;  / routing rip interface&lt;br /&gt;  add interface=Tunnel1 receive=v2 send=v2 authentication=none authentication-key="" prefix-list-in="" prefix-list-out=""&lt;br /&gt;  / routing rip neighbor &lt;br /&gt;  add address=172.16.0.2 &lt;br /&gt;  / routing rip network &lt;br /&gt;  add address=192.168.1.0/24&lt;br /&gt;  add address=172.16.0.0/30&lt;br /&gt;&lt;br /&gt;IPSec setup, here should be defined the ipsec policy, peer and proposal. Make sure that policy should not have enabled option tunnel, in this case tunel should be set to NO, because it will be used the transport mode of IPSec not the tunnel mode: &lt;br /&gt;  / ip ipsec proposal &lt;br /&gt;  add name="IPSec" auth-algorithms=md5 enc-algorithms=3des lifetime=30m lifebytes=0 pfs-group=modp1024 disabled=no&lt;br /&gt;  / ip ipsec peer&lt;br /&gt;  add address=10.10.1.200 secret="ipsec" generate-policy=no exchange-mode=main send-initial-contact=yes \&lt;br /&gt;  proposal-check=obey   hash-algorithm=md5 enc-algorithm=3des dh-group=modp1024 lifetime=1d lifebytes=0 disabled=no&lt;br /&gt;  / ip ipsec policy &lt;br /&gt;  add src-address=10.10.1.100/32:any dst-address=10.10.1.200/32:any protocol=all action=encrypt level=require \&lt;br /&gt;  ipsec-protocols=esp  tunnel=no sa-src-address=10.10.1.100 sa-dst-address=10.10.1.200 \&lt;br /&gt;  proposal=IPSec manual-sa=none dont-fragment=clear disabled=no&lt;br /&gt;&lt;br /&gt;In V3.0 the bolded line will change on: &lt;br /&gt;  / routing rip interface&lt;br /&gt;  add interface=Tunnel1 receive=v2 send=v2 authentication=none authentication-key="" in-prefix-list="" out-prefix-list=""&lt;br /&gt;  / ip ipsec proposal&lt;br /&gt;  add name="IPSec" auth-algorithms=md5 enc-algorithms=3des lifetime=30m pfs-group=modp1024 disabled=no&lt;br /&gt;  / ip ipsec peer&lt;br /&gt;  add address=10.10.1.200/32:500 secret="ipsec" generate-policy=no exchange-mode=main send-initial-contact=yes \&lt;br /&gt;  proposal-check=obey   hash-algorithm=md5 enc-algorithm=3des dh-group=modp1024 lifetime=1d lifebytes=0 disabled=no&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;Cisco IOS &lt;br /&gt;&lt;br /&gt;Cisco Interfaces and addresses: &lt;br /&gt;  FastEthernet 0/0&lt;br /&gt;   description *** WAN ***&lt;br /&gt;   ip address 10.10.1.200 255.255.255.0&lt;br /&gt;   crypto map vpn&lt;br /&gt;  FastEthernet 0/1&lt;br /&gt;   description *** LAN ***&lt;br /&gt;   ip address 192.168.2.1 255.255.255.0&lt;br /&gt;&lt;br /&gt;Cisco Tunnel Interface: &lt;br /&gt;  interface Tunnel1&lt;br /&gt;  description **Cisco Peer**&lt;br /&gt;  ip address 172.16.0.2 255.255.255.252&lt;br /&gt;  no ip redirects&lt;br /&gt;  no ip unreachables&lt;br /&gt;  no ip proxy-arp&lt;br /&gt;  ip mtu 1480&lt;br /&gt;  ip rip v2-broadcast&lt;br /&gt;  ip tcp adjust-mss 1400&lt;br /&gt;  load-interval 30&lt;br /&gt;  tunnel source 10.10.1.200&lt;br /&gt;  tunnel destination 10.10.1.100&lt;br /&gt;  tunnel mode ipip&lt;br /&gt;  hold-queue 1024 in&lt;br /&gt;  hold-queue 1024 out&lt;br /&gt;&lt;br /&gt;Routing in Cisco: &lt;br /&gt;  router rip&lt;br /&gt;   version 2&lt;br /&gt;   timers basic 30 60 90 90&lt;br /&gt;   redistribute connected metric 1 route-map connected-to-rip&lt;br /&gt;   redistribute static metric 5 route-map static-to-rip&lt;br /&gt;   network 172.16.0.2&lt;br /&gt;   network 192.168.2.0&lt;br /&gt;   distribute-list prefix LAN out&lt;br /&gt;   no auto-summary&lt;br /&gt;&lt;br /&gt;Setup the prefix-list to match the Local subnet: &lt;br /&gt;  ip prefix-list LAN seq 10 permit 192.168.2.0/24&lt;br /&gt;&lt;br /&gt;Setup route-maps to match interfaces to be advertised by RIP: &lt;br /&gt;  route-map connected-to-rip permit 10&lt;br /&gt;  match interface FastEthernet0/0&lt;br /&gt; !&lt;br /&gt;  route-map static-to-rip permit 10&lt;br /&gt;  match ip address prefix-list LAN&lt;br /&gt;&lt;br /&gt;IPSec and Crypto setup in Cisco, also here trasnport mode of IPSec should be setup: &lt;br /&gt; !&lt;br /&gt;  crypto isakmp policy 1&lt;br /&gt;   encr 3des&lt;br /&gt;   hash md5&lt;br /&gt;   authentication pre-share&lt;br /&gt;   group 2&lt;br /&gt; !&lt;br /&gt;  crypto isakmp key ipsec address 0.0.0.0 0.0.0.0&lt;br /&gt; !&lt;br /&gt;  crypto ipsec security-association idle-time 600&lt;br /&gt; !&lt;br /&gt;  crypto ipsec transform-set vpn esp-3des esp-md5-hmac&lt;br /&gt;   mode transport&lt;br /&gt; !&lt;br /&gt;  crypto map vpn 1 ipsec-isakmp &lt;br /&gt;   description **To Mikrotik Peer**&lt;br /&gt;   set peer 10.10.1.100&lt;br /&gt;   set transform-set vpn &lt;br /&gt;   set pfs group2&lt;br /&gt;   match address mikrotik_peer&lt;br /&gt; !&lt;br /&gt;&lt;br /&gt;Setup access-list to match the IPSec peer: &lt;br /&gt;  ip access-list extended mikrotik_peer&lt;br /&gt;   permit ipinip host 10.10.1.200 host 10.10.1.100&lt;br /&gt;&lt;br /&gt;Type this in "enable" mode to view your routing table (after succesfull RIP update): &lt;br /&gt;  sh ip route&lt;br /&gt;&lt;br /&gt;or &lt;br /&gt;  sh ip rip database&lt;br /&gt;&lt;br /&gt;This example can be implemented also with another routing protocol like OSPF, and also very simply we can setup here a failover connection. Regarding the failover, the setup is very easy, all that we need is to create another set of tunnels via another ISP or gateway, but again the remote peer is the same router. Instead of the routing protocol for the second set of tunnels, it needs static routes to be configured, only that the static routes should have higher distance than the dynamic protocol. The idea is that, when the primary link will go down (dynamic routing distance=120) than the backup link becomes active (static routes distance=200), as soon as the primary link will come up, it will put the failover link in inactive mode.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-1264814507141913068?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/1264814507141913068/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=1264814507141913068' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1264814507141913068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1264814507141913068'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/ipsec-vpn-with-dynamic-routing-mikrotik.html' title='IPSec VPN with Dynamic Routing / Mikrotik and Cisco'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-835312769252151864</id><published>2008-04-08T14:45:00.002+07:00</published><updated>2008-04-08T14:46:39.783+07:00</updated><title type='text'>PPTPClient</title><content type='html'>PPtp Client / VPN &lt;br /&gt;&lt;br /&gt;Now lets configure the remote client to connect to the above VPN &lt;br /&gt;/interface pptp-client&lt;br /&gt;add name="vpn-to-server" connect-to: 192.168.x.x user="user-1" password="********" allow=mschap1,mschap2&lt;br /&gt;&gt;print&lt;br /&gt;Flags: X - disabled, R - running &lt;br /&gt;0 X  name="vpn-to-server" max-mtu=1460 max-mru=1460 connect-to=192.168.x.x &lt;br /&gt;     user="user-1" password="*******" profile=default-encryption &lt;br /&gt;     add-default-route=no allow=mschap1,mschap2&lt;br /&gt;&gt;enable 0&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-835312769252151864?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/835312769252151864/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=835312769252151864' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/835312769252151864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/835312769252151864'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/pptpclient.html' title='PPTPClient'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-836812133061320925</id><published>2008-04-08T14:45:00.001+07:00</published><updated>2008-04-08T14:45:53.408+07:00</updated><title type='text'>PPTPServer</title><content type='html'>A minimalistic HowTo for using a MT Router OS as PPTP-Server, based on 2.9.x. Use it on your own risk. &lt;br /&gt;&lt;br /&gt;I prefer bridge-groups as they are always up and one can add physical interfaces later. The arp=proxy-arp is important. &lt;br /&gt;&lt;br /&gt;N.B. 8 Oct 2007: "set gre disabled=no" is not active on RouterOS 3.0rc5 &lt;br /&gt;/ interface ethernet &lt;br /&gt;set ether1 name="ether1"&lt;br /&gt;&lt;br /&gt;/ interface bridge &lt;br /&gt;add name="lan" arp=proxy-arp&lt;br /&gt;&lt;br /&gt;/ interface bridge port &lt;br /&gt;add interface=ether1 bridge=lan&lt;br /&gt;&lt;br /&gt;/ ip address &lt;br /&gt;add address=192.168.0.1/24 interface=lan&lt;br /&gt;&lt;br /&gt;/ ip dns &lt;br /&gt;allow-remote-requests=yes&lt;br /&gt;&lt;br /&gt;/ ip firewall service-port &lt;br /&gt;set gre disabled=no &lt;br /&gt;set pptp disabled=no &lt;br /&gt;&lt;br /&gt;/ ip pool &lt;br /&gt;add name="pptp" ranges=192.168.0.200-192.168.0.229 &lt;br /&gt;&lt;br /&gt;/ ppp profile &lt;br /&gt;add name="pptp-in" local-address=192.168.0.1 remote-address=pptp use-encryption=required only-one=yes change-tcp-mss=yes dns-server=192.168.0.1&lt;br /&gt;&lt;br /&gt;/ interface pptp-server server &lt;br /&gt;set enabled=yes max-mtu=1460 max-mru=1460 authentication=chap,mschap1,mschap2 default-profile=pptp-in &lt;br /&gt;&lt;br /&gt;/ ppp secret &lt;br /&gt;add name="user-1" service=pptp password="******" profile=pptp-in&lt;br /&gt;add name="user-2" service=pptp password="******" profile=pptp-in&lt;br /&gt;# ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-836812133061320925?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/836812133061320925/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=836812133061320925' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/836812133061320925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/836812133061320925'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/pptpserver.html' title='PPTPServer'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-660961799145927613</id><published>2008-04-08T14:41:00.000+07:00</published><updated>2008-04-08T14:44:12.127+07:00</updated><title type='text'>Setting up an IPv6 tunnel via a tunnel broker</title><content type='html'>First sign up for your tunnel at http://www.tunnelbroker.net or an equivalent service. &lt;br /&gt;&lt;br /&gt;This will get you some information that looks like this: &lt;br /&gt;   Server IPv4 address: 216.66.80.26&lt;br /&gt;   Server IPv6 address: 2001:470:1111:11::1/64&lt;br /&gt;   Client IPv4 address: 222.222.222.222&lt;br /&gt;   Client IPv6 address: 2001:470:1111:11::2/64&lt;br /&gt;   Assigned /64: 2001:470:3333:33::/64&lt;br /&gt;&lt;br /&gt;Setup the 6to4 interface &lt;br /&gt;&lt;br /&gt;/interface 6to4 add mtu=1280 name=sixbone local-address=222.222.222.222 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Add your client IPv6 address to the new interface &lt;br /&gt;&lt;br /&gt;/ipv6 address add address=2001:470:1111:11::2/64 interface=sixbone &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Add a default IPv6 route via your tunnel &lt;br /&gt;&lt;br /&gt;/ipv6 route add dst-address=2000::/3 gateway=::216.66.80.26 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can now add your assigned IPv6 addresses as required.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-660961799145927613?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/660961799145927613/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=660961799145927613' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/660961799145927613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/660961799145927613'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/setting-up-ipv6-tunnel-via-tunnel.html' title='Setting up an IPv6 tunnel via a tunnel broker'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-1522586504308767931</id><published>2008-04-08T14:39:00.000+07:00</published><updated>2008-04-08T14:40:50.023+07:00</updated><title type='text'>Monitoring Network thru SMS Alerts</title><content type='html'>Monitor Network thru SMS Alerts &lt;br /&gt;&lt;br /&gt;Now it is possible to monitor your network using SMS alerts, while you are on move, you can have a close watch on your network via SMS on your mobile. &lt;br /&gt;&lt;br /&gt;To enable this facility, we need to attach GSM Modem with MikroTik. &lt;br /&gt;&lt;br /&gt;Configuration is as follows. &lt;br /&gt;&lt;br /&gt;STEP-1 &lt;br /&gt;Connect GSM Modem on serial or USB port of MikroTik Router.&lt;br /&gt;&lt;br /&gt;STEP-2 &lt;br /&gt;Configure Netwatch.&lt;br /&gt;/tool netwatch add&lt;br /&gt;host=192.168.1.1&lt;br /&gt;interval=10s &lt;br /&gt;timeout=150 &lt;br /&gt;up-script=”tool sms send serial0 "9909890908" message="Message " &lt;br /&gt;down-script=/tool sms send serial0 "9909890908" message="Message"&lt;br /&gt;&lt;br /&gt;Repeating the above steps you can configure your whole network, you need to change host, Interval, timeout &amp; message value according to your requirements&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-1522586504308767931?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/1522586504308767931/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=1522586504308767931' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1522586504308767931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1522586504308767931'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/monitoring-network-thru-sms-alerts.html' title='Monitoring Network thru SMS Alerts'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-1864220520681683202</id><published>2008-04-08T14:38:00.002+07:00</published><updated>2008-04-08T14:39:42.977+07:00</updated><title type='text'>Multi node management</title><content type='html'>This article, a work in progress, describes how to remotely monitor and manage one or more groups of bridged routers from a central location. The configuration instructions for RouterOS are based on WinBox, and are not intended for copy/paste. Use them as guidelines.&lt;br /&gt;Network Topology &lt;br /&gt;&lt;br /&gt;At the network monitoring location, you want to use the Dude or WinBox to monitor and manage all of the remote routers. &lt;br /&gt;&lt;br /&gt;Each remote bridged network looks like this: &lt;br /&gt;A cable modem or DSL modem, referred to in this article as The Modem, at a remote location &lt;br /&gt;A router, referred to in this article as the Gateway Router, connected to the Modem using a public IP address &lt;br /&gt;A bunch of routers wirelessly connected to the Gateway Router via WDS &lt;br /&gt;All of the routers having addresses on the same private subnet &lt;br /&gt;The Gateway Router is using NAT to masquerade the private subnet &lt;br /&gt;&lt;br /&gt;You might also have these complications: &lt;br /&gt;The Gateway Router might be running a Hotspot &lt;br /&gt;There might be a non-MikroTik firewall or router between the Modem and Gateway Router &lt;br /&gt;There might be several remote subnets &lt;br /&gt;[edit]&lt;br /&gt;Basic Solution - single remote subnet &lt;br /&gt;&lt;br /&gt;The following 2 procedures will setup a PPTP server on the gateway router and a PPTP client on the network management PC. &lt;br /&gt;&lt;br /&gt;When you activate the connection to the gateway router from your PC, the Dude or WinBox will appear to be on the private side of the gateway router, on the bridged subnet, and WinBox and/or the Dude will be able to connect directly to any router or all of them at once. Port forwarding is not needed. &lt;br /&gt;[edit]&lt;br /&gt;On the Gateway Router: &lt;br /&gt;ppp-&gt;pptp server-&gt;enabled (check all authentication boxes)&lt;br /&gt;ppp-&gt;secrets-&gt;add &lt;br /&gt;  name = &lt;make up a username&gt;&lt;br /&gt;  password = &lt;make up a password&gt;&lt;br /&gt;  service = pptp&lt;br /&gt;  local address = &lt;enter an unused IP address on the bridged subnet&gt;&lt;br /&gt;  remote address = &lt;enter a different unused IP address on the bridged subnet&gt;&lt;br /&gt;[edit]&lt;br /&gt;On the Windows PC where WinBox or the Dude is run: &lt;br /&gt;&lt;br /&gt;The following prodedure is for Windows XP SP2. &lt;br /&gt;Start-&gt;Control Panel-&gt;Network Connections-&gt;Create a new connection&lt;br /&gt;  Connect to the network at my workplace Next&gt;&lt;br /&gt;  Virtual Private Network Connection Next&gt;&lt;br /&gt;  Select a name to call this VPN  Next&gt;&lt;br /&gt;  Do not dial the initial connection Next&gt;&lt;br /&gt;  Enter the IP address of the PUBLIC side of the Gateway Router &lt;Finish&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;Solution with Hotspot on Gateway Router &lt;br /&gt;&lt;br /&gt;Since the other routers are behind the hotspot, they will not be able to communicate with the VPN tunnel in the Gateway Router, even though they are all on the same subnet. To permit access through the hotspot to each of the other routers, create an IP Binding entry as shown below for each router that is behind the hotspot. The IP addresses assigned to the routers can be outside the hotspot address pool if you prefer. &lt;br /&gt;For each router, whose private ip address is of the form 192.168.x.y:&lt;br /&gt;ip-&gt;hotspot-&gt;IP Bindings-&gt;Add&lt;br /&gt;  Address: 192.168.x.y&lt;br /&gt;  To Address: 192.168.x.y&lt;br /&gt;  Type: bypassed&lt;br /&gt;[edit]&lt;br /&gt;Solution with Firewall/Router between Modem and Gateway Router &lt;br /&gt;&lt;br /&gt;Assume the gateway router has IP address 192.168.a.b as viewed by the firewall/router. On the firewall/router between the Modem and the Gateway Router, do the following: &lt;br /&gt;Forward port 1723 (PPTP)  to IP address 192.168.a.b&lt;br /&gt;Forward protocol 47 (GRE) to IP address 192.168.a.b&lt;br /&gt;&lt;br /&gt;Note that some routers cannot forward protocols, only ports. In this case, you will NOT be able to create a VPN tunnel to the gateway router. Also, some routers can forward protocol 47, but the mechanism to do so is undocumented. There are also routers that will forward protocol 47 automatically when you forward port 1723. Consult the documentation for your router, and if you don't find any mention of PPTP or port 1723, try finding a user forum where this subject is discussed. &lt;br /&gt;[edit]&lt;br /&gt;Solution with multiple remote subnets &lt;br /&gt;&lt;br /&gt;Create a separate VPN tunnel to each bridged network&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-1864220520681683202?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/1864220520681683202/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=1864220520681683202' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1864220520681683202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1864220520681683202'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/multi-node-management.html' title='Multi node management'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-6436058266001493079</id><published>2008-04-08T14:38:00.001+07:00</published><updated>2008-04-08T14:38:50.885+07:00</updated><title type='text'>SNMP MRTG</title><content type='html'>1. Introduction &lt;br /&gt;&lt;br /&gt;In this text is described how to configure Mikrotik RouterOS and mrtg (FreeBSD). You must be root on nix mashine and ports collection is installed. Web server must be configured and running on BSD mashine. In this example Web server is Apache server. All information about mrtg and apache can be found at homepages: http://www.mrtg.org http://www.apache.org &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;2. RouterOS SNMP Configuration &lt;br /&gt;/ snmp &lt;br /&gt;set enabled=yes contact="your@mail.com" location="SomeCountry" &lt;br /&gt;/ snmp community &lt;br /&gt;set public name="public" address=192.168.0.5/32 read-access=yes&lt;br /&gt;&lt;br /&gt;Ip address 192.168.0.5 is address of BSD mashine where mrtg will be installed.&lt;br /&gt;[edit]&lt;br /&gt;2. MRTG Installation and Configuration &lt;br /&gt;&lt;br /&gt;Now we install and configure mrtg on BSD mashine. &lt;br /&gt;cd /usr/ports/net-mgmt/&lt;br /&gt;make &lt;br /&gt;make install&lt;br /&gt;Now we need to create configuration file for mrtg. It can be done automatically by cfgmaker program.192.168.0.1 is ip of RouterOS.&lt;br /&gt;cfgmaker public@192.168.0.1 --output=/usr/local/etc/mrtg.cfg&lt;br /&gt;&lt;br /&gt;Change WorkDir value in created mrtg file with text editor. WorkDir value specifies where html files will be created.&lt;br /&gt;It must be same as DocumentRoot value in apache configuration.&lt;br /&gt;&lt;br /&gt;For example: &lt;br /&gt;&lt;br /&gt;### Global Config Options&lt;br /&gt;&lt;br /&gt;#  for UNIX&lt;br /&gt;WorkDir: /usr/local/www/data/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;### Global Defaults&lt;br /&gt;&lt;br /&gt;#  to get bits instead of bytes and graphs growing to the right&lt;br /&gt;Options[_]: growright, bits&lt;br /&gt;&lt;br /&gt;EnableIPv6: no&lt;br /&gt;&lt;br /&gt;######################################################################&lt;br /&gt;# System: Mikrotik&lt;br /&gt;# Description: router&lt;br /&gt;# Contact: your@mail.com&lt;br /&gt;# Location: SomeCountry&lt;br /&gt;######################################################################&lt;br /&gt;&lt;br /&gt;Execute mrtg with your config to create html files.&lt;br /&gt;mrtg /usr/local/etc/mrtg.cfg &lt;br /&gt;Now in directory /usr/local/www/data are html files for every interface in MT.&lt;br /&gt;Add this string to crontab to update graphs automatically every 5 minutes&lt;br /&gt;*/5     *       *       *       *       root    mrtg /usr/local/etc/mrtg.cfg&lt;br /&gt;Now we can create 1 html file with graphs for all interfaces&lt;br /&gt;indexmaker /usr/local/etc/mrtg.cfg --output=/usr/local/www/data/index.html&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is a sample configuration to monitor the power on a RB333 router using MRTG and SNMP&lt;br /&gt;plotting the results with the correct scale and values:&lt;br /&gt;&lt;br /&gt;This should be entered into an existing mrtg.conf file replacing IP_Address with your IP address and MT with your community string&lt;br /&gt;&lt;br /&gt;### Input Voltage&lt;br /&gt;&lt;br /&gt;Target[IP_Address-voltage]:.1.3.6.1.4.1.14988.1.1.3.8.0&amp;.1.3.6.1.4.1.14988.1.1.3.8.0:MT@IP_Address&lt;br /&gt;AbsMax[IP_Address-voltage]: 200&lt;br /&gt;MaxBytes[IP_Address-voltage]: 200&lt;br /&gt;Title[IP_Address-voltage]: Input Voltage for a monitored -333&lt;br /&gt;PageTop[IP_Address-voltage]: &lt;H1&gt;Input Voltage RB333 being monitored &lt;/H1&gt;&lt;br /&gt; &lt;TABLE&gt;&lt;br /&gt;   &lt;TR&gt;&lt;TD&gt;System:&lt;/TD&gt;     &lt;TD&gt;RB333 being monitored&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;   &lt;TR&gt;&lt;TD&gt;Maintainer:&lt;/TD&gt; &lt;TD&gt;managee&lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt;   &lt;TR&gt;&lt;TD&gt;Description:&lt;/TD&gt;&lt;TD&gt;Voltage for Monitored 333 &lt;/TD&gt;&lt;/TR&gt;&lt;br /&gt; &lt;/TABLE&gt;&lt;br /&gt;Options[IP_Address-voltage]: gauge,growright,nopercent, noo, expscale&lt;br /&gt;YLegend[IP_Address-voltage]: Volts&lt;br /&gt;YTicsFactor[IP_Address-voltage]: 0.1&lt;br /&gt;Factor[IP_Address-voltage]: 0.1&lt;br /&gt;ShortLegend[IP_Address-voltage]: V&lt;br /&gt;LegendI[IP_Address-voltage]: Input Voltage &amp;nbsp&lt;br /&gt;[[Category: Monitoring]]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-6436058266001493079?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/6436058266001493079/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=6436058266001493079' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/6436058266001493079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/6436058266001493079'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/snmp-mrtg.html' title='SNMP MRTG'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-2593679153111637629</id><published>2008-04-08T14:36:00.002+07:00</published><updated>2008-04-08T14:38:13.259+07:00</updated><title type='text'>SNMP PHP</title><content type='html'>This small example is a PHP script, that uses SNMP to read signal strength values from wireless registration table and publish on web page. This example can be quickly transformed to read other values available for SNMP. To use scripts you need Mikrotik RouterOS, tested for version 2.9.xx (not yet for 3.0), PHP version 4 or 5, Web server (Apache, IIS). Configure Apache, and PHP only thing that needs attention is enabled snmp extension for PHP. In Windows in php.ini section Windows Extensions uncomment line &lt;br /&gt;extension=php_snmp.dll . &lt;br /&gt;&lt;br /&gt;Enable snmp on Mikrotik, and if needed, unblock UDP port 161. Copy scripts to WEB folder. Open index.php find line &lt;br /&gt;$ip="hostname";    //Change IP to your host names, address&lt;br /&gt;$mask_mac=false;        //Use to mask MAC adress (true / false );&lt;br /&gt;&lt;br /&gt;Replace hostname with IP address of Mikrotik, if you don’t want to see complete MAC address change false to true and now open the page in browser. You now see MAC address and signal strength. Page is auto refreshed every 10 seconds and reads values from SNMP. &lt;br /&gt;&lt;br /&gt;The PHP code, to be saved as a .php file: &lt;br /&gt;&lt;!-- /*******************************************************************&lt;br /&gt; * Mikrotik SNMP signal reader by Perica Nikolic&lt;br /&gt; * Contact npero2@gmail.com&lt;br /&gt; * This copyright notice MUST stay intact for use.&lt;br /&gt; *&lt;br /&gt; * This is free software; you can redistribute it and/or modify.&lt;br /&gt; * This script is distributed in the hope that it will be useful, but &lt;br /&gt; * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY &lt;br /&gt; * or FITNESS FOR A PARTICULAR PURPOSE.&lt;br /&gt; ********************************************************************/&lt;br /&gt; --&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;// Date in the past&lt;br /&gt;header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");&lt;br /&gt;&lt;br /&gt;// always modified&lt;br /&gt;header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");&lt;br /&gt; &lt;br /&gt;// HTTP/1.1&lt;br /&gt;header("Cache-Control: no-store, no-cache, must-revalidate");&lt;br /&gt;header("Cache-Control: post-check=0, pre-check=0", false);&lt;br /&gt;&lt;br /&gt;// HTTP/1.0&lt;br /&gt;header("Pragma: no-cache");&lt;br /&gt;?&gt;&lt;br /&gt;&lt;html&gt;&lt;br /&gt;&lt;head&gt;&lt;br /&gt;	&lt;META HTTP-EQUIV="REFRESH" CONTENT="10"&gt;&lt;br /&gt;	&lt;link href="stil.css" type="text/css" rel="stylesheet" /&gt;	&lt;br /&gt;&lt;/head&gt;&lt;br /&gt;&lt;body&gt;&lt;br /&gt;&lt;table align="center"&gt;&lt;br /&gt;&lt;caption class="maintable"&gt;Mikrotik signal list&lt;/caption&gt;&lt;br /&gt;&lt;th class="maintable"&gt;MAC&lt;/th&gt;&lt;br /&gt;&lt;th class="maintable"&gt;Signal &lt;br&gt;strenght(dBm)&lt;/th&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$ip="hostname or IP";    //Change IP to your host names, address&lt;br /&gt;$mask_mac=false;        //Use to mask MAC adress (true / false );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$tx_bytes_snmp = snmpwalkoid("$ip", "public", ".1.3.6.1.4.1.14988.1.1.1.2.1.3");  &lt;br /&gt;&lt;br /&gt;if (is_array($tx_bytes_snmp�&lt;br /&gt;&lt;br /&gt;		while (list($indexOID,$rssi)= each($tx_bytes_snmp�&lt;br /&gt;		{&lt;br /&gt;			$oidarray=explode(".",$indexOID);&lt;br /&gt;			$end_num=count($oidarray);&lt;br /&gt;			$mac="";&lt;br /&gt;			&lt;br /&gt;			for ($counter=2;$counter&lt;8;$counter++)&lt;br /&gt;			{&lt;br /&gt;				$temp=dechex($oidarray[$end_num-$counter]);&lt;br /&gt;				if ($oidarray[$end_num-$counter]&lt;16)&lt;br /&gt;						$temp="0".$temp;&lt;br /&gt;						&lt;br /&gt;				if �counter &lt;5) and $mask_mac)&lt;br /&gt;					$mac=":"."xx".$mac;&lt;br /&gt;				else &lt;br /&gt;				    if ($counter==7)&lt;br /&gt;				    	$mac=$temp.$mac;&lt;br /&gt;				    else &lt;br /&gt;			    		$mac=":".$temp.$mac;&lt;br /&gt;			}&lt;br /&gt;			&lt;br /&gt;			&lt;br /&gt;			$mac_oiu = substr(str_replace(":","-",$mac),0,8);&lt;br /&gt;			$mac=strtoupper($mac);&lt;br /&gt;			?&gt;&lt;br /&gt;			&lt;tr&gt;&lt;td class="maincolum"&gt;&lt;a href="http://standards.ieee.org/cgi-bin/ouisearch?&lt;?php echo ($mac_oiu); ?&gt;" target="_blank" class="tablelink"&gt;&lt;?php echo ($mac); ?&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;			&lt;td class="maincolum" align="center"&gt;&lt;?php echo ($rssi); ?&gt;&lt;/td&gt;&lt;br /&gt;			&lt;/tr&gt;&lt;br /&gt;			&lt;?php					&lt;br /&gt;		}&lt;br /&gt;	else &lt;br /&gt;	{&lt;br /&gt;	?&gt;&lt;br /&gt;	&lt;tr&gt;&lt;td colspan="2" class="warning"&gt;Please check SNMP settings and IP address&lt;/td&gt;&lt;/tr&gt;	&lt;br /&gt;	&lt;?php	&lt;br /&gt;	}&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-2593679153111637629?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/2593679153111637629/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=2593679153111637629' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/2593679153111637629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/2593679153111637629'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/snmp-php.html' title='SNMP PHP'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-8146817278156431247</id><published>2008-04-08T14:36:00.001+07:00</published><updated>2008-04-08T14:36:48.437+07:00</updated><title type='text'>NTH in RouterOS 3.x</title><content type='html'>In v3.0 it is a little different implementation of NTH. It has only two parameters 'every' and 'packet'. &lt;br /&gt;[edit]&lt;br /&gt;How it works in v3.0&lt;br /&gt;&lt;br /&gt;Every rule has its own counter. When rule receives packet counter for current rule is increased by one. If counter matches value of 'every' packet will be matched and counter will be set to zero. &lt;br /&gt;&lt;br /&gt;If passthrough is not set then packets will be marked as follows: &lt;br /&gt;first rule nth=2,1 rule will match every first packet of 2, hence, 50% of all the traffic that is matched by the rules &lt;br /&gt;second rule if passthrough=no will match ONLY 25% of traffic because in 3.0 you need only one rule to catch traffic not like 2.9 &lt;br /&gt;[edit]&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;Now it is possible to match 50% of all traffic only with one rule: &lt;br /&gt;/ip firewall mangle&lt;br /&gt;add action=mark-packet chain=prerouting new-packet-mark=AAA nth=2,1;&lt;br /&gt;&lt;br /&gt;If more than one rule is needed, then there are two ways to match packets: &lt;br /&gt;first rule sees all packets and matches 1/3 of all, second rule sees 2/3 of packets and matches 1/2, third rule sees and matches all packets that passed through first two rules ( 1/3 of all packets ). &lt;br /&gt;/ip firewall mangle &lt;br /&gt;add action=mark-packet chain=prerouting new-packet-mark=AAA nth=3,1 passthrough=no;&lt;br /&gt;add action=mark-packet chain=prerouting new-packet-mark=BBB nth=2,1 passthrough=no;&lt;br /&gt;add action=mark-packet chain=prerouting new-packet-mark=CCC ;&lt;br /&gt;all rules can see all packets and each rule matches every 3-rd packet. &lt;br /&gt;/ip firewall mangle &lt;br /&gt;add action=mark-packet chain=prerouting new-packet-mark=AAA nth=3,1 passthrough=yes;&lt;br /&gt;add action=mark-packet chain=prerouting new-packet-mark=BBB nth=3,2 passthrough=yes;&lt;br /&gt;add action=mark-packet chain=prerouting new-packet-mark=CCC nth=3,3 passthrough=yes;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-8146817278156431247?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/8146817278156431247/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=8146817278156431247' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8146817278156431247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8146817278156431247'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/nth-in-routeros-3x.html' title='NTH in RouterOS 3.x'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-8933207147390762776</id><published>2008-04-08T14:35:00.000+07:00</published><updated>2008-04-08T14:36:07.165+07:00</updated><title type='text'>Calea</title><content type='html'>Communications Assistance for Law Enforcement Act requires the routers in USA to have ability to intercept and log network traffic. RouterOS now provides this facility by means of firewall rules. RouterOS can also function as a data retention server if the additional calea package is installed.&lt;br /&gt;CALEA features included in RouterOS &lt;br /&gt;&lt;br /&gt;Multiple subject/multiple destination packet interception and streaming in following formats: &lt;br /&gt;Call Content Connection (CCC) Interface according to PKT-SP-ES-DCI-I01-060914 (PacketCable 2.0 PacketCable Electronic Surveillance Delivery Function to Collection Function Interface Specification) &lt;br /&gt;Call Content Connection (CCC) Interface according to ANSI/SCTE 24-13 2006 (IPCalblecom Electronic Surveillance Standard) that is approved method for Communication Content delivery to LEA according to ATIS-1000013.2007 (Lawfully Authorized Electronic Surveillance For Internet Access and Services) &lt;br /&gt;TZSP format - for reception with 'Ethereal', tcpdump, trafr (sniffer stream reader for linux) - http://www.mikrotik.com/download.html &lt;br /&gt;CALEA-server package &lt;br /&gt;accepts multiple CCC streams (identified by destination port/source address/case id) &lt;br /&gt;stores communication content according to "IP Network Access Intercept Requirements and Method"(FBI-WISPA draft) specified "full content" intercept requirements (without out-of-band events) &lt;br /&gt;stores communication content of multiple subjects/cases &lt;br /&gt;stores communication content in libpcap format &lt;br /&gt;new libpcap file based on different conditions (interval/size/packet count) &lt;br /&gt;generates hash for each pcap file (md5/sha1/sha256) &lt;br /&gt;Calea user &lt;br /&gt;&lt;br /&gt;Calea provided options are available only for specific RouterOS user, as Calea server configuration as "tap" configuration. Specific user should have 'sniff' policy enabled at RouterOS user configuration, &lt;br /&gt;/ user group set 0 policy=sniff&lt;br /&gt;&lt;br /&gt;sniff policy is enabled by default for "full" and "write" user groups. &lt;br /&gt;Intercepting Packet Flow&lt;br /&gt;&lt;br /&gt;The IP Firewall and Interface Bridge now have one additional section, &lt;br /&gt;firewall section to intercept packets that are going trough firewall &lt;br /&gt;/ ip firewall calea&lt;br /&gt;bridge section to intercept packets that are going trough bridge &lt;br /&gt;/ interface bridge calea&lt;br /&gt;&lt;br /&gt;Firewall and Bridge Calea menus contain same actions and matchers as "ip firewall filter" and "interface bridge filter", new avalailble actions: &lt;br /&gt;sniff - generates a tzsp stream that can be directed to any Wireshark (Ethereal) server &lt;br /&gt;sniff-pc - generates a Packet Cable stream that can be directed to a MikroTik RouterOS system with the calea package installed &lt;br /&gt;&lt;br /&gt;By selecting either action, the following options will be available: &lt;br /&gt;sniff-id (Packet Cable protocol only) - packet stream case ID, that can be used to differentiate between separate traffic sets (e.g., between different users; or between client traffic and server traffic) &lt;br /&gt;sniff-target - IP address of the data retention server &lt;br /&gt;sniff-target-port - UDP port that the data retention server is listening on &lt;br /&gt;Data Retention Server&lt;br /&gt;&lt;br /&gt;The calea package provides an additional tool menu - /tool calea, that allows to save certain incoming data streams to a file. The server will create separate files for each packet stream (one data file and one hash file, if configured). The files will not grow indefinitely, but rather util a certain limit, after which a new set of files will be created for that stream. The limit is specified in size and extent of time, whichever is reached first. &lt;br /&gt;&lt;br /&gt;Add a rule with the following properties: &lt;br /&gt;case-id - case ID set by the intercepting router &lt;br /&gt;case-name - case name is set on server to specify the folder, where intercepted data is stored &lt;br /&gt;intercept-ip - IP address of the intercepting router (IP address to receive the stream from) &lt;br /&gt;intercept-port - UDP port to listen on (port to receive the stream on) &lt;br /&gt;action - storage format (only pcap for now) &lt;br /&gt;pcap-file-stop-interval - maximal interval between creating new fileset, if size limit is not reached earlier &lt;br /&gt;pcap-file-stop-size - maximal filesize, in KiB &lt;br /&gt;pcap-file-stop-count - maximal packet count &lt;br /&gt;pcap-file-hash-method - hashing algorithm (md5, sha1 or sha256) for the data file (saved once the data file is completed and closed); no file is created if set to none &lt;br /&gt;Calea Server/Client Configuration Example &lt;br /&gt;&lt;br /&gt;Let's assume the particular network configuration, we need to intercept data from 192.168.0.10 Wireless Client and send it to the Calea Server located on Local Network:  &lt;br /&gt;Client Configuration for the Intercept &lt;br /&gt;&lt;br /&gt;Wireless Client is connected to Access Point, data interception has to be performed on Access Point for the particular network design. &lt;br /&gt;We have requirement to capture all data from the user Wireless Client with IP address of 192.168.0.10 We have to add two rules to make the interception, &lt;br /&gt;/ ip firewall calea add action=sniff-pc chain=forward sniff-id=100 sniff-target=10.9.1.250 sniff-target-port=5555 \&lt;br /&gt; src-address=192.168.0.10&lt;br /&gt;/ ip firewall calea add action=sniff-pc chain=forward sniff-id=100 sniff-target=10.9.1.250 sniff-target-port=5555 \&lt;br /&gt; dst-address=192.168.0.10&lt;br /&gt;&lt;br /&gt;All traffic going trough the router for specified src/dst addresses is intercepted and sent to Calea Server (sniff-target) with sniff-id=100 &lt;br /&gt;Calea package is not required for intercepting host. &lt;br /&gt;Calea Server Configuration &lt;br /&gt;Calea package is required for server. &lt;br /&gt;One rule is required to accept the data from the Access Point to receive all intercepted traffic from the Access Point, &lt;br /&gt;/ tool calea add action=pcap intercept-port=5555 case-id=100 intercept-ip=192.168.0.254&lt;br /&gt;&lt;br /&gt;Intercept-port and case-id should be equal on server and client side, intercept-ip is IP address of the intercepting router (Access Point). &lt;br /&gt;Calea server received information is available under 'file' menu.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-8933207147390762776?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/8933207147390762776/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=8933207147390762776' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8933207147390762776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8933207147390762776'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/calea.html' title='Calea'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-7427217630393141614</id><published>2008-04-08T14:33:00.002+07:00</published><updated>2008-04-08T14:35:09.314+07:00</updated><title type='text'>L7</title><content type='html'>layer7-protocol is a method of looking for patterns in connections. &lt;br /&gt;&lt;br /&gt;First, add Regexp strings to the protocols menu, to define strings you will be looking for. &lt;br /&gt;/ip firewall layer7-protocol add=&lt;br /&gt;&lt;br /&gt;Then, use the defined protocols in firewall: &lt;br /&gt;/ip firewall filter add layer7-protocol=&lt;br /&gt;&lt;br /&gt;RouterOS will look for these strings in all connections passing the firewall rule where you use this. As this is resource intensive, make sure to filter out all good traffic before it hits this rule. &lt;br /&gt;&lt;br /&gt;You can download a script with a list of common programs here (only for RouterOS v3 RC6). Pattern libraries can be found on the layer7 project page and on the protocol wiki.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-7427217630393141614?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/7427217630393141614/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=7427217630393141614' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/7427217630393141614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/7427217630393141614'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/l7.html' title='L7'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-2641368448213950688</id><published>2008-04-08T14:33:00.001+07:00</published><updated>2008-04-08T14:33:51.543+07:00</updated><title type='text'>How to Block Websites &amp; Stop Downloading Using Proxy</title><content type='html'>This example will explain you “How to Block Web Sites” &amp; “How to Stop Downloading”. I have use Web-Proxy test Package. &lt;br /&gt;&lt;br /&gt;First, Configure Proxy. &lt;br /&gt;/ip proxy&lt;br /&gt;enabled: yes&lt;br /&gt;src-address: 0.0.0.0&lt;br /&gt;port: 8080&lt;br /&gt;parent-proxy: 0.0.0.0:0&lt;br /&gt;cache-drive: system&lt;br /&gt;cache-administrator: "webmaster"&lt;br /&gt;max-disk-cache-size: none&lt;br /&gt;max-ram-cache-size: none&lt;br /&gt;cache-only-on-disk: no&lt;br /&gt;maximal-client-connections: 1000&lt;br /&gt;maximal-server-connections: 1000&lt;br /&gt;max-object-size: 512KiB&lt;br /&gt;max-fresh-time: 3d&lt;br /&gt;&lt;br /&gt;Now, Make it Transparent &lt;br /&gt;/ip firewall nat&lt;br /&gt;chain=dstnat protocol=tcp dst-port=80 action=redirect to-ports=8080&lt;br /&gt;&lt;br /&gt;Make sure that your proxy is NOT a Open Proxy &lt;br /&gt;/ip firewall filter&lt;br /&gt;chain=input in-interface=&lt;Your WAN Port&gt; src-address=0.0.0.0/0 protocol=tcp dst-port=8080 action=drop&lt;br /&gt;&lt;br /&gt;Now for Blocking Websites &lt;br /&gt;/ip proxy access&lt;br /&gt;dst-host=www.vansol27.com action=deny &lt;br /&gt;&lt;br /&gt;It will block website http://www.vansol27.com, We can always block the same for different networks by giving src-address. It will block for particular source address. &lt;br /&gt;&lt;br /&gt;We can also stop downloading files like.mp3, .exe, .dat, .avi,…etc. &lt;br /&gt;/ip proxy access&lt;br /&gt;path=*.exe action=deny &lt;br /&gt;path=*.mp3 action=deny &lt;br /&gt;path=*.zip action=deny &lt;br /&gt;path=*.rar action=deny.&lt;br /&gt;&lt;br /&gt;Try with this also &lt;br /&gt;/ip proxy access&lt;br /&gt;dst-host=:mail action=deny&lt;br /&gt;&lt;br /&gt;This will block all the websites contain word “mail” in url. &lt;br /&gt;&lt;br /&gt;Example: It will block www.hotmail.com, mail.yahoo.com, www.rediffmail.com &lt;br /&gt;&lt;br /&gt;ENJOY BLOCKING…….&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-2641368448213950688?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/2641368448213950688/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=2641368448213950688' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/2641368448213950688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/2641368448213950688'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/how-to-block-websites-stop-downloading.html' title='How to Block Websites &amp; Stop Downloading Using Proxy'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-8874835324272954919</id><published>2008-04-08T14:32:00.000+07:00</published><updated>2008-04-08T14:33:05.571+07:00</updated><title type='text'>Bruteforce login prevention (FTP &amp; SSH)</title><content type='html'>These are 2 basic scripts I use frequently that are from the forum (written by other users) &lt;br /&gt;&lt;br /&gt;allows only 10 FTP login incorrect answers per minute &lt;br /&gt;&lt;br /&gt;in /ip firewall filter &lt;br /&gt;add chain=input protocol=tcp dst-port=21 src-address-list=ftp_blacklist action=drop \&lt;br /&gt;comment="drop ftp brute forcers"&lt;br /&gt;&lt;br /&gt;add chain=output action=accept protocol=tcp content="530 Login incorrect" dst-limit=1/1m,9,dst-address/1m&lt;br /&gt;&lt;br /&gt;add chain=output action=add-dst-to-address-list protocol=tcp content="530 Login incorrect" \&lt;br /&gt;address-list=ftp_blacklist address-list-timeout=3h&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This will prevent a SSH brute forcer to be banned for 10 days after repetitive attempts. Change the timeouts as necessary. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;in /ip firewall filter &lt;br /&gt;add chain=input protocol=tcp dst-port=22 src-address-list=ssh_blacklist action=drop \&lt;br /&gt;comment="drop ssh brute forcers" disabled=no&lt;br /&gt;&lt;br /&gt;add chain=input protocol=tcp dst-port=22 connection-state=new \&lt;br /&gt;src-address-list=ssh_stage3 action=add-src-to-address-list address-list=ssh_blacklist \&lt;br /&gt;address-list-timeout=10d comment="" disabled=no&lt;br /&gt;&lt;br /&gt;add chain=input protocol=tcp dst-port=22 connection-state=new \&lt;br /&gt;src-address-list=ssh_stage2 action=add-src-to-address-list address-list=ssh_stage3 \&lt;br /&gt;address-list-timeout=1m comment="" disabled=no&lt;br /&gt;&lt;br /&gt;add chain=input protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage1 \&lt;br /&gt;action=add-src-to-address-list address-list=ssh_stage2 address-list-timeout=1m comment="" disabled=no&lt;br /&gt;&lt;br /&gt;add chain=input protocol=tcp dst-port=22 connection-state=new action=add-src-to-address-list \&lt;br /&gt;address-list=ssh_stage1 address-list-timeout=1m comment="" disabled=no&lt;br /&gt;&lt;br /&gt;If you want to block downstream access as well, you need to block the with the forward chain: &lt;br /&gt;add chain=forward protocol=tcp dst-port=22 src-address-list=ssh_blacklist action=drop \&lt;br /&gt;comment="drop ssh brute downstream" disabled=no&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-8874835324272954919?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/8874835324272954919/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=8874835324272954919' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8874835324272954919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8874835324272954919'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/bruteforce-login-prevention-ftp-ssh.html' title='Bruteforce login prevention (FTP &amp; SSH)'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-9009403986894158253</id><published>2008-04-08T14:30:00.000+07:00</published><updated>2008-04-08T14:32:26.336+07:00</updated><title type='text'>How to autodetect infected or spammer users and temporary block the SMTP output</title><content type='html'>Here can see in the solution which i invented and work excellent to autodetect and block SMTP viruses or spammers! &lt;br /&gt;&lt;br /&gt;Only create these 2 rules in firewall forward: &lt;br /&gt;/ip firewall filter&lt;br /&gt;&lt;br /&gt;add chain=forward protocol=tcp dst-port=25 src-address-list=spammer&lt;br /&gt;action=drop comment="BLOCK SPAMMERS OR INFECTED USERS"&lt;br /&gt;&lt;br /&gt;add chain=forward protocol=tcp dst-port=25 connection-limit=30,32 limit=50,5 action=add-src-to-address-list&lt;br /&gt;address-list=spammer address-list-timeout=1d comment="Detect and add-list SMTP virus or spammers"&lt;br /&gt;&lt;br /&gt;When an infected user is autodetected with a virus worm or doing spam, the user is added to a spammer list and block the STMP outgoing by 1 day, all the values can be adjusted for different networks types or at your convenience&lt;br /&gt;Logging detected users &lt;br /&gt;&lt;br /&gt;Next, to display a red Log each 30 minutes listing the detected infected or spammers users using hotspot, add the next script: &lt;br /&gt;/system script&lt;br /&gt;add name="spammers" source=":log error \"----------Users detected like \&lt;br /&gt;    SPAMMERS -------------\";&lt;br /&gt;\n:foreach i in \[/ip firewall address-list find \&lt;br /&gt;    list=spammer\] do={:set usser \[/ip firewall address-list get \$i \&lt;br /&gt;    address\];&lt;br /&gt;\n:foreach j in=\[/ip hotspot active find address=\$usser\] \&lt;br /&gt;    do={:set ip \[/ip hotspot active get \$j user\];&lt;br /&gt;\n:log error \$ip;&lt;br /&gt;\n:log \error \$usser} };" policy=ftp,read,write,policy,test,winbox&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-9009403986894158253?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/9009403986894158253/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=9009403986894158253' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/9009403986894158253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/9009403986894158253'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/how-to-autodetect-infected-or-spammer.html' title='How to autodetect infected or spammer users and temporary block the SMTP output'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-3912172754566283123</id><published>2008-04-08T14:29:00.000+07:00</published><updated>2008-04-08T14:30:40.055+07:00</updated><title type='text'>Forwarding a port to an internal IP</title><content type='html'>This will go on a 2.9.x mikrotik where you want to forward a port (tcp 5900) to an internal IP. 69.69.69.69 is the example wan IP, 192.168.1.101 is the desired internal destination. &lt;br /&gt;/ip firewall nat add chain=dstnat dst-address=69.69.69.69 protocol=tcp dst-port=5900 \action=dst-nat to-addresses=192.168.1.101 to-ports=5900&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-3912172754566283123?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/3912172754566283123/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=3912172754566283123' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3912172754566283123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3912172754566283123'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/forwarding-port-to-internal-ip.html' title='Forwarding a port to an internal IP'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-1716859227045896366</id><published>2008-04-08T14:27:00.002+07:00</published><updated>2008-04-08T14:29:05.870+07:00</updated><title type='text'>Dmitry on firewalling</title><content type='html'>MUM 2006 presentation on firewalling&lt;br /&gt;&lt;br /&gt;Presentation in PDF format &lt;br /&gt;[edit]&lt;br /&gt;Components of the filter&lt;br /&gt;protocol classifier &lt;br /&gt;invalid packet filter &lt;br /&gt;port-scan detector &lt;br /&gt;policy classifier &lt;br /&gt;application protocol filter &lt;br /&gt;TCP-specific filters &lt;br /&gt;application protocol specific filters &lt;br /&gt;[edit]&lt;br /&gt;Introduction&lt;br /&gt;&lt;br /&gt;There are two interfaces on our router: Local (for connecting internal network) and Public (connected to the Internet) &lt;br /&gt;[edit]&lt;br /&gt;Protocol classifier&lt;br /&gt;/ ip firewall mangle&lt;br /&gt;add chain=prerouting protocol=tcp connection-state=new action=jump jump-target=tcp-services&lt;br /&gt;add chain=prerouting protocol=udp connection-state=new action=jump jump-target=udp-services&lt;br /&gt;add chain=prerouting connection-state=new action=jump jump-target=other-services&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=20-21 action=mark-connection new-connection-mark=ftp passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=513-65535 dst-port=22 action=mark-connection new-connection-mark=ssh passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=23 action=mark-connection new-connection-mark=telnet passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=25 action=mark-connection new-connection-mark=smtp passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=53 dst-port=53 action=mark-connection new-connection-mark=dns passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=53 action=mark-connection new-connection-mark=dns passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=80 action=mark-connection new-connection-mark=http passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=110 action=mark-connection new-connection-mark=pop3 passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=113 action=mark-connection new-connection-mark=auth passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=119 action=mark-connection new-connection-mark=nntp passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=143 action=mark-connection new-connection-mark=imap passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=161-162 action=mark-connection new-connection-mark=snmp passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=443 action=mark-connection new-connection-mark=https passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=465 action=mark-connection new-connection-mark=smtps passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=993 action=mark-connection new-connection-mark=imaps passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=995 action=mark-connection new-connection-mark=pop3s passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=1723 action=mark-connection new-connection-mark=pptp passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=2379 action=mark-connection new-connection-mark=kgs passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=3128 action=mark-connection new-connection-mark=proxy passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=3389 action=mark-connection new-connection-mark=win-ts passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=4242-4243 action=mark-connection new-connection-mark=emule passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=4661-4662 dst-port=1024-65535 action=mark-connection new-connection-mark=overnet passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=4711 dst-port=1024-65535 action=mark-connection new-connection-mark=emule passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=5900-5901 action=mark-connection new-connection-mark=vnc passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=6667-6669 action=mark-connection new-connection-mark=irc passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=6881-6889 action=mark-connection new-connection-mark=bittorrent passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=8080 action=mark-connection new-connection-mark=http passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp src-port=1024-65535 dst-port=8291 action=mark-connection new-connection-mark=winbox passthrough=no&lt;br /&gt;add chain=tcp-services protocol=tcp action=mark-connection new-connection-mark=other-tcp passthrough=no&lt;br /&gt;add chain=udp-services protocol=udp src-port=1024-65535 dst-port=53 action=mark-connection new-connection-mark=dns passthrough=no&lt;br /&gt;add chain=udp-services protocol=udp src-port=1024-65535 dst-port=123 action=mark-connection new-connection-mark=ntp passthrough=no&lt;br /&gt;add chain=udp-services protocol=udp src-port=1024-65535 dst-port=1701 action=mark-connection new-connection-mark=l2tp passthrough=no&lt;br /&gt;add chain=udp-services protocol=udp src-port=1024-65535 dst-port=4665 action=mark-connection new-connection-mark=emule passthrough=no&lt;br /&gt;add chain=udp-services protocol=udp src-port=1024-65535 dst-port=4672 action=mark-connection new-connection-mark=emule passthrough=no&lt;br /&gt;add chain=udp-services protocol=udp src-port=4672 dst-port=1024-65535 action=mark-connection new-connection-mark=emule passthrough=no&lt;br /&gt;add chain=udp-services protocol=udp src-port=1024-65535 dst-port=12053 action=mark-connection new-connection-mark=overnet passthrough=no&lt;br /&gt;add chain=udp-services protocol=udp src-port=12053 dst-port=1024-65535 action=mark-connection new-connection-mark=overnet passthrough=no&lt;br /&gt;add chain=udp-services protocol=udp src-port=36725 dst-port=1024-65535 action=mark-connection new-connection-mark=skype passthrough=no&lt;br /&gt;add chain=udp-services protocol=udp connection-state=new action=mark-connection new-connection-mark=other-udp passthrough=no&lt;br /&gt;add chain=other-services protocol=icmp icmp-options=8:0-255 action=mark-connection new-connection-mark=ping passthrough=no&lt;br /&gt;add chain=other-services protocol=gre action=mark-connection new-connection-mark=gre passthrough=no&lt;br /&gt;add chain=other-services action=mark-connection new-connection-mark=other passthrough=no&lt;br /&gt;&lt;br /&gt;Note that for TCP and UDP, we check both, source port (usually, 1024-65535) and destination port. Everything else is not a valid protocol. &lt;br /&gt;[edit]&lt;br /&gt;Sanity-check&lt;br /&gt;&lt;br /&gt;Most generic invalid packet and port-scan detection techniques &lt;br /&gt;&lt;br /&gt;Place this before all other rules in mangle: &lt;br /&gt;/ip firewall mangle&lt;br /&gt;add chain=prerouting in-interface=Public dst-address-list=nat-addr action=mark-packet new-packet-mark=nat-traversal passthrough=no&lt;br /&gt;&lt;br /&gt;Note that just like in the line above, some filter rules rely on address lists. here is a simple list, which you should extend further: &lt;br /&gt;/ ip firewall address-list&lt;br /&gt;add list=illegal-addr address=0.0.0.0/8 comment="illegal addresses"&lt;br /&gt;add list=illegal-addr address=127.0.0.0/8&lt;br /&gt;add list=illegal-addr address=224.0.0.0/3&lt;br /&gt;add list=illegal-addr address=10.0.0.0/8&lt;br /&gt;add list=illegal-addr address=172.16.0.0/12&lt;br /&gt;add list=illegal-addr address=192.168.0.0/16&lt;br /&gt;add list=local-addr address=172.31.255.0/29 comment="my local network"&lt;br /&gt;add list=nat-addr address=172.31.255.0/29 comment="my local network"&lt;br /&gt;&lt;br /&gt;So, there are three address lists: &lt;br /&gt;illegal-addr - the list, which could be extended to some few tens of addresses at least to include the bogon IPs, which are not registered with IANA and some more, this short list given in examples is just a short sample; &lt;br /&gt;local-addr - the list to include all addresses located in your network, behind this firewall &lt;br /&gt;nat-addr - should contain all the IP addresses you are source-natting on your router &lt;br /&gt;&lt;br /&gt;In this example we exclude traffic between the local clients connected to different ports of the Local interface (which is a bridge between ethernet and wireless networks): &lt;br /&gt;/ ip firewall filter&lt;br /&gt;add chain=forward in-interface=Local out-interface=Local action=accept comment="Allow traffic between wired and wireless networks"&lt;br /&gt;&lt;br /&gt;Then we are filtering everything else to the drop chain of the firewall. The separate chain is created to keep all logging and accounting in one place. &lt;br /&gt;/ ip firewall filter&lt;br /&gt;add chain=forward action=jump jump-target=sanity-check comment="Sanity Check"&lt;br /&gt;add chain=sanity-check packet-mark=nat-traversal action=jump jump-target=drop comment="Deny illegal NAT traversal"&lt;br /&gt;add chain=sanity-check protocol=tcp psd=20,3s,3,1 action=add-src-to-address-list address-list=blocked-addr address-list-timeout=1d comment="Block port scans"&lt;br /&gt;add chain=sanity-check protocol=tcp tcp-flags=fin,psh,urg,!syn,!rst,!ack action=add-src-to-address-list address-list=blocked-addr address-list-timeout=1d comment="Block TCP Null scan"&lt;br /&gt;add chain=sanity-check protocol=tcp tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg action=add-src-to-address-list address-list=blocked-addr address-list-timeout=1d comment="Block TCP Xmas scan"&lt;br /&gt;add chain=sanity-check protocol=tcp src-address-list=blocked-addr action=jump jump-target=drop&lt;br /&gt;add chain=sanity-check protocol=tcp tcp-flags=rst action=jump jump-target=drop comment="Drop TCP RST"&lt;br /&gt;add chain=sanity-check protocol=tcp tcp-flags=fin,syn action=jump jump-target=drop comment="Drop TCP SYN+FIN"&lt;br /&gt;add chain=sanity-check connection-state=invalid action=jump jump-target=drop comment="Dropping invalid connections at once"&lt;br /&gt;add chain=sanity-check connection-state=established action=accept comment="Accepting already established connections"&lt;br /&gt;add chain=sanity-check connection-state=related action=accept comment="Also accepting related connections"&lt;br /&gt;add chain=sanity-check dst-address-type=broadcast,multicast action=jump jump-target=drop comment="Drop all traffic that goes to multicast or broadcast addresses"&lt;br /&gt;add chain=sanity-check in-interface=Local dst-address-list=illegal-addr dst-address-type=!local action=jump jump-target=drop comment="Drop illegal destination addresses"&lt;br /&gt;add chain=sanity-check in-interface=Local src-address-list=!local-addr action=jump jump-target=drop comment="Drop everything that goes from local interface but not from local address"&lt;br /&gt;add chain=sanity-check in-interface=Public src-address-list=illegal-addr action=jump jump-target=drop comment="Drop illegal source addresses"&lt;br /&gt;add chain=sanity-check in-interface=Public dst-address-list=!local-addr action=jump jump-target=drop comment="Drop everything that goes from public interface but not to local address"&lt;br /&gt;add chain=sanity-check src-address-type=broadcast,multicast action=jump jump-target=drop comment="Drop all traffic that goes from multicast or broadcast addresses"&lt;br /&gt;[edit]&lt;br /&gt;Application-specific filters&lt;br /&gt;/ ip firewall filter&lt;br /&gt;add chain=forward protocol=tcp action=jump jump-target=restrict-tcp&lt;br /&gt;add chain=forward protocol=udp action=jump jump-target=restrict-udp&lt;br /&gt;add chain=forward action=jump jump-target=restrict-ip&lt;br /&gt;add chain=restrict-tcp connection-mark=auth action=reject&lt;br /&gt;add chain=restrict-tcp connection-mark=smtp action=jump jump-target=smtp-first-drop comment="anti-spam policy"&lt;br /&gt;add chain=smtp-first-drop src-address-list=first-smtp action=add-src-to-address-list address-list=approved-smtp&lt;br /&gt;add chain=smtp-first-drop src-address-list=approved-smtp action=return&lt;br /&gt;add chain=smtp-first-drop action=add-src-to-address-list address-list=first-smtp&lt;br /&gt;add chain=smtp-first-drop action=reject reject-with=icmp-network-unreachable&lt;br /&gt;[edit]&lt;br /&gt;Restricting services&lt;br /&gt;/ ip firewall filter&lt;br /&gt;add chain=restrict-tcp connection-mark=other-tcp action=jump jump-target=drop&lt;br /&gt;add chain=restrict-udp connection-mark=other-udp action=jump jump-target=drop&lt;br /&gt;add chain=restrict-ip connection-mark=other action=jump jump-target=drop&lt;br /&gt;[edit]&lt;br /&gt;Protecting the router&lt;br /&gt;/ ip firewall filter&lt;br /&gt;add chain=input src-address-type=local dst-address-type=local action=accept comment="Allow local traffic \(between router applications\)"&lt;br /&gt;add chain=input in-interface=Local protocol=udp src-port=68 dst-port=67 action=jump jump-target=dhcp comment="DHCP protocol would not pass sanity checking, so enabling it explicitly before other checks"&lt;br /&gt;add chain=input action=jump jump-target=sanity-check comment="Sanity Check"&lt;br /&gt;add chain=input dst-address-type=!local action=jump jump-target=drop comment="Dropping packets not destined to the router itself, including all broadcast traffic"&lt;br /&gt;add chain=input connection-mark=ping limit=5,5 action=accept comment="Allow pings, but at a very limited rate \(5 per sec\)"&lt;br /&gt;add chain=input in-interface=Local action=jump jump-target=local-services comment="Allowing some services to be accessible from the local network"&lt;br /&gt;add chain=input in-interface=Public action=jump jump-target=public-services comment="Allowing some services to be accessible from the Internet"&lt;br /&gt;add chain=input action=jump jump-target=drop&lt;br /&gt;add chain=dhcp src-address=0.0.0.0 dst-address=255.255.255.255 action=accept&lt;br /&gt;add chain=dhcp src-address=0.0.0.0 dst-address-type=local action=accept&lt;br /&gt;add chain=dhcp src-address-list=local-addr dst-address-type=local action=accept&lt;br /&gt;add chain=local-services connection-mark=ssh action=accept comment="SSH \(22/TCP\)"&lt;br /&gt;add chain=local-services connection-mark=dns action=accept comment="DNS"&lt;br /&gt;add chain=local-services connection-mark=proxy action=accept comment="HTTP Proxy \(3128/TCP\)"&lt;br /&gt;add chain=local-services connection-mark=winbox comment="Winbox \(8291/TCP\)" disabled=no&lt;br /&gt;add chain=local-services action=drop comment="Drop Other Local Services"&lt;br /&gt;add chain=public-services connection-mark=ssh action=accept comment="SSH \(22/TCP\)"&lt;br /&gt;add chain=public-services connection-mark=pptp action=accept comment="PPTP \(1723/TCP\)"&lt;br /&gt;add chain=public-services connection-mark=gre action=accept comment="GRE for PPTP"&lt;br /&gt;add chain=public-services action=drop comment="Drop Other Public Services"&lt;br /&gt;The "accept ping" rule needs to come before the "public" and "local" jump rules otherwise that rules will never be executed and ICMP will continue to be dropped. &lt;br /&gt;[edit]&lt;br /&gt;Proxying everything&lt;br /&gt;/ ip firewall nat&lt;br /&gt;add chain=dstnat in-interface=Local connection-mark=dns action=redirect comment="proxy for DNS requests"&lt;br /&gt;add chain=dstnat in-interface=Local connection-mark=http protocol=tcp action=redirect to-ports=3128 comment="proxy for HTTP requests"&lt;br /&gt;add chain=dstnat in-interface=Local connection-mark=ntp action=redirect comment="proxy for NTP requests"&lt;br /&gt;[edit]&lt;br /&gt;Enable Proxy servers&lt;br /&gt;/ system ntp server&lt;br /&gt;set enabled=yes broadcast=no multicast=no manycast=no&lt;br /&gt;/ system ntp client&lt;br /&gt;set enabled=yes mode=unicast primary-ntp=xxx.xxx.xxx.xxx secondary-ntp=0.0.0.0&lt;br /&gt;/ ip proxy&lt;br /&gt;set enabled=yes port=3128 parent-proxy=0.0.0.0:1 maximal-client-connections=1000 maximal-server-connections=1000&lt;br /&gt;/ ip dns&lt;br /&gt;set primary-dns=yyy.yyy.yyy.yyy secondary-dns=0.0.0.0 allow-remote-requests=yes cache-size=2048KiB cache-max-ttl=1w&lt;br /&gt;&lt;br /&gt;Please change: &lt;br /&gt;xxx.xxx.xxx.xxx to the NTP server you choose &lt;br /&gt;yyy.yyy.yyy.yyy to your ISP's DNS server ip&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-1716859227045896366?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/1716859227045896366/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=1716859227045896366' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1716859227045896366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/1716859227045896366'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/dmitry-on-firewalling.html' title='Dmitry on firewalling'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-957634546275010731</id><published>2008-04-08T14:27:00.001+07:00</published><updated>2008-04-08T14:27:56.264+07:00</updated><title type='text'>How to Block Customer</title><content type='html'>How to Block a Customer and Tell him to Pay the Bill&lt;br /&gt;&lt;br /&gt;Sometimes you may need to cut off a customer and tell him to pay his bill. It's best done by redirecting his http requests to a page with information telling to pay in order to get reconnected. You can do it with a simple destination NAT rule that captures all http requests from a specific address and sends them to a server with webpage telling to pay the bill. However, it's quite easy to make this using the HotSpot feature of RouterOS. Please note that this don't work with PPPoE connections. &lt;br /&gt;&lt;br /&gt;To make this setup, you should have Hotspot package enabled on the RouterOS. This example will cover how to block customer's computer. When he tries to open a webpage he would be redirected to the hotspot page which will contain info that he hasn't paid the bill for the Internet access. Your router should have already been configured and working (customer should have access to the Internet), you should have the DNS server specified in the router. &lt;br /&gt;&lt;br /&gt;First you should edit the Hotspot login.html page with the text that contains information that will be shown to the customers who haven't paid their bills. It could be something like this: "Service not available, please pay the bill and contact us by phone to get reconnected &lt;br /&gt;&lt;br /&gt;Next, add an ip-binding rule that will allow all customers to bypass the hotspot page. It is done using such a command: &lt;br /&gt;/ip hotspot ip-binding add type=bypassed address=0.0.0.0/0 \&lt;br /&gt;comment="bypass the hotspot for all the paying customers"&lt;br /&gt;&lt;br /&gt;After that add the Hotspot server on the interface where your clients are connected. It can be done using such command: &lt;br /&gt;/ip hotspot add interface=local disabled=no&lt;br /&gt;&lt;br /&gt;Now you can add ip-binding rules for the customers that haven't paid their bill. You can match them by IP address or MAC address. Here is an example using MAC address: &lt;br /&gt;/ip hotspot ip-binding add mac-address=00:0C:42:00:00:90 type=regular comment "Non paying client 1"&lt;br /&gt;&lt;br /&gt;Now we have such configuration: &lt;br /&gt;[admin@MikroTik] ip hotspot ip-binding&gt; print&lt;br /&gt;Flags: X - disabled, P - bypassed, B - blocked&lt;br /&gt;#   MAC-ADDRESS       ADDRESS                         TO-ADDRESS      SERVER&lt;br /&gt;0 P ;;; bypass the hotspot for all the paying customers&lt;br /&gt;                      0.0.0.0/0&lt;br /&gt;1   ;;; Non paying client 1&lt;br /&gt;    00:0C:42:00:00:90&lt;br /&gt;&lt;br /&gt;There is one more step to make it work, you should change the order of these rules, the first rule should be above the bypass rule so it could be processed. You can move it using move command: &lt;br /&gt;[admin@MikroTik] ip hotspot ip-binding&gt; move 1 0&lt;br /&gt;&lt;br /&gt;Now the ip-binding configuration should look like this: &lt;br /&gt;[admin@MikroTik] ip hotspot ip-binding&gt; print&lt;br /&gt;Flags: X - disabled, P - bypassed, B - blocked&lt;br /&gt;#   MAC-ADDRESS       ADDRESS                         TO-ADDRESS      SERVER&lt;br /&gt;0   ;;; Non paying client 1&lt;br /&gt;    00:0C:42:00:00:90&lt;br /&gt;1 P ;;; bypass the hotspot for all the paying customers&lt;br /&gt;                      0.0.0.0/0&lt;br /&gt;&lt;br /&gt;If the customers can pay their bill using internet you can modify the login.html by adding some links to clients bank web-page where they can pay their bill. After you add these links in the login page you should also add them in the hotspot configuration so the blocked customer could access that page. This can be done in the 'ip hotspot walled-garden ip' menu. Here is an example: &lt;br /&gt;/ip hotspot walled-garden ip add dst-host=www.paypal.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-957634546275010731?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/957634546275010731/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=957634546275010731' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/957634546275010731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/957634546275010731'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/how-to-block-customer.html' title='How to Block Customer'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-5378412170906800269</id><published>2008-04-08T14:26:00.000+07:00</published><updated>2008-04-08T14:27:14.636+07:00</updated><title type='text'>Redirect mail traffic to a specified server</title><content type='html'>This is if you want to redirect all traffic through your router to your own specified mail server. This is usefull if you have many clients from different locations connecting to your network at different times. (Note that if you are using Hotspot you can do this in the Hotspot settings instead) &lt;br /&gt;ip firewall nat add chain=dstnat protocol=tcp dst-port=25 action=dst-nat to-addresses=10.0.0.1 to-ports=25 &lt;br /&gt;&lt;br /&gt;This will redirect all smtp (port 25) traffic out the router to ip address 10.0.0.1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-5378412170906800269?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/5378412170906800269/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=5378412170906800269' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/5378412170906800269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/5378412170906800269'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/redirect-mail-traffic-to-specified.html' title='Redirect mail traffic to a specified server'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-7982201591978950269</id><published>2008-04-08T14:25:00.000+07:00</published><updated>2008-04-08T14:26:22.754+07:00</updated><title type='text'>Drop port scanners</title><content type='html'>To protect the Router from port scanners, we can record the IPs of hackers who try to scan your box. Using this address list we can drop connection from those IP &lt;br /&gt;&lt;br /&gt;in /ip firewall filter &lt;br /&gt;add chain=input protocol=tcp psd=21,3s,3,1 action=add-src-to-address-list address-list="port scanners" &lt;br /&gt;address-list-timeout=2w comment="Port scanners to list " disabled=no&lt;br /&gt;&lt;br /&gt;Various combinations of TCP flags can also indicate port scanner activity. &lt;br /&gt;add chain=input protocol=tcp tcp-flags=fin,!syn,!rst,!psh,!ack,!urg &lt;br /&gt;action=add-src-to-address-list address-list="port scanners" &lt;br /&gt;address-list-timeout=2w comment="NMAP FIN Stealth scan"&lt;br /&gt;add chain=input protocol=tcp tcp-flags=fin,syn &lt;br /&gt;action=add-src-to-address-list address-list="port scanners"&lt;br /&gt;address-list-timeout=2w comment="SYN/FIN scan"&lt;br /&gt;add chain=input protocol=tcp tcp-flags=syn,rst &lt;br /&gt;action=add-src-to-address-list address-list="port scanners"&lt;br /&gt;address-list-timeout=2w comment="SYN/RST scan"&lt;br /&gt;add chain=input protocol=tcp tcp-flags=fin,psh,urg,!syn,!rst,!ack &lt;br /&gt;action=add-src-to-address-list address-list="port scanners" &lt;br /&gt;address-list-timeout=2w comment="FIN/PSH/URG scan"&lt;br /&gt;add chain=input protocol=tcp tcp-flags=fin,syn,rst,psh,ack,urg&lt;br /&gt;action=add-src-to-address-list address-list="port scanners" &lt;br /&gt;address-list-timeout=2w comment="ALL/ALL scan"&lt;br /&gt;add chain=input protocol=tcp tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg &lt;br /&gt;action=add-src-to-address-list address-list="port scanners" &lt;br /&gt;address-list-timeout=2w comment="NMAP NULL scan"&lt;br /&gt;&lt;br /&gt;Then you can drop those IPs: &lt;br /&gt;add chain=input src-address-list="port scanners" action=drop comment="dropping port scanners" disabled=no&lt;br /&gt;&lt;br /&gt;Similarly, you can drop these port scanners in the forward chain, but using the above rules with "chain=forward".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-7982201591978950269?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/7982201591978950269/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=7982201591978950269' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/7982201591978950269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/7982201591978950269'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/drop-port-scanners.html' title='Drop port scanners'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-8241262766179096478</id><published>2008-04-08T14:12:00.001+07:00</published><updated>2008-04-08T14:25:06.053+07:00</updated><title type='text'>How to secure a network using ARP</title><content type='html'>Although hosts in IP network are addressed using IP addresses, hardware addresses must be used to actually transport data from one host to another at Layer-2 (EG: Ethernet). Address Resolution Protocol (ARP) provides a mapping between the two different forms of addresses. A router has an ARP table that contains ARP entries. ARP entries consist of IP addresses and corresponding hardware addresses (such as a MAC address). Normally ARP provides a dynamic mapping from an IP address to corresponding hardware address by adding ARP entries automatically as they are discovered, but to increase network security static ARP entries can be created manually. By allowing a router to reply only to those static ARP entries found in the ARP table we restrict access to the router and to the network behind the router to only those IP/Hardware address combinations found in the ARP table. To make a router use only static ARP entries follow the steps listed below: &lt;br /&gt;&lt;br /&gt;1. Add ARP entries of hosts you want to accept in WinBox&lt;br /&gt;or in Console &lt;br /&gt;[admin@RB230] ip arp&gt; add address=10.10.10.10 interface=ether2 mac-address=06 \&lt;br /&gt;\... 00:21:00:56:00:12&lt;br /&gt;&lt;br /&gt;2. Make ether2 interface only reply to ARP requests using your specified ARP entries in WinBox &lt;br /&gt;&lt;br /&gt;or in Console &lt;br /&gt;[admin@RB230] &gt; interface ethernet set ether2 arp=reply-only&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-8241262766179096478?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/8241262766179096478/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=8241262766179096478' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8241262766179096478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8241262766179096478'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/how-to-secure-network-using-arp.html' title='How to secure a network using ARP'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-3333971005739156937</id><published>2008-04-08T14:11:00.000+07:00</published><updated>2008-04-08T14:12:11.574+07:00</updated><title type='text'>Protecting your customers</title><content type='html'>To protect the customer's network, we should check all traffic which goes through router and block unwanted. For icmp, tcp, udp traffic we will create chains, where all unwanted packets will be dropped. For the beginning, we can copy and paste the following commands into RouterOS terminal console: &lt;br /&gt;/ip firewall filter&lt;br /&gt;add chain=forward connection-state=established comment="allow established connections"  &lt;br /&gt;add chain=forward connection-state=related comment="allow related connections"&lt;br /&gt;add chain=forward connection-state=invalid action=drop comment="drop invalid connections"  &lt;br /&gt;&lt;br /&gt;Here, the first two rules deal with packets of already opened or related connections. We assume that those are okay. We do not like invalid connection packets, therefore they are dropped.&lt;br /&gt;Next, we should filter out and drop all unwanted packets that look like coming from virus infected hosts. Instead of adding those rules to the forward chain, we create a new chain for all unwanted netbios and similar traffic. We can give the chain a descriptive name, say, "virus" when adding the following rules to the ip firewall filter (you can copy and paste these rules into the terminal window, if you are in the /ip firewall filter menu): &lt;br /&gt;add chain=virus protocol=tcp dst-port=135-139 action=drop comment="Drop Blaster Worm" &lt;br /&gt;add chain=virus protocol=udp dst-port=135-139 action=drop comment="Drop Messenger Worm"    &lt;br /&gt;add chain=virus protocol=tcp dst-port=445 action=drop comment="Drop Blaster Worm" &lt;br /&gt;add chain=virus protocol=udp dst-port=445 action=drop comment="Drop Blaster Worm" &lt;br /&gt;add chain=virus protocol=tcp dst-port=593 action=drop comment="________" &lt;br /&gt;add chain=virus protocol=tcp dst-port=1024-1030 action=drop comment="________" &lt;br /&gt;add chain=virus protocol=tcp dst-port=1080 action=drop comment="Drop MyDoom" &lt;br /&gt;add chain=virus protocol=tcp dst-port=1214 action=drop comment="________" &lt;br /&gt;add chain=virus protocol=tcp dst-port=1363 action=drop comment="ndm requester" &lt;br /&gt;add chain=virus protocol=tcp dst-port=1364 action=drop comment="ndm server" &lt;br /&gt;add chain=virus protocol=tcp dst-port=1368 action=drop comment="screen cast" &lt;br /&gt;add chain=virus protocol=tcp dst-port=1373 action=drop comment="hromgrafx" &lt;br /&gt;add chain=virus protocol=tcp dst-port=1377 action=drop comment="cichlid" &lt;br /&gt;add chain=virus protocol=tcp dst-port=1433-1434 action=drop comment="Worm" &lt;br /&gt;add chain=virus protocol=tcp dst-port=2745 action=drop comment="Bagle Virus" &lt;br /&gt;add chain=virus protocol=tcp dst-port=2283 action=drop comment="Drop Dumaru.Y" &lt;br /&gt;add chain=virus protocol=tcp dst-port=2535 action=drop comment="Drop Beagle" &lt;br /&gt;add chain=virus protocol=tcp dst-port=2745 action=drop comment="Drop Beagle.C-K" &lt;br /&gt;add chain=virus protocol=tcp dst-port=3127-3128 action=drop comment="Drop MyDoom" &lt;br /&gt;add chain=virus protocol=tcp dst-port=3410 action=drop comment="Drop Backdoor OptixPro"&lt;br /&gt;add chain=virus protocol=tcp dst-port=4444 action=drop comment="Worm" &lt;br /&gt;add chain=virus protocol=udp dst-port=4444 action=drop comment="Worm" &lt;br /&gt;add chain=virus protocol=tcp dst-port=5554 action=drop comment="Drop Sasser" &lt;br /&gt;add chain=virus protocol=tcp dst-port=8866 action=drop comment="Drop Beagle.B" &lt;br /&gt;add chain=virus protocol=tcp dst-port=9898 action=drop comment="Drop Dabber.A-B" &lt;br /&gt;add chain=virus protocol=tcp dst-port=10000 action=drop comment="Drop Dumaru.Y" &lt;br /&gt;add chain=virus protocol=tcp dst-port=10080 action=drop comment="Drop MyDoom.B" &lt;br /&gt;add chain=virus protocol=tcp dst-port=12345 action=drop comment="Drop NetBus" &lt;br /&gt;add chain=virus protocol=tcp dst-port=17300 action=drop comment="Drop Kuang2" &lt;br /&gt;add chain=virus protocol=tcp dst-port=27374 action=drop comment="Drop SubSeven" &lt;br /&gt;add chain=virus protocol=tcp dst-port=65506 action=drop comment="Drop PhatBot, Agobot, Gaobot"&lt;br /&gt;&lt;br /&gt;Here, we list all those well known "bad" protocols and ports, used by various trojans and viruses when they take over your computer. This list is incomplete; we should add more rules to it! We can jump to this list from the forward chain by using a rule with action=jump: &lt;br /&gt;add chain=forward action=jump jump-target=virus comment="jump to the virus chain"&lt;br /&gt;&lt;br /&gt;The forward chain looks now as follows:&lt;br /&gt;If the packet does not match any of the rules in the virus chain, the processing is returned back to the forward chain. &lt;br /&gt;&lt;br /&gt;At this point we are left with various options, and you should explore this more thoroughly by reading the manual. &lt;br /&gt;&lt;br /&gt;For the purposes of this example we want to block all traffic except that which we explicitly allow to pass through. For example we wish to allow HTTP Traffic and SMTP Traffic as well as some TCP and UDP packets and ICMP (Ping). &lt;br /&gt;&lt;br /&gt;We can now simply add rules allowing the traffic that we want and then drop everything else (this is the part where we block all traffic): &lt;br /&gt;add chain=forward action=accept protocol=tcp dst-port=80 comment="Allow HTTP" &lt;br /&gt;add chain=forward action=accept protocol=tcp dst-port=25 comment="Allow SMTP" &lt;br /&gt;add chain=forward protocol=tcp comment="allow TCP"&lt;br /&gt;add chain=forward protocol=icmp comment="allow ping"&lt;br /&gt;add chain=forward protocol=udp comment="allow udp"&lt;br /&gt;add chain=forward action=drop comment="drop everything else"&lt;br /&gt;&lt;br /&gt;NOTE THAT THE LAST RULE WILL BLOCK OR DROP ALL TRAFFIC THAT IS NOT EXPLICITLY ALLOWED THROUGH BY PREVIOUS RULES!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-3333971005739156937?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/3333971005739156937/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=3333971005739156937' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3333971005739156937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3333971005739156937'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/protecting-your-customers.html' title='Protecting your customers'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-8537000709560722446</id><published>2008-04-08T14:03:00.000+07:00</published><updated>2008-04-08T14:05:50.805+07:00</updated><title type='text'>Securing your router</title><content type='html'>To protect your MikroTik RouterOS™, you should do following things: &lt;br /&gt;Change admin's password &lt;br /&gt;&lt;br /&gt;Just select the Password menu within the winbox GUI, for example:&lt;br /&gt;Or, type the following command in the CLI: &lt;br /&gt;[admin@MikroTik] &gt; / password &lt;br /&gt;old password: &lt;br /&gt;new password: ******&lt;br /&gt;retype new password: ******&lt;br /&gt;&lt;br /&gt;This will change your current admin's password to what you have entered twice. Make sure you remember the password! If you forget it, there is no recovery. You need to reinstall the router! &lt;br /&gt;Add users to the system &lt;br /&gt;&lt;br /&gt;You should add each user that is going to log on to the router as a separate user and specify group of privileges. Add yourself as user of group full (same as for admin), for example:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You may create new groups for users with specific tasks. &lt;br /&gt;Set up packet filtering &lt;br /&gt;&lt;br /&gt;All packets with destination to the router are processed against the ip firewall filter's input chain. Note, that the input chain does not affect packets which are being transferred through the router! &lt;br /&gt;&lt;br /&gt;You can add following rules to the input chain under /ip firewall filter (just 'copy and paste' to the router using Terminal Console or configure the relevant arguments in WinBox): &lt;br /&gt;/ ip firewall filter&lt;br /&gt;add chain=input connection-state=established comment="Accept established connections"&lt;br /&gt;add chain=input connection-state=related comment="Accept related connections"&lt;br /&gt;add chain=input connection-state=invalid action=drop comment="Drop invalid connections" &lt;br /&gt;add chain=input protocol=udp action=accept comment="UDP" disabled=no &lt;br /&gt;add chain=input protocol=icmp limit=50/5s,2 comment="Allow limited pings" &lt;br /&gt;add chain=input protocol=icmp action=drop comment="Drop excess pings" &lt;br /&gt;add chain=input protocol=tcp dst-port=22 comment="SSH for secure shell"&lt;br /&gt;add chain=input protocol=tcp dst-port=8291 comment="winbox" &lt;br /&gt;# Edit these rules to reflect your actual IP addresses! # &lt;br /&gt;add chain=input src-address=159.148.172.192/28 comment="From Mikrotikls network" &lt;br /&gt;add chain=input src-address=10.0.0.0/8 comment="From our private LAN"&lt;br /&gt;# End of Edit #&lt;br /&gt;add chain=input action=log log-prefix="DROP INPUT" comment="Log everything else"&lt;br /&gt;add chain=input action=drop comment="Drop everything else"&lt;br /&gt;&lt;br /&gt;Use /ip firewall filter print input stats command to see how many packets have been processed against these rules. Use reset-counters-all command to reset the counters. Examine the system log file /log print to see the packets which have been dropped. &lt;br /&gt;&lt;br /&gt;You may need to include additional rules to allow access from certain hosts, etc. Remember that firewall rules are processed in the order they appear on the list! After a rule matches the packet, no more rules are processed for it. After adding new rules, move them up using the move command. &lt;br /&gt;&lt;br /&gt;Note, if you mis-configured the firewall and have locked yourselves out from the router, you may use MAC telnet from another router or workstation on the same LAN to connect to your router and correct the problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-8537000709560722446?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/8537000709560722446/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=8537000709560722446' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8537000709560722446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8537000709560722446'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/securing-your-router.html' title='Securing your router'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-7973918878479657333</id><published>2008-04-08T13:58:00.000+07:00</published><updated>2008-04-08T14:03:10.507+07:00</updated><title type='text'>Drop IM Using L7</title><content type='html'>Now we can STOP Instanse Messangers Using Layer-7 Filtering. You Require Mikrotik Router OS V3.x&lt;br /&gt;&lt;br /&gt;In This Topic We will Try to STOP some known Messangers like MSN, Yahoo, etc.&lt;br /&gt;&lt;br /&gt;First you need to Configure Layer-7 protocols&lt;br /&gt;&lt;br /&gt;/ip firewall layer7-protocol&lt;br /&gt;add&lt;br /&gt;name="Yahoo" regexp="^(ymsg|ypns|yhoo).?.?.?.?.?.?.?[lwt].*\xc0\x80" comments="Yahoo Messanger"&lt;br /&gt;&lt;br /&gt;name="MSN" regexp="ver [0-9]+ msnp[1-9][0-9]? [\x09-\x0d -~]*cvr0\x0d\x0a$|usr 1 [!-~]+ [0-9. ]+\x0d\x0a$|ans 1 [!-~]+ [0-9. ]+\x0d\x0a$" comments="MSN Messanger"&lt;br /&gt;&lt;br /&gt;name="MSN FT" regexp="^(ver [ -~]*msnftp\x0d\x0aver msnftp\x0d\x0ausr|method msnmsgr:)" comments="MSN File Transfer"&lt;br /&gt;&lt;br /&gt;name="Skype" regexp="^..\x02............." comments="Skype"&lt;br /&gt;&lt;br /&gt;name="Skype-to-Phone" regexp="^(\x01.?.?.?.?.?.?.?.?\x01|\x02.?.?.?.?.?.?.?.?\x02|\x03.?.?.?.?.?.?.?.?\x03|\x04.?.?.?.?.?.?.?.?\x04|\x05.?.?.?.?.?.?.?.?\x05|\x06.?.?.?.?.?.?.?.?\x06|\x07.?.?.?.?.?.?.?.?\x07|\x08.?.?.?.?.?.?.?.?\x08|\x09.?.?.?.?.?.?.?.?\x09|\x0a.?.?.?.?.?.?.?.?\x0a|\x0b.?.?.?.?.?.?.?.?\x0b|\x0c.?.?.?.?.?.?.?.?\x0c|\x0d.?.?.?.?.?.?.?.?\x0d|\x0e.?.?.?.?.?.?.?.?\x0e|\x0f.?.?.?.?.?.?.?.?\x0f|\x10.?.?.?.?.?.?.?.?\x10|\x11.?.?.?.?.?.?.?.?\x11|\x12.?.?.?.?.?.?.?.?\x12|\x13.?.?.?.?.?.?.?.?\x13|\x14.?.?.?.?.?.?.?.?\x14|\x15.?.?.?.?.?.?.?.?\x15|\x16.?.?.?.?.?.?.?.?\x16|\x17.?.?.?.?.?.?.?.?\x17|\x18.?.?.?.?.?.?.?.?\x18|\x19.?.?.?.?.?.?.?.?\x19|\x1a.?.?.?.?.?.?.?.?\x1a|\x1b.?.?.?.?.?.?.?.?\x1b|\x1c.?.?.?.?.?.?.?.?\x1c|\x1d.?.?.?.?.?.?.?.?\x1d|\x1e.?.?.?.?.?.?.?.?\x1e|\x1f.?.?.?.?.?.?.?.?\x1f|\x20.?.?.?.?.?.?.?.?\x20|\x21.?.?.?.?.?.?.?.?\x21|\x22.?.?.?.?.?.?.?.?\x22|\x23.?.?.?.?.?.?.?.?\x23|\$.?.?.?.?.?.?.?.?\$|\x25.?.?.?.?.?.?.?.?\x25|\x26.?.?.?.?.?.?.?.?\x26|\x27.?.?.?.?.?.?.?.?\x27|\(.?.?.?.?.?.?.?.?\(|\).?.?.?.?.?.?.?.?\)|\*.?.?.?.?.?.?.?.?\*|\+.?.?.?.?.?.?.?.?\+|\x2c.?.?.?.?.?.?.?.?\x2c|\x2d.?.?.?.?.?.?.?.?\x2d|\..?.?.?.?.?.?.?.?\.|\x2f.?.?.?.?.?.?.?.?\x2f|\x30.?.?.?.?.?.?.?.?\x30|\x31.?.?.?.?.?.?.?.?\x31|\x32.?.?.?.?.?.?.?.?\x32|\x33.?.?.?.?.?.?.?.?\x33|\x34.?.?.?.?.?.?.?.?\x34|\x35.?.?.?.?.?.?.?.?\x35|\x36.?.?.?.?.?.?.?.?\x36|\x37.?.?.?.?.?.?.?.?\x37|\x38.?.?.?.?.?.?.?.?\x38|\x39.?.?.?.?.?.?.?.?\x39|\x3a.?.?.?.?.?.?.?.?\x3a|\x3b.?.?.?.?.?.?.?.?\x3b|\x3c.?.?.?.?.?.?.?.?\x3c|\x3d.?.?.?.?.?.?.?.?\x3d|\x3e.?.?.?.?.?.?.?.?\x3e|\?.?.?.?.?.?.?.?.?\?|\x40.?.?.?.?.?.?.?.?\x40|\x41.?.?.?.?.?.?.?.?\x41|\x42.?.?.?.?.?.?.?.?\x42|\x43.?.?.?.?.?.?.?.?\x43|\x44.?.?.?.?.?.?.?.?\x44|\x45.?.?.?.?.?.?.?.?\x45|\x46.?.?.?.?.?.?.?.?\x46|\x47.?.?.?.?.?.?.?.?\x47|\x48.?.?.?.?.?.?.?.?\x48|\x49.?.?.?.?.?.?.?.?\x49|\x4a.?.?.?.?.?.?.?.?\x4a|\x4b.?.?.?.?.?.?.?.?\x4b|\x4c.?.?.?.?.?.?.?.?\x4c|\x4d.?.?.?.?.?.?.?.?\x4d|\x4e.?.?.?.?.?.?.?.?\x4e|\x4f.?.?.?.?.?.?.?.?\x4f|\x50.?.?.?.?.?.?.?.?\x50|\x51.?.?.?.?.?.?.?.?\x51|\x52.?.?.?.?.?.?.?.?\x52|\x53.?.?.?.?.?.?.?.?\x53|\x54.?.?.?.?.?.?.?.?\x54|\x55.?.?.?.?.?.?.?.?\x55|\x56.?.?.?.?.?.?.?.?\x56|\x57.?.?.?.?.?.?.?.?\x57|\x58.?.?.?.?.?.?.?.?\x58|\x59.?.?.?.?.?.?.?.?\x59|\x5a.?.?.?.?.?.?.?.?\x5a|\[.?.?.?.?.?.?.?.?\[|\\.?.?.?.?.?.?.?.?\\|\].?.?.?.?.?.?.?.?\]|\^.?.?.?.?.?.?.?.?\^|\x5f.?.?.?.?.?.?.?.?\x5f|\x60.?.?.?.?.?.?.?.?\x60|\x61.?.?.?.?.?.?.?.?\x61|\x62.?.?.?.?.?.?.?.?\x62|\x63.?.?.?.?.?.?.?.?\x63|\x64.?.?.?.?.?.?.?.?\x64|\x65.?.?.?.?.?.?.?.?\x65|\x66.?.?.?.?.?.?.?.?\x66|\x67.?.?.?.?.?.?.?.?\x67|\x68.?.?.?.?.?.?.?.?\x68|\x69.?.?.?.?.?.?.?.?\x69|\x6a.?.?.?.?.?.?.?.?\x6a|\x6b.?.?.?.?.?.?.?.?\x6b|\x6c.?.?.?.?.?.?.?.?\x6c|\x6d.?.?.?.?.?.?.?.?\x6d|\x6e.?.?.?.?.?.?.?.?\x6e|\x6f.?.?.?.?.?.?.?.?\x6f|\x70.?.?.?.?.?.?.?.?\x70|\x71.?.?.?.?.?.?.?.?\x71|\x72.?.?.?.?.?.?.?.?\x72|\x73.?.?.?.?.?.?.?.?\x73|\x74.?.?.?.?.?.?.?.?\x74|\x75.?.?.?.?.?.?.?.?\x75|\x76.?.?.?.?.?.?.?.?\x76|\x77.?.?.?.?.?.?.?.?\x77|\x78.?.?.?.?.?.?.?.?\x78|\x79.?.?.?.?.?.?.?.?\x79|\x7a.?.?.?.?.?.?.?.?\x7a|\{.?.?.?.?.?.?.?.?\{|\|.?.?.?.?.?.?.?.?\||\}.?.?.?.?.?.?.?.?\}|\x7e.?.?.?.?.?.?.?.?\x7e|\x7f.?.?.?.?.?.?.?.?\x7f|\x80.?.?.?.?.?.?.?.?\x80|\x81.?.?.?.?.?.?.?.?\x81|\x82.?.?.?.?.?.?.?.?\x82|\x83.?.?.?.?.?.?.?.?\x83|\x84.?.?.?.?.?.?.?.?\x84|\x85.?.?.?.?.?.?.?.?\x85|\x86.?.?.?.?.?.?.?.?\x86|\x87.?.?.?.?.?.?.?.?\x87|\x88.?.?.?.?.?.?.?.?\x88|\x89.?.?.?.?.?.?.?.?\x89|\x8a.?.?.?.?.?.?.?.?\x8a|\x8b.?.?.?.?.?.?.?.?\x8b|\x8c.?.?.?.?.?.?.?.?\x8c|\x8d.?.?.?.?.?.?.?.?\x8d|\x8e.?.?.?.?.?.?.?.?\x8e|\x8f.?.?.?.?.?.?.?.?\x8f|\x90.?.?.?.?.?.?.?.?\x90|\x91.?.?.?.?.?.?.?.?\x91|\x92.?.?.?.?.?.?.?.?\x92|\x93.?.?.?.?.?.?.?.?\x93|\x94.?.?.?.?.?.?.?.?\x94|\x95.?.?.?.?.?.?.?.?\x95|\x96.?.?.?.?.?.?.?.?\x96|\x97.?.?.?.?.?.?.?.?\x97|\x98.?.?.?.?.?.?.?.?\x98|\x99.?.?.?.?.?.?.?.?\x99|\x9a.?.?.?.?.?.?.?.?\x9a|\x9b.?.?.?.?.?.?.?.?\x9b|\x9c.?.?.?.?.?.?.?.?\x9c|\x9d.?.?.?.?.?.?.?.?\x9d|\x9e.?.?.?.?.?.?.?.?\x9e|\x9f.?.?.?.?.?.?.?.?\x9f|\xa0.?.?.?.?.?.?.?.?\xa0|\xa1.?.?.?.?.?.?.?.?\xa1|\xa2.?.?.?.?.?.?.?.?\xa2|\xa3.?.?.?.?.?.?.?.?\xa3|\xa4.?.?.?.?.?.?.?.?\xa4|\xa5.?.?.?.?.?.?.?.?\xa5|\xa6.?.?.?.?.?.?.?.?\xa6|\xa7.?.?.?.?.?.?.?.?\xa7|\xa8.?.?.?.?.?.?.?.?\xa8|\xa9.?.?.?.?.?.?.?.?\xa9|\xaa.?.?.?.?.?.?.?.?\xaa|\xab.?.?.?.?.?.?.?.?\xab|\xac.?.?.?.?.?.?.?.?\xac|\xad.?.?.?.?.?.?.?.?\xad|\xae.?.?.?.?.?.?.?.?\xae|\xaf.?.?.?.?.?.?.?.?\xaf|\xb0.?.?.?.?.?.?.?.?\xb0|\xb1.?.?.?.?.?.?.?.?\xb1|\xb2.?.?.?.?.?.?.?.?\xb2|\xb3.?.?.?.?.?.?.?.?\xb3|\xb4.?.?.?.?.?.?.?.?\xb4|\xb5.?.?.?.?.?.?.?.?\xb5|\xb6.?.?.?.?.?.?.?.?\xb6|\xb7.?.?.?.?.?.?.?.?\xb7|\xb8.?.?.?.?.?.?.?.?\xb8|\xb9.?.?.?.?.?.?.?.?\xb9|\xba.?.?.?.?.?.?.?.?\xba|\xbb.?.?.?.?.?.?.?.?\xbb|\xbc.?.?.?.?.?.?.?.?\xbc|\xbd.?.?.?.?.?.?.?.?\xbd|\xbe.?.?.?.?.?.?.?.?\xbe|\xbf.?.?.?.?.?.?.?.?\xbf|\xc0.?.?.?.?.?.?.?.?\xc0|\xc1.?.?.?.?.?.?.?.?\xc1|\xc2.?.?.?.?.?.?.?.?\xc2|\xc3.?.?.?.?.?.?.?.?\xc3|\xc4.?.?.?.?.?.?.?.?\xc4|\xc5.?.?.?.?.?.?.?.?\xc5|\xc6.?.?.?.?.?.?.?.?\xc6|\xc7.?.?.?.?.?.?.?.?\xc7|\xc8.?.?.?.?.?.?.?.?\xc8|\xc9.?.?.?.?.?.?.?.?\xc9|\xca.?.?.?.?.?.?.?.?\xca|\xcb.?.?.?.?.?.?.?.?\xcb|\xcc.?.?.?.?.?.?.?.?\xcc|\xcd.?.?.?.?.?.?.?.?\xcd|\xce.?.?.?.?.?.?.?.?\xce|\xcf.?.?.?.?.?.?.?.?\xcf|\xd0.?.?.?.?.?.?.?.?\xd0|\xd1.?.?.?.?.?.?.?.?\xd1|\xd2.?.?.?.?.?.?.?.?\xd2|\xd3.?.?.?.?.?.?.?.?\xd3|\xd4.?.?.?.?.?.?.?.?\xd4|\xd5.?.?.?.?.?.?.?.?\xd5|\xd6.?.?.?.?.?.?.?.?\xd6|\xd7.?.?.?.?.?.?.?.?\xd7|\xd8.?.?.?.?.?.?.?.?\xd8|\xd9.?.?.?.?.?.?.?.?\xd9|\xda.?.?.?.?.?.?.?.?\xda|\xdb.?.?.?.?.?.?.?.?\xdb|\xdc.?.?.?.?.?.?.?.?\xdc|\xdd.?.?.?.?.?.?.?.?\xdd|\xde.?.?.?.?.?.?.?.?\xde|\xdf.?.?.?.?.?.?.?.?\xdf|\xe0.?.?.?.?.?.?.?.?\xe0|\xe1.?.?.?.?.?.?.?.?\xe1|\xe2.?.?.?.?.?.?.?.?\xe2|\xe3.?.?.?.?.?.?.?.?\xe3|\xe4.?.?.?.?.?.?.?.?\xe4|\xe5.?.?.?.?.?.?.?.?\xe5|\xe6.?.?.?.?.?.?.?.?\xe6|\xe7.?.?.?.?.?.?.?.?\xe7|\xe8.?.?.?.?.?.?.?.?\xe8|\xe9.?.?.?.?.?.?.?.?\xe9|\xea.?.?.?.?.?.?.?.?\xea|\xeb.?.?.?.?.?.?.?.?\xeb|\xec.?.?.?.?.?.?.?.?\xec|\xed.?.?.?.?.?.?.?.?\xed|\xee.?.?.?.?.?.?.?.?\xee|\xef.?.?.?.?.?.?.?.?\xef|\xf0.?.?.?.?.?.?.?.?\xf0|\xf1.?.?.?.?.?.?.?.?\xf1|\xf2.?.?.?.?.?.?.?.?\xf2|\xf3.?.?.?.?.?.?.?.?\xf3|\xf4.?.?.?.?.?.?.?.?\xf4|\xf5.?.?.?.?.?.?.?.?\xf5|\xf6.?.?.?.?.?.?.?.?\xf6|\xf7.?.?.?.?.?.?.?.?\xf7|\xf8.?.?.?.?.?.?.?.?\xf8|\xf9.?.?.?.?.?.?.?.?\xf9|\xfa.?.?.?.?.?.?.?.?\xfa|\xfb.?.?.?.?.?.?.?.?\xfb|\xfc.?.?.?.?.?.?.?.?\xfc|\xfd.?.?.?.?.?.?.?.?\xfd|\xfe.?.?.?.?.?.?.?.?\xfe|\xff.?.?.?.?.?.?.?.?\xff)" comments="Skype to Phone"&lt;br /&gt;&lt;br /&gt;name="AIM" regexp="^(\*[\x01\x02].*\x03\x0b|\*\x01.?.?.?.?\x01)|flapon|toc_signon.*0x" comments="AIM Messanger"&lt;br /&gt;&lt;br /&gt;name="ICQ" regexp="^(\*[\x01\x02].*\x03\x0b|\*\x01.?.?.?.?\x01)|flapon|toc_signon.*0x" comments="ICQ"&lt;br /&gt;&lt;br /&gt;name="IRC" regexp="^(nick[\x09-\x0d -~]*user[\x09-\x0d -~]*:|user[\x09-\x0d -~]*:[\x02-\x0d -~]*nick[\x09-\x0d -~]*\x0d\x0a)" comments=IRC Chat"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Finally configure Layer-7 Filters&lt;br /&gt;&lt;br /&gt;/ip firewall filter&lt;br /&gt;add&lt;br /&gt;chain=forward layer7-protocol="Yahoo" action=drop&lt;br /&gt;chain=forward layer7-protocol="MSN" action=drop&lt;br /&gt;chain=forward layer7-protocol="MSN FT" action=drop&lt;br /&gt;chain=forward layer7-protocol="Skype" action=drop&lt;br /&gt;chain=forward layer7-protocol="Skype-to-Phone" action=drop&lt;br /&gt;chain=forward layer7-protocol="AIM" action=drop&lt;br /&gt;chain=forward layer7-protocol="ICQ" action=drop&lt;br /&gt;chain=forward layer7-protocol="IRC" action=drop&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-7973918878479657333?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/7973918878479657333/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=7973918878479657333' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/7973918878479657333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/7973918878479657333'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/drop-im-using-l7.html' title='Drop IM Using L7'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-773803869265944487</id><published>2008-04-08T13:57:00.000+07:00</published><updated>2008-04-08T13:58:16.183+07:00</updated><title type='text'>Mangle, Queue Tree and prio by fly man ... almost done</title><content type='html'>As we know ‘simple queue’ marks packets from/to target ip and queues them using global-in/global-out parents for packets at the local side of router. If we want to queue services using ‘queue tree’ we can do it at the local or public side. However if we want to use ‘simple queue’ and ‘queue tree’ for services we don’t have that choice. Packets are marked at the local side and queued by ‘simple queue’ (we can’t see it in /ip firewall mange and /queue tree). The second marking and the ‘queue tree’ at the local side won’t work. That’s why, for services we need to mark packets incoming/outgoing (prerouting/postrouting) at the public side of router.&lt;br /&gt;/interface set ether1 name=wan&lt;br /&gt;/interface set ether2 name=lan&lt;br /&gt;/ip  address  add  address=192.168.0.1/24 interface=lan&lt;br /&gt;/ip  address  add  address=1.0.0.2/24 interface=wan&lt;br /&gt;/ip route  add gateway=1.0.0.1&lt;br /&gt;/ip firewall nat  add chain=srcnat action=masquerade src-address=192.168.0.0/24&lt;br /&gt;&lt;br /&gt;At first we make simple queue, for example:&lt;br /&gt;:for z from 2 to 254 do={/queue simple  add name=(0. . $z) target-addresses=(192.168.0. . $z) \&lt;br /&gt;parent=192.168.0.0/24 interface=all priority=4 queue=default/default max-limit=128000/530000 \&lt;br /&gt;total-queue=default}&lt;br /&gt;&lt;br /&gt;Now we mark packets for the services&lt;br /&gt;/ ip firewall mangle&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark=icmp_in passthrough=no \&lt;br /&gt;  in-interface=wan protocol=icmp comment="icmp" disabled=no&lt;br /&gt;add chain=postrouting action=mark-packet new-packet-mark=icmp_out \&lt;br /&gt;  passthrough=no out-interface=wan protocol=icmp comment="" disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark=p2p_in passthrough=no \&lt;br /&gt;  p2p=all-p2p in-interface=wan comment="p2p" disabled=no&lt;br /&gt;add chain=postrouting action=mark-packet new-packet-mark=p2p_out \&lt;br /&gt;  passthrough=no p2p=all-p2p out-interface=wan comment="" disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark=pop3_in passthrough=no \&lt;br /&gt;  in-interface=wan src-port=110 protocol=tcp comment="pop3" disabled=no&lt;br /&gt;add chain=postrouting action=mark-packet new-packet-mark=pop3_out \&lt;br /&gt;  passthrough=no out-interface=wan dst-port=110 protocol=tcp comment="" \&lt;br /&gt;  disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark=smtp_in passthrough=no \&lt;br /&gt;  in-interface=wan src-port=25 protocol=tcp comment="smtp" disabled=no&lt;br /&gt;add chain=postrouting action=mark-packet new-packet-mark=smtp_out \&lt;br /&gt;  passthrough=no out-interface=wan dst-port=25 protocol=tcp comment="" \&lt;br /&gt;  disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark=imap_in passthrough=no \&lt;br /&gt;  in-interface=wan src-port=143 protocol=tcp comment="imap" disabled=no&lt;br /&gt;add chain=postrouting action=mark-packet new-packet-mark=imap_out \&lt;br /&gt;  passthrough=no out-interface=wan dst-port=143 protocol=tcp comment="" \&lt;br /&gt;  disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark=ssh_in passthrough=no \&lt;br /&gt;  in-interface=wan dst-port=22 protocol=tcp comment="ssh" disabled=no&lt;br /&gt;add chain=postrouting action=mark-packet new-packet-mark=ssh_out \&lt;br /&gt;  passthrough=no out-interface=wan src-port=22 protocol=tcp comment="" \&lt;br /&gt;  disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark=winbox_in \&lt;br /&gt;  passthrough=no in-interface=wan dst-port=8291 protocol=tcp \&lt;br /&gt;  comment="winbox" disabled=no&lt;br /&gt;add chain=postrouting action=mark-packet new-packet-mark=winbox_out \&lt;br /&gt;  passthrough=no out-interface=wan src-port=8291 protocol=tcp comment="" \&lt;br /&gt;  disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark=dns_in passthrough=no \&lt;br /&gt;  in-interface=wan src-port=53 protocol=udp comment="dns" disabled=no&lt;br /&gt;add chain=postrouting action=mark-packet new-packet-mark=dns_out \&lt;br /&gt;  passthrough=no out-interface=wan dst-port=53 protocol=udp comment="" \&lt;br /&gt;  disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark=www_in passthrough=no \&lt;br /&gt;  in-interface=wan src-port=80 protocol=tcp comment="www" disabled=no&lt;br /&gt;add chain=postrouting action=mark-packet new-packet-mark=www_out \&lt;br /&gt;  passthrough=no out-interface=wan dst-port=80 protocol=tcp comment="" \&lt;br /&gt;  disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark=ssl_in passthrough=no \&lt;br /&gt;  in-interface=wan src-port=443 protocol=tcp comment="ssl" disabled=no&lt;br /&gt;add chain=postrouting action=mark-packet new-packet-mark=ssl_out \&lt;br /&gt;  passthrough=no out-interface=wan dst-port=443 protocol=tcp comment="" \&lt;br /&gt;  disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark=udp_in passthrough=no \&lt;br /&gt;  in-interface=wan protocol=udp comment="udp" disabled=no&lt;br /&gt;add chain=postrouting action=mark-packet new-packet-mark=udp_out \&lt;br /&gt;  passthrough=no out-interface=wan protocol=udp comment="" disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark=tcp_in passthrough=no \&lt;br /&gt;  in-interface=wan protocol=tcp comment="tcp" disabled=no&lt;br /&gt;add chain=postrouting action=mark-packet new-packet-mark=tcp_out \&lt;br /&gt;  passthrough=no out-interface=wan protocol=tcp comment="" disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark=other_in \&lt;br /&gt;  passthrough=no in-interface=wan comment="other" disabled=no&lt;br /&gt;add chain=postrouting action=mark-packet new-packet-mark=other_out \&lt;br /&gt;  passthrough=no out-interface=wan comment="" disabled=no&lt;br /&gt;&lt;br /&gt;after that we can make queue tree:&lt;br /&gt;/queue tree&lt;br /&gt;add name="upload_wan1" parent=global-out packet-mark="" limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=4 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="icmp_down" parent=global-in packet-mark=icmp_in limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=1 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="icmp_up" parent=global-out packet-mark=icmp_out limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=1 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="winbox_down" parent=global-in packet-mark=winbox_in limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=1 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="winbox_up" parent=global-out packet-mark=winbox_out limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=1 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="dns_down" parent=global-in packet-mark=dns_in limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=1 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="dns_up" parent=global-out packet-mark=dns_out limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=1 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="www_up" parent=upload_wan1 packet-mark=www_out limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=2 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="ssl_up" parent=upload_wan1 packet-mark=ssl_out limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=1 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="p2p_up" parent=upload_wan1 packet-mark=p2p_out limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=8 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="udp_up" parent=upload_wan1 packet-mark=udp_out limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=6 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="tcp_up" parent=upload_wan1 packet-mark=tcp_out limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=4 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="other_up" parent=upload_wan1 packet-mark=other_out limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=7 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="download_wan1" parent=global-in packet-mark="" limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=4 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="www_down" parent=download_wan1 packet-mark=www_in limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=2 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="ssl_down" parent=download_wan1 packet-mark=ssl_in limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=1 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="p2p_down" parent=download_wan1 packet-mark=p2p_in limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=8 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="udp_down" parent=download_wan1 packet-mark=udp_in limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=6 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="tcp_down" parent=download_wan1 packet-mark=tcp_in limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=4 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="other" parent=download_wan1 packet-mark=other_in limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=7 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="ssh_down" parent=global-in packet-mark=ssh_in limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=1 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="ssh_up" parent=global-out packet-mark=ssh_out limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=1 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="pop3_down" parent=download_wan1 packet-mark=pop3_in limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=5 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="smtp_down" parent=download packet-mark=smtp_in limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=5 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="imap_down" parent=download packet-mark=imap_in limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=5 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="imap_up" parent=upload packet-mark=imap_out limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=5 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="smtp_out" parent=upload packet-mark=smtp_out limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=5 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="pop3_up" parent=upload packet-mark=pop3_out limit-at=0 \&lt;br /&gt;  queue=wireless-default priority=5 max-limit=0 burst-limit=0 \&lt;br /&gt;  burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;&lt;br /&gt;We have several basic download/upload queues:&lt;br /&gt;&lt;br /&gt;- wan&lt;br /&gt;&lt;br /&gt;- icmp&lt;br /&gt;&lt;br /&gt;- winbox&lt;br /&gt;&lt;br /&gt;- dns&lt;br /&gt;&lt;br /&gt;Icmp, dns and winbox have the highest priority to ensure low ping, quick answer of dns server and winbox connection without any problems. The second is wan. In wan tree we decide which service has the highest priority, for which one we want to guarantee bandwidth or decrease speed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-773803869265944487?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/773803869265944487/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=773803869265944487' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/773803869265944487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/773803869265944487'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/mangle-queue-tree-and-prio-by-fly-man.html' title='Mangle, Queue Tree and prio by fly man ... almost done'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-2421337578208192904</id><published>2008-04-08T13:56:00.000+07:00</published><updated>2008-04-08T13:57:16.356+07:00</updated><title type='text'>Limit Different Bandwidth In Day and Night</title><content type='html'>Limit Different Bandwidth In Day and Night.&lt;br /&gt;&lt;br /&gt;There are lot many ways to limit bandwidth for day and Night, but personally I found this is the easiest way, Here it is.&lt;br /&gt;&lt;br /&gt;I have used Simple Queue, Script and Scheduler.&lt;br /&gt;&lt;br /&gt;Suppose we have one network 192.168.1.0/24 and want to limit Bandwidth for day and Night Time.&lt;br /&gt;Network 192.168.1.0/24&lt;br /&gt;Bandwidth = 06:00am – 18:00pm – 1Mbps. &lt;max-limit&gt;&lt;br /&gt;Bandwidth = 18:00pm – 06:00am – 2Mbps. &lt;max-limit&gt;&lt;br /&gt;&lt;br /&gt;Create two simple queues for the same network with different Bandwidth Limit.&lt;br /&gt;/queue simple&lt;br /&gt;#name=”Day” target-addresses=192.168.1.0/24 dst-address=0.0.0.0/0&lt;br /&gt;interface=&lt;ether-x&gt; parent=none direction=both priority=8&lt;br /&gt;queue=default-small/default-small limit-at=512k/512k&lt;br /&gt;max-limit=1M/1M total-queue=default-small&lt;br /&gt;&lt;br /&gt;#name=”Night” target-addresses=192.168.1.0/24 dst-address=0.0.0.0/0&lt;br /&gt;interface=&lt;ether-x&gt; parent=none direction=both priority=8&lt;br /&gt;queue=default-small/default-small limit-at=1M/1M&lt;br /&gt;max-limit=2M/2M total-queue=default-small&lt;br /&gt;&lt;br /&gt;Now, write scripts&lt;br /&gt;/system script&lt;br /&gt;#name=”Day” source=/queue simple enable Day; /queue simple disable Night&lt;br /&gt;&lt;br /&gt;#name=”Night” source=/queue simple enable Night; /queue simple disable Day&lt;br /&gt;&lt;br /&gt;Finally, Schedule it&lt;br /&gt;/system scheduler&lt;br /&gt;#name=”Day” on-event=Day start-date=oct/13/2007 start-time=06:00:00 interval=1d&lt;br /&gt;&lt;br /&gt;#name=”Night” on-event=Night start-date=oct/13/2007 start-time=18:00:00 interval=1d&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-2421337578208192904?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/2421337578208192904/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=2421337578208192904' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/2421337578208192904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/2421337578208192904'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/limit-different-bandwidth-in-day-and.html' title='Limit Different Bandwidth In Day and Night'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-2645268568805423414</id><published>2008-04-08T13:53:00.000+07:00</published><updated>2008-04-08T13:54:34.554+07:00</updated><title type='text'>Queue Tree with more than two interfaces</title><content type='html'>Basic Setup&lt;br /&gt;&lt;br /&gt;This page will tak about how to make QUEUE TREE in RouterOS that with Masquerading for more than two interfaces. It's for sharing internet connection among users on each interfacess. In manual this possibility isn't writted.&lt;br /&gt;&lt;br /&gt;First, let's set the basic setting first. I'm using a machine with 3 or more network interfaces:&lt;br /&gt;[admin@instaler] &gt; in pr&lt;br /&gt;#    NAME       TYPE    RX-RATE    TX-RATE    MTU&lt;br /&gt;0  R public     ether   0          0          1500&lt;br /&gt;1  R wifi1      wlan    0          0          1500&lt;br /&gt;2  R wifi2      wlan    0          0          1500&lt;br /&gt;3  R wifi3      wlan    0          0          1500&lt;br /&gt;&lt;br /&gt;And this is the IP Addresses for each interface:&lt;br /&gt;[admin@instaler] &gt; ip ad pr&lt;br /&gt;Flags: X - disabled, I - invalid, D - dynamic&lt;br /&gt;#  ADDRESS           NETWORK      BROADCAST      INTERFACE&lt;br /&gt;0  10.20.1.0/24      10.20.1.0    10.20.1.255    public&lt;br /&gt; 1  10.10.2.0/24      10.10.2.0    10.10.2.255    wifi1&lt;br /&gt;2  10.10.3.0/24      10.10.3.0    10.10.3.255    wifi2&lt;br /&gt;3  10.10.4.0/24      10.10.4.0    10.10.4.255    wifi3&lt;br /&gt;&lt;br /&gt;On the public you can add NAT or proxy if you want.&lt;br /&gt;[edit]&lt;br /&gt;Mangle Setup&lt;br /&gt;&lt;br /&gt;And now is the most important part in this case.&lt;br /&gt;&lt;br /&gt;We need to mark our users. One connection for upload and second for download. In this example I add mangle for one user. At the end I add mangle for local transmission because I don't QoS local trafic emong users. But for user I need to separate upload and download.&lt;br /&gt;[admin@instaler] ip firewall mangle&gt; print&lt;br /&gt;Flags: X - disabled, I - invalid, D - dynamic&lt;br /&gt;   disabled=no&lt;br /&gt;0 chain=forward src-address=10.10.2.36 action=mark-connection \&lt;br /&gt;  new-connection-mark=users-userU passthrough=yes comment="" disabled=no&lt;br /&gt;1 chain=forward dst-address=10.10.2.36 action=mark-connection \&lt;br /&gt;  new-connection-mark=users-userD passthrough=yes comment="" disabled=no&lt;br /&gt;2 chain=forward connection-mark=users-userU action=mark-packet \&lt;br /&gt;  new-packet-mark=userU passthrough=yes comment="" disabled=no&lt;br /&gt;3 chain=forward connection-mark=users-userD action=mark-packet \&lt;br /&gt;  new-packet-mark=userD passthrough=yes comment="" disabled=no&lt;br /&gt;98  chain=forward src-address=10.10.0.0/16 dst-address=10.10.0.0/16&lt;br /&gt;   action=mark-connection new-connection-mark=users-lokal passthrough=yes&lt;br /&gt;99  chain=forward connection-mark=users-lokal action=mark-packet&lt;br /&gt;   new-packet-mark=lokalTrafic passthrough=yes&lt;br /&gt;[edit]&lt;br /&gt;Queue Tree Setup&lt;br /&gt;&lt;br /&gt;And now, the queue tree setting. We need one rule for downlink and one rule for uplink. Be careful when choosing the parent. for downlink traffic, we use parent "global-out", because we have two or more downloading interfaces. And for uplink, we are using parent "public", we want QoS uplink traffic. (I'm using pcq-up and download from manual) This example is for 2Mb/1Mb&lt;br /&gt;[admin@instaler] &gt; queue tree pr&lt;br /&gt;Flags: X - disabled, I - invalid&lt;br /&gt;0   name="Download" parent=global-out packet-mark="" limit-at=0&lt;br /&gt;   queue=pcq-download priority=1 max-limit=2000000 burst-limit=0&lt;br /&gt;   burst-threshold=0 burst-time=0s&lt;br /&gt;1   name="Upload" parent=WGW packet-mark="" limit-at=0 queue=pcq-upload&lt;br /&gt;   priority=1 max-limit=1000000 burst-limit=0 burst-threshold=0&lt;br /&gt;   burst-time=0s&lt;br /&gt;&lt;br /&gt;Now we add our user:&lt;br /&gt;2   name="user10D" parent=Download packet-mark=userD limit-at=0&lt;br /&gt;   queue=pcq-download priority=5 max-limit=0 burst-limit=0&lt;br /&gt;   burst-threshold=0 burst-time=0s&lt;br /&gt;3   name="user10U" parent=Upload packet-mark=userU limit-at=0&lt;br /&gt;   queue=pcq-upload priority=5 max-limit=0 burst-limit=0 burst-threshold=0&lt;br /&gt;   burst-time=0s&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-2645268568805423414?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/2645268568805423414/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=2645268568805423414' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/2645268568805423414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/2645268568805423414'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/queue-tree-with-more-than-two.html' title='Queue Tree with more than two interfaces'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-478022749714328237</id><published>2008-04-08T13:52:00.000+07:00</published><updated>2008-04-08T13:53:40.450+07:00</updated><title type='text'>Queue with Masquerading and Internal Web-Proxy</title><content type='html'>Introduction&lt;br /&gt;&lt;br /&gt;This page will tak about how to make QUEUE TREE in RouterOS that also running Web-Proxy and Masquerading. Several topics in forum say it's impossible to do.&lt;br /&gt;&lt;br /&gt;In version 2.9.x, we can not know which traffic is HIT and which traffic is MISS from web-proxy. Several people want to make a configuration, to let cache data in proxy (HIT traffic) deliver in maximum possible speed. In other word, if we already have the requested data, those process will not queued.&lt;br /&gt;&lt;br /&gt;In ver 3.0 we can do this, using TOS header modification in web-proxy feature. We can set any TOS value for the HIT traffic, and make it as parameter in mangle.&lt;br /&gt;[edit]&lt;br /&gt;Basic Setup&lt;br /&gt;&lt;br /&gt;First, let's set the basic setting first. I'm using a machine with 2 network interface:&lt;br /&gt;admin@instaler] &gt; in pr&lt;br /&gt;#    NAME       TYPE    RX-RATE    TX-RATE    MTU&lt;br /&gt;0  R public     ether   0          0          1500&lt;br /&gt;1  R lan        wlan    0          0          1500&lt;br /&gt;&lt;br /&gt;And this is the IP Address for each interface:&lt;br /&gt;[admin@instaler] &gt; ip ad pr&lt;br /&gt;Flags: X - disabled, I - invalid, D - dynamic&lt;br /&gt;#  ADDRESS           NETWORK      BROADCAST      INTERFACE&lt;br /&gt;0  192.168.0.217/24  192.168.0.0  192.168.0.255  public&lt;br /&gt; 1  172.21.1.1/24     172.21.1.0   172.21.1.255   lan&lt;br /&gt;&lt;br /&gt;Don't forget to set the transparant web-proxy. We set cache-hit-dscp: 4.&lt;br /&gt;[admin@instaler] &gt; ip proxy pr&lt;br /&gt;                   enabled: yes&lt;br /&gt;               src-address: 0.0.0.0&lt;br /&gt;                      port: 3128&lt;br /&gt;              parent-proxy: 0.0.0.0&lt;br /&gt;         parent-proxy-port: 0&lt;br /&gt;               cache-drive: system&lt;br /&gt;       cache-administrator: "webmaster"&lt;br /&gt;            max-cache-size: none&lt;br /&gt;             cache-on-disk: yes&lt;br /&gt;maximal-client-connections: 600&lt;br /&gt;maximal-server-connections: 600&lt;br /&gt;            max-fresh-time: 3d&lt;br /&gt;     serialize-connections: yes&lt;br /&gt;            cache-hit-dscp: 4&lt;br /&gt;[edit]&lt;br /&gt;Firewall NAT&lt;br /&gt;&lt;br /&gt;Make 2 NAT rules, 1 for Masquerading, and the other for redirecting transparant proxy.&lt;br /&gt;[admin@instaler] ip firewall nat&gt; pr&lt;br /&gt;Flags: X - disabled, I - invalid, D - dynamic&lt;br /&gt;0   chain=srcnat out-interface=public&lt;br /&gt;   src-address=172.21.1.0/24 action=masquerade&lt;br /&gt;1   chain=dstnat in-interface=lan src-address=172.21.1.0/24&lt;br /&gt;   protocol=tcp dst-port=80 action=redirect to-ports=3128&lt;br /&gt;[edit]&lt;br /&gt;Mangle Setup&lt;br /&gt;&lt;br /&gt;And now is the most important part in this case.&lt;br /&gt;&lt;br /&gt;If we want to make HIT traffic from web proxy not queued, we have to make a mangle to handle this traffic. Put this rule on the beginning of the mangle, as it will check first.&lt;br /&gt;[admin@instaler] &gt; ip firewall mangle print&lt;br /&gt;Flags: X - disabled, I - invalid, D - dynamic&lt;br /&gt;0   ;;; HIT TRAFFIC FROM PROXY&lt;br /&gt;   chain=output out-interface=lan&lt;br /&gt;   dscp=4 action=mark-packet&lt;br /&gt;   new-packet-mark=proxy-hit passthrough=no&lt;br /&gt;&lt;br /&gt;As we will make Queue for uplink and downlink traffic, we need 2 packet-mark. In this example, we use "test-up" for uplink traffic, and "test-down" for downlink traffic.&lt;br /&gt;&lt;br /&gt;For uplink traffic, it's quite simple. We need only one rule, using SRC-ADDRESS and IN-INTERFACE parameters, and using PREROUTING chain. Rule number #1.&lt;br /&gt;&lt;br /&gt;But for downlink, we have to make sevaral rules. As we use masquerading, we need Connection Mark, named as "test-conn". Rule no #2.&lt;br /&gt;&lt;br /&gt;Then we have to make 2 more rules. First rule is for non-HTTP connection / direct connection. We use chain forward, as the data traveling through the router. Rule no #3.&lt;br /&gt;&lt;br /&gt;The second rule is for data coming from web-proxy to the client (MISS traffic). We use OUTPUT chain, as the data coming from internal process in the router itself. Rule no #4.&lt;br /&gt;&lt;br /&gt;For both rules (no #3 and #4) we named it "test-down".&lt;br /&gt;&lt;br /&gt;Please be aware, we use passthrough only for connection mark (rule no #2).&lt;br /&gt;[admin@instaler] &gt; ip firewall mangle print&lt;br /&gt;Flags: X - disabled, I - invalid, D - dynamic&lt;br /&gt;1   ;;; UP TRAFFIC&lt;br /&gt;   chain=prerouting in-interface=lan&lt;br /&gt;   src-address=172.21.1.0/24 action=mark-packet&lt;br /&gt;   new-packet-mark=test-up passthrough=no&lt;br /&gt;&lt;br /&gt;2   ;;; CONN-MARK&lt;br /&gt;   chain=forward src-address=172.21.1.0/24&lt;br /&gt;   action=mark-connection&lt;br /&gt;   new-connection-mark=test-conn passthrough=yes&lt;br /&gt;&lt;br /&gt;3   ;;; DOWN-DIRECT CONNECTION&lt;br /&gt;   chain=forward in-interface=public&lt;br /&gt;   connection-mark=test-conn action=mark-packet&lt;br /&gt;   new-packet-mark=test-down passthrough=no&lt;br /&gt;&lt;br /&gt;4   ;;; DOWN-VIA PROXY&lt;br /&gt;   chain=output out-interface=lan&lt;br /&gt;   dst-address=172.21.1.0/24 action=mark-packet&lt;br /&gt;   new-packet-mark=test-down passthrough=no&lt;br /&gt;[edit]&lt;br /&gt;Queue Tree Setup&lt;br /&gt;&lt;br /&gt;And now, the queue tree setting. We need one rule for downlink and one rule for uplink. Be careful when choosing the parent. for downlink traffic, we use parent "lan", the interface name for local network. And for uplink, we are using parent "global-in".&lt;br /&gt;[admin@instaler] &gt; queue tree pr&lt;br /&gt;Flags: X - disabled, I - invalid&lt;br /&gt;0   name="downstream" parent=lan packet-mark=test-down&lt;br /&gt;   limit-at=32000 queue=default priority=8&lt;br /&gt;   max-limit=32000 burst-limit=0&lt;br /&gt;   burst-threshold=0 burst-time=0s&lt;br /&gt;&lt;br /&gt;1   name="upstream" parent=global-in&lt;br /&gt;   packet-mark=test-up limit-at=32000&lt;br /&gt;   queue=default priority=8&lt;br /&gt;   max-limit=32000 burst-limit=0&lt;br /&gt;   burst-threshold=0 burst-time=0s&lt;br /&gt;&lt;br /&gt;You can use those mangle also with PCQ.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-478022749714328237?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/478022749714328237/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=478022749714328237' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/478022749714328237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/478022749714328237'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/queue-with-masquerading-and-internal.html' title='Queue with Masquerading and Internal Web-Proxy'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-8888268803341182204</id><published>2008-04-08T13:51:00.000+07:00</published><updated>2008-04-08T13:52:49.422+07:00</updated><title type='text'>Different limits for Local/Overseas traffic for 3 bandwitch rates using pcq and queue tree</title><content type='html'>1. Introdution&lt;br /&gt;&lt;br /&gt;Let's consider the scenario, when you want to apply different limits for many users to Local and Oversea traffic and don`t want load cpu with a lot of simple queues and you want sell for customers 3 bandwitch rates.&lt;br /&gt;1.12/6 Mbps Latvian Traffic 1Mbps/512Kbps Overseas traffic&lt;br /&gt;2.6/3 Mbps Latvian Traffic 512kbps/256Kbps Overseas traffic&lt;br /&gt;3.4/2 Mbps Latvian Traffic 256Kbps/128Kbps Overseas traffic&lt;br /&gt;&lt;br /&gt;Queue trees will limit data rate for the Local country traffic and Oversea traffic In this scenario local country is Latvia. List of all Latvian subnets located at http://www.nic.lv/local.net&lt;br /&gt;[edit]&lt;br /&gt;2. Configuration&lt;br /&gt;/ ip firewall address-list&lt;br /&gt;add list=12/6 address=192.168.0.2 comment="12/6mbps Local traffic 1mbps/512kbps oversea"&lt;br /&gt;add list=6/3 address=192.168.0.3 comment="6/3mbps Local traffic 512kbps/256kbps oversea"&lt;br /&gt;add list=4/2 address=192.168.0.4 comment="4/2mbps Local traffic 256kbps/128kbps oversea"&lt;br /&gt;add list=Latvia address=159.148.0.0/16 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.41.195.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.41.33.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.41.45.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.68.64.0/19 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.108.29.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.108.144.0/22 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.108.185.0/24 comment="" disabled=no&lt;br /&gt;&lt;br /&gt;/ ip firewall mangle&lt;br /&gt;add chain=forward action=mark-packet new-packet-mark=LV_DL_6M passthrough=yes \&lt;br /&gt;   in-interface=public src-address-list=latvia comment="Default mangle for \&lt;br /&gt;   Latvia Download" disabled=no&lt;br /&gt;add chain=forward action=mark-packet new-packet-mark=LV_UL_3M passthrough=yes \&lt;br /&gt;   in-interface=local dst-address-list=latvia comment="Default mangle for \&lt;br /&gt;   Latvia Upload" disabled=no&lt;br /&gt;add chain=forward action=mark-packet new-packet-mark=OS_DL_512k \&lt;br /&gt;   passthrough=yes in-interface=public src-address-list=!latvia \&lt;br /&gt;   comment="Default mangle for Oversea Download" disabled=no&lt;br /&gt;add chain=forward action=mark-packet new-packet-mark=OS_UL_256k \&lt;br /&gt;   passthrough=yes in-interface=local dst-address-list=!latvia \&lt;br /&gt;   comment="Default mangle for Oversea Upload" disabled=no&lt;br /&gt;add chain=forward action=mark-packet new-packet-mark=LV_DL_12M passthrough=no \&lt;br /&gt;   in-interface=public src-address-list=latvia dst-address-list=12/6 \&lt;br /&gt;   comment="Tarif 12/6 Latvia Download" disabled=no&lt;br /&gt;add chain=forward action=mark-packet new-packet-mark=LV_UL_6M passthrough=no \&lt;br /&gt;   in-interface=local src-address-list=12/6 dst-address-list=latvia \&lt;br /&gt;   comment="Tarif 12/6 Latvia Upload" disabled=no&lt;br /&gt;add chain=forward action=mark-packet new-packet-mark=OS_DL_1M passthrough=no \&lt;br /&gt;   in-interface=public src-address-list=!latvia dst-address-list=12/6 \&lt;br /&gt;   comment="Tarif 12/6 Oversea Download" disabled=no&lt;br /&gt;add chain=forward action=mark-packet new-packet-mark=OS_UL_512k passthrough=no \&lt;br /&gt;   in-interface=local src-address-list=12/6 dst-address-list=!latvia \&lt;br /&gt;   comment="Tarif 12/6 Oversea Upload" disabled=no&lt;br /&gt;add chain=forward action=mark-packet new-packet-mark=LV_DL_4M passthrough=no \&lt;br /&gt;   in-interface=public src-address-list=latvia dst-address-list=4/2 \&lt;br /&gt;   comment="Tarif 4/2 Latvia Download" disabled=no&lt;br /&gt;add chain=forward action=mark-packet new-packet-mark=LV_UL_2M passthrough=no \&lt;br /&gt;   in-interface=local src-address-list=4/2 dst-address-list=latvia \&lt;br /&gt;   comment="Tarif 4/2 Latvia Upload" disabled=no&lt;br /&gt;add chain=forward action=mark-packet new-packet-mark=OS_DL_256k passthrough=no \&lt;br /&gt;   in-interface=public src-address-list=!latvia dst-address-list=4/2 \&lt;br /&gt;   comment="Tarif 4/2 Oversea Download" disabled=no&lt;br /&gt;add chain=forward action=mark-packet new-packet-mark=OS_UL_128k passthrough=no \&lt;br /&gt;   in-interface=local src-address-list=4/2 dst-address-list=!latvia \&lt;br /&gt;   comment="Tarif 4/2 Oversea Upload" disabled=no&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/ queue type&lt;br /&gt;add name="LV_DL_12M" kind=pcq pcq-rate=12000000 pcq-limit=50 \&lt;br /&gt;   pcq-classifier=dst-address pcq-total-limit=2000&lt;br /&gt;add name="LV_DL_6M" kind=pcq pcq-rate=6000000 pcq-limit=50 \&lt;br /&gt;   pcq-classifier=dst-address pcq-total-limit=2000&lt;br /&gt;add name="LV_DL_4M" kind=pcq pcq-rate=4000000 pcq-limit=50 \&lt;br /&gt;   pcq-classifier=dst-address pcq-total-limit=2000&lt;br /&gt;add name="LV_UL_6M" kind=pcq pcq-rate=6000000 pcq-limit=50 \&lt;br /&gt;   pcq-classifier=src-address pcq-total-limit=2000&lt;br /&gt;add name="LV_UL_3M" kind=pcq pcq-rate=3000000 pcq-limit=50 \&lt;br /&gt;   pcq-classifier=src-address pcq-total-limit=2000&lt;br /&gt;add name="LV_UL_2M" kind=pcq pcq-rate=2000000 pcq-limit=50 \&lt;br /&gt;   pcq-classifier=src-address pcq-total-limit=2000&lt;br /&gt;add name="OS_DL_1M" kind=pcq pcq-rate=1000000 pcq-limit=50 \&lt;br /&gt;   pcq-classifier=dst-address pcq-total-limit=2000&lt;br /&gt;add name="OS_DL_512k" kind=pcq pcq-rate=512000 pcq-limit=50 \&lt;br /&gt;   pcq-classifier=dst-address pcq-total-limit=2000&lt;br /&gt;add name="OS_DL_256k" kind=pcq pcq-rate=256000 pcq-limit=50 \&lt;br /&gt;   pcq-classifier=dst-address pcq-total-limit=2000&lt;br /&gt;add name="OS_UL_512k" kind=pcq pcq-rate=512000 pcq-limit=50 \&lt;br /&gt;   pcq-classifier=src-address pcq-total-limit=2000&lt;br /&gt;add name="OS_UL_256k" kind=pcq pcq-rate=256000 pcq-limit=50 \&lt;br /&gt;   pcq-classifier=src-address pcq-total-limit=2000&lt;br /&gt;add name="OS_UL_128k" kind=pcq pcq-rate=128000 pcq-limit=50 \&lt;br /&gt;   pcq-classifier=src-address pcq-total-limit=2000&lt;br /&gt;&lt;br /&gt;/ queue tree&lt;br /&gt;add name="LV_DL_12M" parent=local packet-mark=LV_DL_12M limit-at=0 queue=LV_DL_12M priority=8 max-limit=0 burst-limit=0 \&lt;br /&gt;burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="LV_DL_6M" parent=local packet-mark=LV_DL_6M limit-at=0 queue=LV_DL_6M priority=8 max-limit=0 burst-limit=0 \&lt;br /&gt;burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="LV_UL_2M" parent=public packet-mark=LV_UL_2M limit-at=0 queue=LV_UL_2M priority=8 max-limit=0 burst-limit=0 \&lt;br /&gt;burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="LV_DL_4M" parent=local packet-mark=LV_DL_4M limit-at=0 queue=LV_DL_4M priority=8 max-limit=0 burst-limit=0 \&lt;br /&gt;burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="LV_UL_3M" parent=public packet-mark=LV_UL_3M limit-at=0 queue=LV_UL_3M priority=8 max-limit=0 burst-limit=0 \&lt;br /&gt;burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="LV_UL_6M" parent=public packet-mark=LV_UL_6M limit-at=0 queue=LV_UL_6M priority=8 max-limit=0 burst-limit=0 \&lt;br /&gt;burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="OS_DL_1M" parent=local packet-mark=OS_DL_1M limit-at=0 queue=OS_DL_1M priority=8 max-limit=0 burst-limit=0  \&lt;br /&gt;burst-threshold=0 burst-time=0s  disabled=no&lt;br /&gt;add name="OS_DL_256k" parent=local packet-mark=OS_DL_256k limit-at=0 queue=OS_DL_256k priority=8 max-limit=0 burst-limit=0 \&lt;br /&gt;burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="OS_DL_512k" parent=local packet-mark=OS_DL_512k limit-at=0 queue=OS_DL_512k priority=8 max-limit=0 burst-limit=0 \&lt;br /&gt;burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="OS_UL_128k" parent=public packet-mark=OS_UL_128k limit-at=0 queue=OS_UL_128k priority=8 max-limit=0 burst-limit=0 \&lt;br /&gt;burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="OS_UL_256k" parent=public packet-mark=OS_UL_256k limit-at=0 queue=OS_UL_256k priority=8 max-limit=0 burst-limit=0 \&lt;br /&gt;burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;add name="OS_UL_512k" parent=public packet-mark=OS_UL_512k limit-at=0 queue=OS_UL_512k priority=8 max-limit=0 burst-limit=0 \&lt;br /&gt;burst-threshold=0 burst-time=0s disabled=no&lt;br /&gt;[edit]&lt;br /&gt;3. Explanation&lt;br /&gt;&lt;br /&gt;In /ip firewall address-list we created 3 lists for bandwitch profiles and list with name Latvia with latvian subnets In /ip firewall mangle we created address list based packet marks for bandwitch profiles. All ips witch is not included in any address list will have second bandwitch profiles rates. In /queue types we created pcq types for bandwitch profiles. In /queue tree we created rules with Local/Overseas packet marks and queue types for bandwitch profiles.&lt;br /&gt;&lt;br /&gt;Now customer with ip 192.168.0.2 have 1 profile rates, customer with ip 192.168.0.3 have 2 profile rates, client with ip 192.168.0.4 have 3 profile rates and all others have 2 bandwitch rates, so all traffic will be limited and your cpu power will be free for other tasks.&lt;br /&gt;[edit]&lt;br /&gt;Important note&lt;br /&gt;&lt;br /&gt;This setup will work correctly if local network is not masqueraded. If masquerade is used then parent for all upload queues must be 'global-out' instead of 'public'. The reason for this is that pcq_upload classifier is source address. In case of masquerading source address is changed to public IP address. If queue is set to 'public' interface pcq will think that all packets are coming from one source ( public IP ). PCQ must see source address before masquerading occurs, according to packet flow diagram from manual 'global-out' is before 'src-nat'.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-8888268803341182204?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/8888268803341182204/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=8888268803341182204' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8888268803341182204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/8888268803341182204'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/different-limits-for-localoverseas.html' title='Different limits for Local/Overseas traffic for 3 bandwitch rates using pcq and queue tree'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-5800417496838414660</id><published>2008-04-08T13:49:00.001+07:00</published><updated>2008-04-08T13:51:22.054+07:00</updated><title type='text'>How to apply different limits for Local/Overseas traffic</title><content type='html'>Introduction&lt;br /&gt;&lt;br /&gt;Let's consider the scenario, when you want to apply different limit to Local and Oversea traffic. Oversea traffic - traffic that doesn't belong to the Local country traffic.&lt;br /&gt;&lt;br /&gt;To distinguish oversea traffic from Local country traffic, we will use 'mangle marks' and 'address-list' features. It will place appropriate marks to the packets to/from the Local country and Oversea networks. Local traffic is 'latvian traffic' in the particular example, list of network numbers belonging to ISPs in Latvia can be extracted from file: http://www.nic.lv/local.net&lt;br /&gt;&lt;br /&gt;Note, 'address-list' entries should be replaced with respective addresses, if your router isn't located in Latvia. To find the actual list of network numbers belonging to your country, use Google or any other resources.&lt;br /&gt;&lt;br /&gt;Simple queues will limit data rate for the Local country traffic and Oversea traffic.&lt;br /&gt;Quick Start for Impatient&lt;br /&gt;&lt;br /&gt;Configuration export from the router:&lt;br /&gt;/ ip firewall address-list&lt;br /&gt;add list=Latvia address=159.148.0.0/16 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.41.195.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.41.33.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.41.45.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.68.64.0/19 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.108.29.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.108.144.0/22 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.108.185.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.109.211.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.109.85.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.110.8.0/23 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.110.164.0/23 comment="" disabled=no&lt;br /&gt;...&lt;br /&gt;add list=Latvia address=193.111.244.0/22 comment="" disabled=no&lt;br /&gt;&lt;br /&gt;/ ip firewall mangle&lt;br /&gt;add chain=prerouting src-address=192.168.100.0/24 action=mark-connection \&lt;br /&gt;  new-connection-mark="Con Entire Traffic" passthrough=yes \&lt;br /&gt;  comment="Mark-connection All Traffic" disabled=no&lt;br /&gt;add chain=prerouting src-address=192.168.100.0/24 connection-mark="Con Entire \&lt;br /&gt;  Traffic" dst-address-list=!Latvia action=mark-connection \&lt;br /&gt;  new-connection-mark="Con Oversea" passthrough=yes comment="Mark-connection \&lt;br /&gt;  Oversea Traffic" disabled=no&lt;br /&gt;add chain=prerouting connection-mark="Con Oversea" action=mark-packet \&lt;br /&gt;  new-packet-mark="Oversea traffic" passthrough=no comment="Mark-packet \&lt;br /&gt;  Oversea Traffic" disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark="Local Country Traffic" \&lt;br /&gt;  passthrough=no comment="Mark-packet Local Country Traffic" disabled=no&lt;br /&gt;&lt;br /&gt;/ queue simple&lt;br /&gt;add name="Oversea" target-addresses=192.168.100.254/32 dst-address=0.0.0.0/0 \&lt;br /&gt;  interface=all parent=none packet-marks="Oversea traffic" direction=both \&lt;br /&gt;  priority=8 queue=default-small/default-small limit-at=0/0 \&lt;br /&gt;  max-limit=256000/256000 total-queue=default-small disabled=no&lt;br /&gt;add name="Local Country" target-addresses=192.168.100.254/32 dst-address=0.0.0.0/0 \&lt;br /&gt;  interface=all parent=none packet-marks="Local Country Traffic" direction=both \&lt;br /&gt;  priority=8 queue=default-small/default-small limit-at=0/0 \&lt;br /&gt;  max-limit=1024000/1024000 total-queue=default-small disabled=no&lt;br /&gt;Explanation&lt;br /&gt;Address-list&lt;br /&gt;&lt;br /&gt;First we create Local country address-list, where are placed list of network numbers belonging to ISPs in Latvia (any other country network addresses can be used instead). Full address-list configuration is not included (too many address-list entries), but address-list idea is clear. Networks added to the list 'Latvia':&lt;br /&gt;/ ip firewall address-list&lt;br /&gt;add list=Latvia address=159.148.0.0/16 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.41.195.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.41.33.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.41.45.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.68.64.0/19 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.108.29.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.108.144.0/22 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.108.185.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.109.211.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.109.85.0/24 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.110.8.0/23 comment="" disabled=no&lt;br /&gt;add list=Latvia address=193.110.164.0/23 comment="" disabled=no&lt;br /&gt;...&lt;br /&gt;add list=Latvia address=193.111.244.0/22 comment="" disabled=no&lt;br /&gt;&lt;br /&gt;Note, it's much easier to create/edit such list with Excel or any other similar program.&lt;br /&gt;Mangle&lt;br /&gt;&lt;br /&gt;First we add rule to mark connections that belong to local router's subnet (192.168.100.0/24). Second rule marks connections between local subnet and overseas networks. Third rule marks oversea packets and exclude them from mangle table (passtrough=no). Finally, the last rule places packet mark on all packets that belong to Local country traffic.&lt;br /&gt;/ ip firewall mangle&lt;br /&gt;add chain=prerouting src-address=192.168.100.0/24 action=mark-connection \&lt;br /&gt;  new-connection-mark="Con Entire Traffic" passthrough=yes \&lt;br /&gt;  comment="Mark-connection All Traffic" disabled=no&lt;br /&gt;add chain=prerouting src-address=192.168.100.0/24 connection-mark="Con Entire \&lt;br /&gt;  Traffic" dst-address-list=!Latvia action=mark-connection \&lt;br /&gt;  new-connection-mark="Con Oversea" passthrough=yes comment="Mark-connection \&lt;br /&gt;  Oversea Traffic" disabled=no&lt;br /&gt;add chain=prerouting connection-mark="Con Oversea" action=mark-packet \&lt;br /&gt;  new-packet-mark="Oversea traffic" passthrough=no comment="Mark-packet \&lt;br /&gt;  Oversea Traffic" disabled=no&lt;br /&gt;add chain=prerouting action=mark-packet new-packet-mark="Local Country Traffic" \&lt;br /&gt;  passthrough=no comment="Mark-packet Local Country Traffic" disabled=no&lt;br /&gt;Simple Queue&lt;br /&gt;&lt;br /&gt;Queue configuration is quite simple in the particular case. 192.168.100.254 is the local network host. First rule sets limit 256k/256k to Oversea traffic for the particular host. Respectively second simple queue set limit 1M/1M for Local country traffic.&lt;br /&gt;/ queue simple&lt;br /&gt;add name="Oversea" target-addresses=192.168.100.254/32 dst-address=0.0.0.0/0 \&lt;br /&gt;  interface=all parent=none packet-marks="Oversea traffic" direction=both \&lt;br /&gt;  priority=8 queue=default-small/default-small limit-at=0/0 \&lt;br /&gt;  max-limit=256000/256000 total-queue=default-small disabled=no&lt;br /&gt;add name="Local Country" target-addresses=192.168.100.254/32 dst-address=0.0.0.0/0 \&lt;br /&gt;  interface=all parent=none packet-marks="Local Country Traffic" direction=both \&lt;br /&gt;  priority=8 queue=default-small/default-small limit-at=0/0 \&lt;br /&gt;  max-limit=1024000/1024000 total-queue=default-small disabled=no&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-5800417496838414660?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/5800417496838414660/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=5800417496838414660' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/5800417496838414660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/5800417496838414660'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/how-to-apply-different-limits-for.html' title='How to apply different limits for Local/Overseas traffic'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-4309774963615733861</id><published>2008-04-08T13:46:00.002+07:00</published><updated>2008-04-08T13:56:12.311+07:00</updated><title type='text'>Load Balancing Multi gateway</title><content type='html'>Quick Start for Impatient&lt;br /&gt;&lt;br /&gt;Configuration export from the gateway router:&lt;br /&gt;/ ip address&lt;br /&gt;add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local comment="" \&lt;br /&gt; disabled=no&lt;br /&gt;add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=wlan2 \&lt;br /&gt; comment="" disabled=no&lt;br /&gt;add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=wlan1 \&lt;br /&gt; comment="" disabled=no&lt;br /&gt;/ ip firewall mangle&lt;br /&gt;add chain=prerouting in-interface=Local connection-state=new nth=1,1,0 \&lt;br /&gt; action=mark-connection new-connection-mark=odd passthrough=yes comment="" \&lt;br /&gt; disabled=no&lt;br /&gt;add chain=prerouting in-interface=Local connection-mark=odd action=mark-routing \&lt;br /&gt; new-routing-mark=odd passthrough=no comment="" disabled=no&lt;br /&gt;add chain=prerouting in-interface=Local connection-state=new nth=1,1,1 \&lt;br /&gt; action=mark-connection new-connection-mark=even passthrough=yes comment="" \&lt;br /&gt; disabled=no&lt;br /&gt;add chain=prerouting in-interface=Local connection-mark=even action=mark-routing \&lt;br /&gt; new-routing-mark=even passthrough=no comment="" disabled=no&lt;br /&gt;/ ip firewall nat&lt;br /&gt;add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \&lt;br /&gt; to-ports=0-65535 comment="" disabled=no&lt;br /&gt;add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \&lt;br /&gt; to-ports=0-65535 comment="" disabled=no&lt;br /&gt;/ ip route&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd \&lt;br /&gt; comment="" disabled=no&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=even \&lt;br /&gt; comment="" disabled=no&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 comment="" \&lt;br /&gt; disabled=no&lt;br /&gt;Explanation&lt;br /&gt;&lt;br /&gt;First we give a code snippet and then explain what it actually does.&lt;br /&gt;Mangle&lt;br /&gt;/ ip address&lt;br /&gt;add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local comment="" \&lt;br /&gt; disabled=no&lt;br /&gt;add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=wlan2 \&lt;br /&gt; comment="" disabled=no&lt;br /&gt;add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=wlan1 \&lt;br /&gt; comment="" disabled=no&lt;br /&gt;&lt;br /&gt;The router has two upstream (WAN) interfaces with the addresses of 10.111.0.2/24 and 10.112.0.2/24. The LAN interface has the name "Local" and IP address of 192.168.0.1/24.&lt;br /&gt;/ ip firewall mangle&lt;br /&gt;&lt;br /&gt;add chain=prerouting in-interface=Local connection-state=new nth=1,1,0 \&lt;br /&gt; action=mark-connection new-connection-mark=odd passthrough=yes comment="" \&lt;br /&gt; disabled=no&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First we take every second packet that establishes new session (note connection-state=new), and mark it with connection mark "odd". Consequently all successive packets belonging to the same session will carry the connection mark "odd". Note that we are passing these packets to the second rule (passthrough=yes) to place a routing mark on these packets in addition to the connection mark.&lt;br /&gt;add chain=prerouting in-interface=Local connection-mark=odd action=mark-routing \&lt;br /&gt; new-routing-mark=odd passthrough=no comment="" disabled=no&lt;br /&gt;&lt;br /&gt;The rule above places the routing mark "odd" on all packets that belong to the "odd" connection and stops processing all other mangle in prerouting chain rules for these packets.&lt;br /&gt;add chain=prerouting in-interface=Local connection-state=new nth=1,1,1 \&lt;br /&gt; action=mark-connection new-connection-mark=even passthrough=yes comment="" \&lt;br /&gt; disabled=no&lt;br /&gt;add chain=prerouting in-interface=Local connection-mark=even action=mark-routing \&lt;br /&gt; new-routing-mark=even passthrough=no comment="" disabled=no&lt;br /&gt;&lt;br /&gt;These rules do the same for the remaining half of the traffic as the first two rules for the first half of the traffic.&lt;br /&gt;&lt;br /&gt;The code above effectively means that each new connection initiated through the router from the local network will be marked as either "odd" or "even" with both routing and connection marks.&lt;br /&gt;NAT&lt;br /&gt;/ ip firewall nat&lt;br /&gt;add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \&lt;br /&gt; to-ports=0-65535 comment="" disabled=no&lt;br /&gt;add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \&lt;br /&gt; to-ports=0-65535 comment="" disabled=no&lt;br /&gt;&lt;br /&gt;All traffic marked "odd" is being NATted to source IP address of 10.111.0.2, while traffic marked "even" gets "10.112.0.2" source IP address.&lt;br /&gt;Routing&lt;br /&gt;/ ip route&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd \&lt;br /&gt; comment="" disabled=no&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=even \&lt;br /&gt; comment="" disabled=no&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 comment="" \&lt;br /&gt; disabled=no comment="gateway for the router itself"&lt;br /&gt;&lt;br /&gt;For all traffic marked "odd" (consequently having 10.111.0.2 translated source address) we use 10.111.0.1 gateway. In the same manner all traffic marked "even" is routed through the 10.112.0.1 gateway. Finally, we have one additional entry specifying that traffic from the router itself (the traffic without any routing marks) should go to 10.112.0.1 gateway.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-4309774963615733861?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/4309774963615733861/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=4309774963615733861' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/4309774963615733861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/4309774963615733861'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/load-balancing-multi-gateway.html' title='Load Balancing Multi gateway'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-3120092790936093799</id><published>2008-04-08T13:41:00.002+07:00</published><updated>2008-04-08T13:55:50.473+07:00</updated><title type='text'>TransparentTrafficShaper</title><content type='html'>Introduction&lt;br /&gt;&lt;br /&gt;This example shows how to configure a transparent traffic shaper. The transparent traffic shaper is essentially a bridge that is able to differentiate and prioritize traffic that passes through it.&lt;br /&gt;&lt;br /&gt;Consider the following network layout:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We will configure one queue limiting the total throughput to the client and three sub-queues that limit HTTP, P2P and all other traffic separately.&lt;br /&gt;Quick Start for Impatient&lt;br /&gt;&lt;br /&gt;Configuration snippet from the MikroTik router:&lt;br /&gt;/ interface bridge&lt;br /&gt;add name="bridge1"&lt;br /&gt;/ interface bridge port&lt;br /&gt;add interface=ether2 bridge=bridge1&lt;br /&gt;add interface=ether3 bridge=bridge1&lt;br /&gt;&lt;br /&gt;/ ip firewall mangle&lt;br /&gt;add chain=prerouting protocol=tcp dst-port=80 action=mark-connection \&lt;br /&gt; new-connection-mark=http_conn passthrough=yes&lt;br /&gt;add chain=prerouting connection-mark=http_conn action=mark-packet \&lt;br /&gt; new-packet-mark=http passthrough=no&lt;br /&gt;add chain=prerouting p2p=all-p2p action=mark-connection \&lt;br /&gt; new-connection-mark=p2p_conn passthrough=yes&lt;br /&gt;add chain=prerouting connection-mark=p2p_conn action=mark-packet \&lt;br /&gt; new-packet-mark=p2p passthrough=no&lt;br /&gt;add chain=prerouting action=mark-connection new-connection-mark=other_conn \&lt;br /&gt; passthrough=yes&lt;br /&gt;add chain=prerouting connection-mark=other_conn action=mark-packet \&lt;br /&gt; new-packet-mark=other passthrough=no&lt;br /&gt;&lt;br /&gt;/ queue simple&lt;br /&gt;add name="main" target-addresses=10.0.0.12/32 max-limit=256000/512000&lt;br /&gt;add name="http" parent=main packet-marks=http max-limit=240000/500000&lt;br /&gt;add name="p2p" parent=main packet-marks=p2p max-limit=64000/64000&lt;br /&gt;add name="other" parent=main packet-marks=other max-limit=128000/128000&lt;br /&gt;Explanation&lt;br /&gt;&lt;br /&gt;Each piece of code is followed by the explanation of what it actually does.&lt;br /&gt;Bridge&lt;br /&gt;/ interface bridge&lt;br /&gt;add name="bridge1"&lt;br /&gt;/ interface bridge port&lt;br /&gt;add interface=ether2 bridge=bridge1&lt;br /&gt;add interface=ether3 bridge=bridge1&lt;br /&gt;&lt;br /&gt;We create a new bridge interface and assign two ethernet interfaces to it. Thus the prospective traffic shaper will be completely transparent to the client.&lt;br /&gt;Mangle&lt;br /&gt;/ ip firewall mangle&lt;br /&gt;add chain=prerouting protocol=tcp dst-port=80 action=mark-connection \&lt;br /&gt; new-connection-mark=http_conn passthrough=yes&lt;br /&gt;add chain=prerouting connection-mark=http_conn action=mark-packet \&lt;br /&gt; new-packet-mark=http passthrough=no&lt;br /&gt;&lt;br /&gt;All traffic destined to TCP port 80 is likely to be HTTP traffic and therefore is being marked with the packet mark http. Note, that the first rule has passthrough=yes while the second one has passthrough=no. (You can obtain additional information about mangle at http://www.mikrotik.com/docs/ros/2.9/ip/mangle)&lt;br /&gt;/ ip firewall mangle&lt;br /&gt;add chain=prerouting p2p=all-p2p action=mark-connection \&lt;br /&gt; new-connection-mark=p2p_conn passthrough=yes&lt;br /&gt;add chain=prerouting connection-mark=p2p_conn action=mark-packet \&lt;br /&gt; new-packet-mark=p2p passthrough=no&lt;br /&gt;add chain=prerouting action=mark-connection new-connection-mark=other_conn \&lt;br /&gt; passthrough=yes&lt;br /&gt;add chain=prerouting connection-mark=other_conn action=mark-packet \&lt;br /&gt; new-packet-mark=other passthrough=no&lt;br /&gt;&lt;br /&gt;Same as above, P2P traffic is marked with the packet mark p2p and all other traffic is marked with the packet mark other.&lt;br /&gt;Queues&lt;br /&gt;/ queue simple&lt;br /&gt;add name="main" target-addresses=10.0.0.12/32 max-limit=256000/512000&lt;br /&gt;&lt;br /&gt;We create a queue that limits all the traffic going to/from the client (specified by the target-address) to 256k/512k.&lt;br /&gt;/ queue simple&lt;br /&gt;add name="http" parent=main packet-marks=http max-limit=240000/500000&lt;br /&gt;add name="p2p" parent=main packet-marks=p2p max-limit=64000/64000&lt;br /&gt;add name="other" parent=main packet-marks=other max-limit=128000/128000&lt;br /&gt;&lt;br /&gt;All sub-queues have the main queue as the parent, thus the aggregate data rate could not exceed limits specified in the main queue. Note, that http queue has higher priority than other queues, meaning that HTTP downloads are prioritized.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-3120092790936093799?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/3120092790936093799/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=3120092790936093799' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3120092790936093799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/3120092790936093799'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/transparenttrafficshaper.html' title='TransparentTrafficShaper'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-6099938966840925358</id><published>2008-04-08T13:37:00.001+07:00</published><updated>2008-04-08T13:55:26.071+07:00</updated><title type='text'>Per-Traffic Load Balancing</title><content type='html'>Introduction&lt;br /&gt;&lt;br /&gt;Bandwidth management is an essential part of every day operation for typical ISP's, business, and even everyday home users. There are many different types of management tools available to RouterOS users, QoS, rate-limitng, packet-limiting, to name few&lt;br /&gt;&lt;br /&gt;I personally operate a wireless ISP in an area that has no other type of conventional high-speed internet conection (ie. cable, fibre or DSL). Not having access to fibre myself, I am in a situation where the single fastest backbone connection I can get does not provide enough bandwidth for me to have only one connection. As a result of this limitation load-balancing multiple internet backbone connections is very important.&lt;br /&gt;&lt;br /&gt;In the past I have used ECMP, persisten per connection styled load-balancing (see http://wiki.mikrotik.com/wiki/Load_Balancing), as well as various other methods However, I found all of then lacking in various different areas (not load-balancing correctly, broken large HTTP downloads, IM problems, to name a few issues). I then investigated a way to give me more control over my bandwidth while minimizing the potential problems. The end result was a per-traffic type of load-balancing. This tutorial is designed address that one specific area in depth, at a later date, I may expand/add additional info on fail-over, and other topics&lt;br /&gt;[edit]&lt;br /&gt;Functions of RouterOS used&lt;br /&gt;Firewall mangle rules&lt;br /&gt;Firewall address-lists&lt;br /&gt;Routing&lt;br /&gt;[edit]&lt;br /&gt;Step 1 - How to break up to traffic&lt;br /&gt;&lt;br /&gt;Before you even log onto your RouterOS box, you should have an idea of how you want to divide your traffic, and have an understanding of what traffic can and what traffic can't be broken up.&lt;br /&gt;&lt;br /&gt;Here is an example of what you may want to attempt to separate (in no particular order)&lt;br /&gt;HTTP traffic (port 80)&lt;br /&gt;SSL traffic (port 443)&lt;br /&gt;POP3 traffic (port 110)&lt;br /&gt;SMTP traffic (port 25)&lt;br /&gt;P2P traffic (various port)&lt;br /&gt;Unknown traffic (various port)&lt;br /&gt;&lt;br /&gt;After making a list of the traffic type, and the ports they operate on, you need to look at the list and decide if it is at all even capable of being forced out a certain internet connection.exión a internet.&lt;br /&gt;&lt;br /&gt;Using the above list as an example here is what I came up with&lt;br /&gt;HTTP traffic (no problems found yet)&lt;br /&gt;SSL traffic (some issues, for normal SSL websites and 90% of all software it is not a problem, I'll explain why issues can arise later)&lt;br /&gt;POP3 traffic (no problems found yet)&lt;br /&gt;SMTP traffic (no problems found yet)&lt;br /&gt;P2P traffic (must go out same internet connection as Unknown Traffic, I'll explain why this is later)&lt;br /&gt;Unknown traffic (must go out same internet connection as P2P traffic, I'll explain why this is later)&lt;br /&gt;&lt;br /&gt;Now for a quick explanation of why there can be some issues depending on the traffic type. Some websites/programs do not play friendly with multiple requests from different IP addresses, this is the reason why ECMP has so many problems. I will provide a simple solution to the rare conditions where load-balancing can't be completed.&lt;br /&gt;&lt;br /&gt;Again using the above as an example lets explain where and why issues can be arise. SSL - The beauty of a website is that are separate requests for different data, ie. loading pictures from 3 different sources would be a request to each respective server. The result is if a we have a website that uses both SSL and HTTP traffic we know that in most cases the website will just answer the request without care of the originating IP address. However, and this is a special case, if the website/program developer checks where the requests are originating and they find that the IP are different, they may not succesfully answer those requests (this can be by design or by accident). I had 2 cases of this, in both cases it was secured medical websites that where using it as a method of protecting their data.&lt;br /&gt;&lt;br /&gt;P2P and Unknown - I am addressing these together because the issue is one and the same. RouterOS doesn't identify P2P based on any single condition, but instead analyzes the packets! This means RouterOS needs time to watch the data before it realizes that is in fact P2P traffic. As a result RouterOS doesn't know the data is P2P until AFTER the connection is made. This is important because the only way to send data out a specific internet connection you must know that traffic is BEFORE the connection is made. So as with P2P traffic, unknown traffic is just that, it is unknown. By marking the unknown traffic though you can control what internet connection is used for both P2P and the left over unknown traffic (very useful!)&lt;br /&gt;[edit]&lt;br /&gt;Step 2 - Setting Up the Network&lt;br /&gt;&lt;br /&gt;Before we get to the real point of this tutorial we need a fictious network we can use as an example.&lt;br /&gt;client computers (172.18.1.0/24)&lt;br /&gt;Internet Gateways (10.0.1.1/24, 10 0.2.1/24)&lt;br /&gt;RouterOS IPs (10.0.1.2/24, 10.0.2.2/24)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Asuming that the IPs, default routes, and DNS settings are already in place the following allow users to get internet access.&lt;br /&gt;&lt;br /&gt;Create Address-List for permitted use of internet&lt;br /&gt;/ ip firewall address-list&lt;br /&gt;add list="Salida_Internet" address=172.18.1.0/24 comment="" disabled=no&lt;br /&gt;&lt;br /&gt;Create Address-List to bypass load-balancing&lt;br /&gt;/ ip firewall address-list&lt;br /&gt;add list="WAN-01" address=172.18.1.24/32 comment="" disabled=no&lt;br /&gt;add list="WAN-02" address=172.18.1.76/32 comment="" disabled=no&lt;br /&gt;&lt;br /&gt;Apply 'Masquerading'to the traffic leaving the WAN interfaces&lt;br /&gt;/ ip firewall nat&lt;br /&gt;add chain=srcnat action=masquerade out-interface="WAN - 01" src-address-list="Allowed - Internet" comment="Gateway 10.0.1.1/24" disabled=no&lt;br /&gt;add chain=srcnat action=masquerade out-interface="WAN - 02" src-address-list="Allowed - Internet" comment="Gateway 10.0.2.1/24" disabled=no&lt;br /&gt;&lt;br /&gt;Clients should be able to browse the internet, however only one internet connection would be used (the current default route in RouterOS)&lt;br /&gt;[edit]&lt;br /&gt;Step 3 - Using RouterOS's Mangle Tool to mark specific traffic&lt;br /&gt;&lt;br /&gt;This following is the necessary RouterOS commands to mark particular traffic for a certain route, we are using the same example for traffic types as in the beginning, HTTP, SSL, POP3, SMTP, P2P, and Unknown&lt;br /&gt;/ ip firewall mangle&lt;br /&gt;add chain=prerouting action=mark-routing new-routing-mark="WAN-01" src-address-list="WAN-01" passthrough=no comment="" disabled=no&lt;br /&gt;add chain=prerouting action=mark-routing new-routing-mark="WAN-02" src-address-list="WAN-02" passthrough=no comment="" disabled=no&lt;br /&gt;add chain=prerouting action=mark-routing new-routing-mark="HTTP traffic" passthrough=no dst-port=80 protocol=tcp comment="" disabled=no&lt;br /&gt;add chain=prerouting action=mark-routing new-routing-mark="SSL traffic" passthrough=no dst-port=443 protocol=tcp comment="" disabled=no&lt;br /&gt;add chain=prerouting action=mark-routing new-routing-mark="POP3 traffic" passthrough=no dst-port=110 protocol=tcp comment="" disabled=no&lt;br /&gt;add chain=prerouting action=mark-routing new-routing-mark="SMTP traffic" passthrough=no dst-port=25 protocol=tcp comment="" disabled=no&lt;br /&gt;add chain=prerouting action=mark-routing new-routing-mark="P2P traffic" passthrough=no p2p=all-p2p comment="" disabled=no&lt;br /&gt;add chain=prerouting action=mark-routing new-routing-mark="Unknown traffic" passthrough=no comment="" disabled=no&lt;br /&gt;&lt;br /&gt;The first two lines provide a method of marking particular clients to bypass the load-balancing and use only a certain internet connection for all of their traffic. The following lines with mark traffic based on the dst-port, notice how we are not passing though, also notice that we are marking all traffic, even if not known, this always for a different internet connection to be specified fot the Unknown and P2P instead of using the router's default route. I also mark P2P separately even though it must go out the same internet connection as Unknown traffic. I do this for a couple of reasons, one is that I could easily stop all traffic by simply disabling a route, and the other is in my RouterOS configuration I use a lot of QoS, it very easy to remember how everything is configured if the QoS mirrors the load-balancing&lt;br /&gt;&lt;br /&gt;So now we are marking traffic for their respectives routes, next is to add those actual routes.&lt;br /&gt;[edit]&lt;br /&gt;Step 4 - Using the routing functions of RouterOS to force traffic ou certain internet connections&lt;br /&gt;&lt;br /&gt;This following is the necessary RouterOS commands to provide routes for the marked HTTP, SSL, POP3, SMTP, P2P, and Unknown Traffic&lt;br /&gt;/ ip route&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.0.1.1 scope=255 target-scope=10 routing-mark="WAN - 01" comment="" disabled=no&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.0.2.1 scope=255 target-scope=10 routing-mark="WAN - 02" comment="" disabled=no&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.0.2.1 scope=255 target-scope=10 routing-mark="HTTP traffic" comment="" disabled=no&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.0.2.1 scope=255 target-scope=10 routing-mark="SSL traffic" comment="" disabled=no&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.0.2.1 scope=255 target-scope=10 routing-mark="POP3 traffic" comment="" disabled=no&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.0.1.1 scope=255 target-scope=10 routing-mark="SMTP traffic" comment="" disabled=no&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.0.1.1 scope=255 target-scope=10 routing-mark="P2P traffic" comment="" disabled=no&lt;br /&gt;add dst-address=0.0.0.0/0 gateway=10.0.1.1 scope=255 target-scope=10 routing-mark="Unknown traffic" comment="" disabled=no&lt;br /&gt;&lt;br /&gt;The first two lines provide the routes necessary to give the clients that are not being load-balanced via traffic type the correct gateway to the internet. The remaining lines are the routes necessary to provide the appropiate gateway based on traffic type&lt;br /&gt;[edit]&lt;br /&gt;Step 5 - Review what you've created&lt;br /&gt;&lt;br /&gt;What did you do: * You intelligently broke up your internet traffic into different types * Your marked that traffic using the Mangle Tool of RouterOS * You created a bypass list to allow certain IP to bypass the Per-Traffic Load-Balancing * You assigned particular routes based on the traffic you marked with Mangle&lt;br /&gt;[edit]&lt;br /&gt;Conclusion&lt;br /&gt;&lt;br /&gt;What you have done is very powerful and this tutorial provides just the tip of the iceberg so to say. The traffic types I have listed here are only a small amout of the total and you may want to add many others (ie. DNS, Terminal Services, ICMP, etc). This can be used is a great deal of different ways be it in a small offfice enviroment (separating your email usage from your browsing) or a large wireless ISP (for load-balancing). Some tips and final thougths&lt;br /&gt;&lt;br /&gt;1. Think though what you want to achieve before you start 2. Pay attention to the traffic of type on each line (is it incoming intensive or outgoing intensive) 3. Finally experiment, nothing better then finding better, faster, and more intelligent ways to improve your services with a little capital costs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2312773445344116876-6099938966840925358?l=ariaperdana.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ariaperdana.blogspot.com/feeds/6099938966840925358/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2312773445344116876&amp;postID=6099938966840925358' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/6099938966840925358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2312773445344116876/posts/default/6099938966840925358'/><link rel='alternate' type='text/html' href='http://ariaperdana.blogspot.com/2008/04/per-traffic-load-balancing.html' title='Per-Traffic Load Balancing'/><author><name>Aria Perdana</name><uri>http://www.blogger.com/profile/03135187731505256955</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_z-gHrIDzoGI/R_skvCIt3fI/AAAAAAAAAAM/00evg8CYe8U/S220/17092007117.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2312773445344116876.post-3452717263295582308</id><published>2008-04-08T13:30:00.004+07:00</published><updated>2008-04-08T13:55:01.782+07:00</updated><title type='text'>HostSpot</title><content type='html'>HotSpot User AAA&lt;br /&gt;Document revision: 2.3 (Tue Sep 27 14:30:17 GMT 2005)&lt;br /&gt;Applies to: V2.9&lt;br /&gt;&lt;br /&gt;General Information&lt;br /&gt;Summary&lt;br /&gt;&lt;br /&gt;This document provides information on authentication, authorization and accounting parameters and configuration for HotSpot gateway system.&lt;br /&gt;Specifications&lt;br /&gt;Packages required: system&lt;br /&gt;License required: Level1&lt;br /&gt;Submenu level: /ip hotspot user&lt;br /&gt;Standards and Technologies: RADIUS&lt;br /&gt;Hardware usage: Local traffic accounting requires additional memory&lt;br /&gt;Related Documents&lt;br /&gt;HotSpot Gateway&lt;br /&gt;PPP User AAA&lt;br /&gt;Router User AAA&lt;br /&gt;RADIUS client&lt;br /&gt;Software Package Management&lt;br /&gt;IP Addresses and ARP&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;HotSpot User Profiles&lt;br /&gt;Submenu level: /ip hotspot user profile&lt;br /&gt;Description&lt;br /&gt;&lt;br /&gt;HotSpot User profiles are used for common user settings. Profiles are like user groups, they are grouping users with the same limits.&lt;br /&gt;Property Description&lt;br /&gt;address-pool (name | none; default: none) - the IP poll name which the users will be given IP addresses from. This works like dhcp-pool method in earlier versions of MikroTik RouterOS, except that it does not use DHCP, but rather the embedded one-to-one NATnone - do not reassign IP addresses to the users of this profile&lt;br /&gt;none - do not reassign IP addresses to the users of this profile&lt;br /&gt;&lt;br /&gt;advertise (yes | no; default: no) - whether to enable forced advertisement popups for this profile&lt;br /&gt;&lt;br /&gt;advertise-interval (multiple choice: time; default: 30m,10m) - set of intervals between showing advertisement popups. After the list is done, the last value is used for all further advertisements&lt;br /&gt;&lt;br /&gt;advertise-timeout (time | immediately never; default: 1m) - how long to wait for advertisement to be shown, before blocking network access with walled-garden&lt;br /&gt;&lt;br /&gt;advertise-url (multiple choice: text; default: http://www.mikrotik.com/,http://www.routerboard.com/) - list of URLs to show as advertisement popups. The list is cyclic, so when the last item reached, next time the first is shown&lt;br /&gt;&lt;br /&gt;idle-timeout (time | none; default: none) - idle timeout (maximal period of inactivity) for authorized clients. It is used to detect, that client is not using outer networks (e.g. Internet), i.e., there is NO TRAFFIC coming from that client and going through the router. Reaching the timeout, user will be logged out, dropped of the host list, the address used by the user will be freed, and the session time accounted will be decreased by this valuenone - do not timeout idle users&lt;br /&gt;none - do not timeout idle users&lt;br /&gt;&lt;br /&gt;incoming-filter (name) - name of the firewall chain applied to incoming packets from the users of this profile&lt;br /&gt;&lt;br /&gt;incoming-packet-mark (name) - packet mark put on all the packets from every user of this profile automatically&lt;br /&gt;&lt;br /&gt;keepalive-timeout (time | none; default: 00:02:00) - keepalive timeout for authorized clients. Used to detect, that the computer of the client is alive and reachable. If check will fail during this period, user will be logged out, dropped of the host list, the address used by the user will be freed, and the session time accounted will be decreased by this valuenone - do not timeout unreachable users&lt;br /&gt;none - do not timeout unreachable users&lt;br /&gt;&lt;br /&gt;name (name) - profile reference name&lt;br /&gt;&lt;br /&gt;on-login (text; default: "") - script name to launch after a user has logged in&lt;br /&gt;&lt;br /&gt;on-logout (text; default: "") - script name to launch after a user has logged out&lt;br /&gt;&lt;br /&gt;open-status-page (always | http-login; default: always) - whether to show status page also for users authenticated using mac login method. Useful if you want to put some information (for example, banners or popup windows) in the alogin.html page so that all users would see ithttp-login - open status page only in case of http login (including cookie and https login methods)&lt;br /&gt;always - open http status page in case of mac login as well&lt;br /&gt;http-login - open status page only in case of http login (including cookie and https login methods)&lt;br /&gt;always - open http status page in case of mac login as well&lt;br /&gt;&lt;br /&gt;outgoing-filter (name) - name of the firewall chain applied to outgoing packets to the users of this profile&lt;br /&gt;&lt;br /&gt;outgoing-packet-mark (name) - packet mark put on all the packets to every user of this profile automatically&lt;br /&gt;&lt;br /&gt;rate-limit (text; default: "") - Rate limitation in form of rx-rate[/tx-rate] [rx-burst-rate[/tx-burst-rate] [rx-burst-threshold[/tx-burst-threshold] [rx-burst-time[/tx-burst-time] [priority] [rx-rate-min[/tx-rate-min]]]] from the point of view of the router (so "rx" is client upload, and "tx" is client download). All rates should be numbers with optional 'k' (1,000s) or 'M' (1,000,000s). If tx-rate is not specified, rx-rate is as tx-rate too. Same goes for tx-burst-rate and tx-burst-threshold and tx-burst-time. If both rx-burst-threshold and tx-burst-threshold are not specified (but burst-rate is specified), rx-rate and tx-rate is used as burst thresholds. If both rx-burst-time and tx-burst-time are not specified, 1s is used as default. Priority takes values 1..8, where 1 implies the highest priority, but 8 - the lowest. If rx-rate-min and tx-rate-min are not specified rx-rate and tx-rate values are used. The rx-rate-min and tx-rate-min values can not exceed rx-rate and tx-rate values.&lt;br /&gt;&lt;br /&gt;session-timeout (time; default: 0s) - session timeout (maximal allowed session time) for client. After this time, the user will be logged out unconditionally0 - no timeout&lt;br /&gt;0 - no timeout&lt;br /&gt;&lt;br /&gt;shared-users (integer; default: 1) - maximal number of simultaneously logged in users with the same username&lt;br /&gt;&lt;br /&gt;status-autorefresh (time | none; default: none) - HotSpot servlet status page autorefresh interval&lt;br /&gt;&lt;br /&gt;transparent-proxy (yes | no; default: yes) - whether to use transparent HTTP proxy for the authorized users of this profile&lt;br /&gt;&lt;br /&gt;Notes&lt;br /&gt;&lt;br /&gt;When idle-timeout or keepalive is reached, session-time for that user is reduced by the actual period of inactivity in order to prevent the user from being overcharged.&lt;br /&gt;Example&lt;br /&gt;HotSpot Users&lt;br /&gt;Submenu level: /ip hotspot user&lt;br /&gt;Property Description&lt;br /&gt;address (IP address; default: 0.0.0.0) - static IP address. If not 0.0.0.0, client will always get the same IP address. It implies, that only one simultaneous login for that user is allowed. Any existing address will be replaced with this one using the embedded one-to-one NAT&lt;br /&gt;&lt;br /&gt;bytes-in (read-only: integer) - total amount of bytes received from user&lt;br /&gt;&lt;br /&gt;bytes-out (read-only: integer) - total amount of bytes sent to user&lt;br /&gt;&lt;br /&gt;limit-bytes-in (integer; default: 0) - maximum amount of bytes user can transmit (i.e., bytes received from the user)0 - no limit&lt;br /&gt;0 - no limit&lt;br /&gt;&lt;br /&gt;limit-bytes-out (integer; default: 0) - maximum amount of bytes user can receive (i.e., bytes sent to the user)0 - no limit&lt;br /&gt;
