Page 1 of 1

how do detect mikrotik rb from command line (CLI)

Posted: Fri Jul 24, 2015 5:35 pm
by gabak
i have centos with no GUI and i need to see all mikrotik that are connected in the same lan the centos server is connected.

scenario: i m accessing via ssh to a remote lan where there are some MT live.

Re: how do detect mikrotik rb from command line (CLI)

Posted: Sun Jul 26, 2015 1:58 pm
by jebz
system resource print
Returns many resource values with
version: 6.29
etc.

Re: how do detect mikrotik rb from command line (CLI)

Posted: Mon Jul 27, 2015 11:11 pm
by Ape
Hi,

if the have SSH enabled, you can find the with their ssh server string.
user@server:~$ nmap -A -T4 -p 22 -n 192.168.0.1

Starting Nmap 6.40 ( http://nmap.org ) at 2015-07-27 22:12 CEST
Nmap scan report for 192.168.0.1
Host is up (0.00034s latency).
PORT   STATE SERVICE VERSION
22/tcp open  ssh     MikroTik RouterOS sshd (protocol 2.0)
|_ssh-hostkey: 1024 de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be (DSA)
Service Info: OS: Linux; Device: router; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 0.65 seconds
Some bash script wrapping this should be able to find all your MikroTiks.

Another way that comes to my mind is listenig for the MNDP packets (http://wiki.mikrotik.com/wiki/Manual:IP ... _discovery).

Ape