Community discussions

MikroTik App
just joined
Topic Author
Posts: 5
Joined: Wed Nov 14, 2012 3:54 am

ip reverse dns lookup

Sun Jun 23, 2013 5:50 pm

Hey friends,

Is it possible to configure a reverse dns lookup (dns server) on mikrotik v6.0 ?
Frequent Visitor
Frequent Visitor
Posts: 63
Joined: Thu Jul 26, 2012 5:11 pm

Re: ip reverse dns lookup

Tue Jun 25, 2013 5:38 pm

According to my knowledge, no. You would need to have a proper DNS Server for those type of records. Anyway, the reverse DNS lookup is normally done by the owner of the IP, and that normally is your ISP, not you.
Posts: 40
Joined: Wed Aug 01, 2012 8:51 pm

Re: ip reverse dns lookup

Sat Dec 21, 2013 8:49 am


(Private network on, local pc on .100, usual masquerading)

Set up your router like this
/ip dns
set allow-remote-requests=yes servers=,
/ip dns static
add address=
add address=

Then run this on your PC
$ host domain name pointer

(On windows I believe it's "nslookup" -- basically ask to resolve using server 81.254)
User avatar
Forum Veteran
Forum Veteran
Posts: 888
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: ip reverse dns lookup

Fri Dec 14, 2018 8:31 pm

Is it possible to configure a reverse dns lookup (dns server) on mikrotik v6.0 ?
Still answer is NO, the
not support query with types of records like "type=ptr".

WorkARound1 => Tracert to file, read last line and grab second parameter
execute {tool traceroute count=1 use-dns=yes} file=tracert.txt
put [file get tracert.txt contents ]
6     0%    1   0.6ms     0.6     0.6     0.6

WorkARound2 => Use HTTP API and grab second parameter
put ([tool fetch url=("\?q=") output=user as-value ] -> "data")

WorkARound3 => Geo IP from HTTP API (FREE, registration needed) and grab data from JSON format
local key "at_*********************";
local ip "";
put ([tool fetch url=("\?apiKey=".$key."&ipAddress=".$ip) output=user as-value ] -> "data")
{"ip":"","location":{"country":"US","region":"California","city":"Mountain View","lat":37.40599,"lng":-122.078514,"postalCode":"94043","timezone":"-08:00"}}
Remember to use "\?" if your URL have got a "?" inside.
Yes,Yes, I know that "sed" & "awk" & "JSONparser" will be perfect :) and the ROSv7 will have all solutions included, new kernel, etc. ...
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL
WinBox Tip: F6 works as ALT+TAB | - free network schematic | - free ScreenShot software
I will be at MUMEUROPE Prague on ?? ?? 202?

Who is online

Users browsing this forum: enum22, Yotendoten and 59 guests