Friday, October 4, 2013

Posted by musmul |

Summary

Winbox is a small utility that allows administration of Mikrotik RouterOS using a fast and simple GUI. It is a native Win32 binary, but can be run on Linux and Mac OSX using Wine.
All Winbox interface functions are as close as possible to Console functions, that is why there are no Winbox sections in the manual.
Some of advanced and system critical configurations are not possible from winbox, like MAC address change on an interface.

Starting the Winbox

Winbox loader can be downloaded directly from the router.

Open your browser and enter router's IP address, RouterOS welcome page will be displayed. Click on the link to download winbox.exe
Win-web-snap.png

When winbox.exe is downloaded, double click on it and winbox loader window will pop up:
Winbox-loader.png

To connect to the router enter IP or MAC address of the router, specify username and password (if any) and click onConnect button. You can also enter the port number after the IP address, separating them with a colon, like this 192.168.88.1:9999. The port can be changed in RouterOS services menu.
Icon-note.png
Note: It is recommended to use IP address whenever possible. MAC session uses network broadcasts and is not 100% reliable.


You can also use neighbor discovery, to list available routers by clicking on [...] button:
Winbox-loader2.png
From list of discovered routers you can click on IP or MAC address column to connect to that router. If you click on IP address then IP will be used to connect, but if you click on MAC Address then MAC address will be used to connect to the router.
Icon-note.png
Note: Neighbor discovery will show also devices which are not compatible with Winbox, like Cisco routers or any other device that uses CDP (Cisco Discovery Protocol)


Description of buttons and fields of loader screen
  • [...] - discovers and shows MNDP (MikroTik Neighbor Discovery Protocol) or CDP (Cisco Discovery Protocol) devices.
  • Connect - Connect to the router
  • Save - Save address, login, password and note. Saved entries are listed at the bottom of loader window.
  • Remove - Remove selected entry from saved list
  • Tools... - Allows to run various tools: removes all items from the list, clears cache on the local disk, imports addresses from wbx file or exports them to wbx file.
  • Connect To: - destination IP or MAC address of the router
  • Login - username used for authentication
  • Password - password used for authentication
  • Keep Password - if unchecked, password is not saved to the list
  • Secure Mode - if checked, winbox will use TLS encryption to secure session
  • Load Previous Session - if checked, winbox will try to restore all previously opened windows.
  • Note - description of the router that will be saved to the list.
Icon-warn.png
Warning: Passwords are saved in plain text. Anyone with access to your file system will be able to retrieve passwords.

It is possible to use command line to pass connect to user and password parameters automatically:
winbox.exe [<connect-to> [<login> [<password>]]]
For example (with no password):
winbox.exe 10.5.101.1 admin ""
Will connect to router 10.5.101.1 with username "admin"without password.

IPv6 connectivity

Starting from v5RC6 Winbox supports IPv6 connectivity. To connect to the routers IPv6 address, it must be placed in square braces the same as in web browsers when connecting to IPv6 server. Example:
Winbox-ipv6-loader.png
Winbox neighbor discovery is now capable of discovering IPv6 enabled routers. As you can see from the image below, there are two entries for each IPv6 enabled router, one entry is with IPv4 address and another one with IPv6 link-local address. You can easily choose to which one you want to connect:
Winbox-ipv6nd.png

Interface Overview

Winbox interface has been designed to be intuitive for most of the users. Interface consists of:
  • Main toolbar at the top where users ca add various info fields, like CPU and memory usage.
  • Menu bar on the left - list of all available menus and sub-menus. This list changes depending on what packages are installed. For example if IPv6 package is disabled, then IPv6 menu and all it's sub-menus will not be displayed.
  • Work area - area where all menu windows are opened.
Winbox-workarea.png 
Title bar shows information to identify with which router Winbox session is opened. Information is displayed in following format:
[username]@[Router's IP or MAC] ( [RouterID] ) - Winbox [ROS version] on [RB model] ([platform])
From screenshot above we can see that user admin is logged into router with IP address 10.1.101.18. Router's ID isMikroTik, currently installed RouterOS version is v5.0beta1, RouterBoard is RB800 and platform is PowerPC.
On the Main toolbar's left side is located undo and redo buttons to quickly undo any changes made to configuration. On the right side is located:
  • winbox traffic indicator displayed as a green bar,
  • indicator that shows whether winbox session uses TLS encryption
  • checkbox Hide password. This checkbox replaces all sensitive information (for example, ppp secret passwords) with '*' asterisk symbols.

Work Area and child windows

Winbox has MDI interface meaning that all menu configuration (child) widows are attached to main (parent) Winbox window and are showed in work area.
Winbox-win-child.png
Child windows can not be dragged out of working area. Notice in screenshot above that Interface window is dragged out of visible working area and horizontal scroll bar appeared at the bottom. If any window is outside visible work area boundaries the vertical or/and horizontal scrollbars will appear.

Child window menu bar

Each child window has its own toolbar. Most of the windows have the same set of toolbar buttons:
  • Win-add.png Add - add new item to the list
  • Win-remove.png Remove - remove selected item from the list
  • Win-enable.png Enable - enable selected item (the same as enable command from console)
  • Win-disable.png Disable - disable selected item (the same as disable command from console)
  • Win-comment.png Comment - add or edit comment
  • Win-sort.png Sort - allows to sort out items depending on various parameters. Read more >>
Almost all windows have quick search input field at the right side of the toolbar. Any text entered in this field is searched through all the items and highlighted as illustrated in screenshot below
Winbox-window-search.png
Notice that at the right side next to quick find input filed there is a dropdown box. For currently opened (IP Route) window this dropdown box allows to quickly sort out items by routing tables. For example if main is selected, then only routes from main routing table will be listed.
Similar dropdown box is also in all firewall windows to quickly sort out rules by chains.

Sorting out displayed items

Almost every window has a Sort button. When clicking on this button several options appear as illustrated in screenshot below
Winbox-window-sort.png
Example shows how to quickly filter out routes that are in 10.0.0.0/8 range
  1. Press Sort button
  2. Chose Dst.Address from the first dropdown box.
  3. Chose in form the second dropdown box. "in" means that filter will check if dst address value is in range of specified network.
  4. Enter network against which values will be compared (in our example enter "10.0.0.0/8")
  5. These buttons are to add or remove another filter to the stack.
  6. Press Filter button to apply our filter.
As you can see from screenshot winbox sorted out only routes that are within 10.0.0.0/8 range.
Comparison operators (Number 3 in screenshot) may be different for each window. For example "Ip Route" window has only two is and in. Other windows may have operators such as "is not", "contains", "contains not".
Winbox allows to build stack of filters. For example if there is a need to filter by destination address and gateway, then
  • set first filter as described in example above,
  • press [+] button to add another filter bar in stack.
  • set up seconf filter to filter by gateway
  • press Filter button to apply filters.
You can also remove unnecessary filter from the stack by pressing [-] button.

Customizing list of displayed columns

By default winbox shows most commonly used parameters. However sometimes it is needed to see another parameters, for example "BGP AS Path" or other BGP attributes to monitor if routes are selected properly.
Winbox allows to customize displayed columns for each individual window. For example to add BGP AS path column:
  • Click on little arrow button (1) on the right side of the column titles or right mouse click on the route list.
  • From popped up menu move to Show Columns (2) and from the sub-menu pick desired column, in our case click on BGP AS Path (3)
Winbox-window-field.png
Changes made to window layout are saved and next time when winbox is opened the same column order and size is applied.

Detail mode

It is also possible to enable Detail mode. In this mode all parameters are displayed in columns, first column is parameter name, second column is parameter's value.
To enable detail mode right mouse click on the item list and from the popupmenu pick Detail mode
Winbox-window-detail.png

Category view

It is possible to list items by categories. In tis mode all items will be grouped alphabetically or by other category. For example items may be categorized alphabetically if sorted by name, items can also be categorized by type like in screenshot below.
To enable Category view, right mouse click on the item list and from the popupmenu pick Show Categories
Winbox-window-category.png

Drag & Drop

It is possible to upload and download files to/from router using winbox drag & drop functionality.
Winbox1.jpg
Icon-note.png
Note: Drag & Drop does not work if winbox is running on Linux using wine. This is not a winbox problem, wine does not support drag & drop.

Traffic monitoring

Winbox can be used as a tool to monitor traffic of every interface, queue or firewall rule in real-time. Screenshot below shows ethernet traffic monitoring graphs.
Winbox-window-trafmon.png

Item copy

This shows how easy it is to copy an item in Winbox. In this example, we will use the COPY button to make a Dynamic WDS interface into a Static interface.
This image shows us the initial state, as you see DRA indicates "D" which means Dynamic:
  • 2009-04-02 1241.png
Double-Click on the interface and click on COPY:
  • 2009-04-02 1241 001.png
A new interface window will appear, a new name will be created automatically (in this case WDS2)
  • 2009-04-02 1242.png
You can see that the new interface status has changed:
  • 2009-04-02 1242 001.png

Tuesday, September 24, 2013

Posted by musmul |


Perintah-perintah Dasar di Linux Ubuntu.Ubuntu sangat terkenal dengan CLI-nya (Command Line Interface). CLI sendiri adalah antar muka yang tidak menyediakan grafik, baik berupa gambar-gambar, jendela-jendela ataupun animasi-animasi yang bisa memanjakan pengguna, melainkan hanya berupa teks yang harus diketikkan oleh pengguna. Jadi, apabila user ingin melakukan operasi dalam sistem operasi tersebut, misalnya melakukan copy,  rename,  cut, delete, dan sebagainya,  maka pengguna harus megetikkan perintah berupa teks dengan cara manual dan bukan dengan klik-klik seperti pada interface GUI (Graphic User Interface).


Berikut ini adalah beberapa perintah yang bisa digunakan di sistem operasi Ubuntu pada mode CLI, baik Desktop maupun Server, yang juga banyak untuk bisa digunakan pada distro yang lain. Pada contoh ini saya menggunakan Ubuntu Desktop 10.10.

1. sudo su

Digunakan untuk login sebagai root/pengguna tertinggi

Sintaks sudo su

2. login

Digunakan untuk login sebagai user lain, namun harus menjadi root dulu untuk bisa menjalankan peirntah ini.

Sintaks : login namauser

Contoh : login adam

3. cd

Digunakan untuk berpindah direktori

Sintaks : cd alamat_direktori

Contoh : cd /var/www

4. pwd

Digunakan untuk memperlihatkan di direktori mana posisi kita berada sekarang.

Sintaks : pwd

5. ls

Digunakan untuk melihat isi sebuah direktori.

Sintaks : ls

6. cp

Digunakan untuk melakukan copy file.

Sintaks : cp /direktori/file_yang_ingin_dicopy /direktori tujuan

Contoh : cp /etc/file1.txt /var/www

7. mv

Digunakan untuk melakukan memindahkan, cut atau rename file.

Sintaks :

mv /direktori/file_yang_ingin_dicut /direktori tujuan (cut)

mv /direktori/file_yang_ingin_direname /nama_baru_file (rename)

Contoh:

mv /etc/file1.txt /var/www

mv /etc/file1.txt file2.txt

8. mkdir

Digunakan untuk membuat folder baru.

Sintaks : mkdir nama_folder

Contoh : mkdir folder1

9. rmdir

Digunakan untuk menghapus folder.

Sintaks : rmdir nama_folder

Contoh : rmdir folder1

10. touch

Digunakan untuk membuat file baru.

Sintaks : touch nama_file

Contoh : touch file1.txt

11. rm

Digunakan untuk menghapus file.

Sintaks : rm nama_file

Contoh : rm file1.txt

12. more

Digunakan untuk menampilkan isi sebuah file

Sintaks : more nama_fie

Contoh : more file1.txt

13. echo

Digunakan untuk menuliskan sesuatu kata atau kalimat ke sebuah file.

Sintaks : echo “isi pesan” nama_file

Contoh : echo “Hai ini adalah contoh pesan” >> file1.txt

14. adduser

Digunakan untuk menambah user baru.

Sintaks : adduser nama_user

Contoh : adduser adamkurniawan

15. addgroup

Digunakan untuk menambah group baru

Sintaks : addgroup nama_group

Contoh : addgroup grup1

16. lsusb

Digunakan untuk melihat perangkat usb yang sedang terkoneksi ke komputer

Sintaks : lsusb

17. lspci

Digunakan untuk melihat perangkat pci yang sedang terkoneksi ke komputer

Sintaks : lspci

18. lshw

Digunakan untuk melihat hardware komputer.

Sintaks : lshw

19. dmesg

Digunakan untuk melihat hardware yang sedang beraktifitas

Sintaks : dmseg

20. top

Digunakan untuk melihat proses yang sedang berjalan, seperti Task Manager pada Windows.

Sintaks : top

21. cpuinfo

Digunakan untuk melihat spesifikasi komputer.

Sintaks : more /proc/cpuinfo

22. meminfo

Digunakan untuk melihat status RAM

Sintaks : more /proc/meminfo

23. clear

Digunakan untuk membersihkan layar

Sintaks : clear

24. halt

Digunakan untuk mematikan komputer, namun harus sebagai root.

Sintaks : halt

25. reboot

Digunakan untuk merestart komputer, namun harus sebagai root.

Sintaks : reboot

26. exit

Digunakan untuk keluar dari terminal.

Sintaks : exit

27. wget

Digunakan untuk mendownload via terminal

Sintaks : wget link_download

Contoh : wget www.insightcalendar.com/Insight_Calendar_1-1_Setup.exe

28. ifconfig

Digunakan untuk melihat konfigurasi ethernet/kartu jaringan.

Sintaks : ifconfig

29. apt-get

Digunakan untuk memperoleh paket/software dari repository ubuntu secara online.

Sintax : apt-get nama_paket

Contoh :

apt-get update (untuk melakukan update repository)

apt-get update wine (untuk mendapatkan paket wine)

30. tar

Digunakan untuk melakukan extract file.

Sintaks : tar [parameter] nama_file

Contoh : tar -xzvf komodo-edit-5.2.4-4343-linux-libcpp6-x86.tar.gz

31. nautilus

Digunakan untuk membuka tampilan GUI secara langsung.

Sintaks : nautilus

Contoh : sudo nautilus (menggunakan mode GUI dengan status root)

32. df -h

melihat sisa kapasitas harddisk.

sintaks : df -h

33. who     

digunakan untuk melihat nama login kita.

sintaks : who      

34. cat          

digunakan untuk membuka file.

sintaks : cat        

contoh: cat test.txt

35. date 

melihat tanggal

sintaks : date

36. cal

melihat kalender

sintaks : melihat tanggal

37. hostname 

Menampilkan nama komputer.

sintaks: hostname 

38. free     

Melihat Free memory.

sintaks: free     

39. History

melihat perintah apa saja yang pernah diketik

sintaks : History

40. deluser 

Menghapus user dari sistem

sintaks : deluser [nama user]


uname -r = Melihat kernel yang digunakan pada OS

uname -a = Informasi system kernel anda

cat /proc/cpuinfo = Melihat file pada /proc directori yang bukan merupakan file nyata (not real files).

cat /proc/interrupts = Melihat alamat interrupt yang dipakai.

cat /proc/version = Versi dari Linux dan informasi lainnya.

cat /proc/filesystems = Melihat filesystem yang digunakan.

cat /etc/printcap = Melihat printer yang telah disetup

finger username = Melihat informasi user, coba jalankan; fingerroot

last = Melihat user sebelumnya yang telah login di komputer.

uptime = Melihat jumlah waktu pemakaian komputer oleh seseorang, terhitung proses reboot terakhir.

ps (=print status)= Melihat proses-proses yang dijalankan oleh user

ps axu = Melihat seluruh proses yang dijalankan, walaupun tanpa terminal control, juga ditampilkan nama dari user untuk setiap proses.

top = Melihat proses yang berjalan, dengan urutan penggunaan cpu.

apropos =  Untuk mencari perintah pada sistem operasi yang mempunyai fungsi yang sama. 

chmod = Mengubah perizinan suatu direktori/file. 

wc = Menghitung jumlah kata, jumlah baris dan jumlah karakter dalam suatu file . 

man = Singkatan dari manual yaitu untuk menampilkan halaman manual untuk semua perintah UNIX.

grep = Mencari isi suatu file di sembarang directori. 

pwd = Menampilkan nama direktori dimana Anda saat itu sedang berada.

ps = Digunakan untuk memonitor informasi tentang proses yang aktif dalam sistem UNIX. 

kill =  Digunakan untuk menghentikan proses yang sedang berjalan. 

bc = Perintah bc dapat digunakan sebagai calculator. 

wall = Pengiriman pesan oleh super user. 

:w di gunakan u/ menyimpan file or sama dengan (save).

:q digunakan u/ keluar dari editor tandan mentimpan file.

:wq digunakan u/ keluar dari editor sekaligus menyimpan file.

tail = Menampilkan 10 baris terakhir dari suatu file.

ls –l = Melihat semua file lengkap

ls -a = Menampilkan semua file atau direktori yang tersembunyi

ls -f = Menampilkan semua file atau direktori tanpa proses shorting

grep root /etc/passwd =  Mencari kata atau kalimat dalam file

http://achmad-zainuri.blogspot.com/2013/02/perintah-dasar-linux-ubuntu.html

Posted by musmul |


Struktur Direktori Pada Linux. Struktur direktori Linux sangat berbeda dengan struktur direktori windows/dos dimana dalam Linux tidak akan ditemukan drive a, drive c dan drive lainnya karena Linux menganut satu direktori utama yaitu / dibaca root, perhatikan ada user root, /root (dibaca slash root) hal ini sesuatu yang berbeda Buka Nautilus, cari /.
  1. /bin - Direktori yang berisi binary files yang dapat dieksekusi oleh users system. Direktori ini menghandle perintah perintah standar GNU/Linux diantaranya ls, cp, mv dan beberapa lainnya.
  2. /boot - Direktori yang berisikan file-file yang dibutuhkan saat proses booting termasuk didalamnya adalah kernel image GNU/Linux.
  3. /dev - Direktori yang merepresentasikan/mewakili device hardware. Dalam GNU/Linux everything is files, semua device hardware komputer berada dibawah direktori ini.
  4. /etc - Direktori yang berisi file-file konfigurasi system. File-file konfigurasi ini dibutuhkan oleh paket-paket lain untuk menjaga prilaku system.
  5. /home - GNU/Linux merupakan sistem operasi yang mendukung multiuser. Kebijakan keamanannya sangat ketat, olehnya itu direktori /home merupakan home direktori atau area kerja dari masing-masing user GNU/Linux kecuali user root (super user).
  6. /lib - Merupakan direktori file-file library GNU/Linux yang mendukung binary files baik yang berada didirektori /bin maupun /sbin.
  7. /mnt - Direktori yang disiapkan untuk mounting point device storage.
  8. /media - Direktori memounting/mengaitkan media removable storages seperti harddisk eksternal, floppy disk, cdrom/dvdrom, flashdisk, digital kamera maupun media lainnya.
  9. /opt - Direktori yang berisi optional application software packages. Diharapkan dengan adanya direktori ini manajemen paket aplikasi tambahan dapat dilakukan dengan mudah.
  10. /proc - merupakan direktori yang unik yang dinamis karena direktori ini berisi virtual file system yang menyediakan akses informasi kernel secara realtime.
  11. /root - Home direktori khusus super user (user root). Direktori ini sengaja dipisahkan dari direktori home user biasa di/home untuk menghandle jika partisi /home gagal di mounting maka system secara keseluruhan dapat diselamatkan oleh root. /root dibaca slash root.
  12. /sbin - Direktori ini pada prinsipnya sama dengan direktori /bin yang berisi file-file binary. Namun direktori /sbin ini hanya dapat diakses oleh user root dalam kondisi sistem normal. Users biasa tidak memiliki akses untuk menjalankan binary files di direktori ini
  13. /tmp - Direktori yang berisi temporary files artinya file-file yang sifatnya hanya dibutuhkan sekali saja. Direktori ini dapat diakses oleh semua users sistem.
  14. /usr - Bisa dikatakan sebagai direktori utama dibawah main direktori tempat diletakkannya file-file program aplikasi, dokumentasi, source kernel dan x-window system dari distribusi GNU/Linux yang digunakan.
  15. /var - Direktori tempat menampung file-file log system, spool files dan temporary e-mail files. Direktori ini sangat berguna untuk mengecek jejak kelakuan pengguna dan sistem GNU/Linux.
Semoga artikel Struktur Direktori Pada Linux dapat bermanfaat. Terima Kasih. 
Baca juga artikel Tentang Linux Sebagai Sistem Operasi.

Sumber :  Forum Ubuntu Indonesia