You are on page 1of 6

(https://u2

4.gov.ua/)

Ugrabi snižene cene i kupi


Dopuni svaku odevnu kombinaciju sa modernim i elegantnim
Samsung pametnim satom.

ShellHacks (/)
Command-Line Tips and Tricks

BLOG (/CAT/BLOG/)

MikroTik: DNS Servers Setup


Posted on July 7, 2023 (/mikrotik-dns-servers-setup/) by admin (/author/admin/)

(/mikrotik-dns-servers-setup/)

Usually an Internet Service Provider (ISP) automatically provides its own Domain Name System (DNS) servers to its users.

However, in some cases it may be required to use a private or public DNS servers.

A MikroTik can be configured to use different DNS servers than those provided by your ISP by default.

This note shows how to setup the DNS servers on the MikroTik router from a command-line (terminal) or Winbox/Webfig.

Cool Tip: How to create a static DNS entry on a MikroTik router! Read more → (/mikrotik-static-dns-entry/)

DNS Servers Setup on MikroTik

Uncheck the “Use Peer DNS” option under the “IP” → “DHCP Client” settings to disable ISP’s DNS servers:
(https://u2

4.gov.ua/)

To disable the “Use Peer DNS” option from the terminal, execute:

[admin@MikroTik] > /ip dhcp-client print


- sample output -
Columns: INTERFACE, USE-PEER-DNS, ADD-DEFAULT-ROUTE, STATUS, ADDRESS
# INTERFACE USE-PEER-DNS ADD-DEFAULT-ROUTE STATUS ADDRESS
;;; defconf
0 ether1 yes yes bound 192.168.1.93/24
[admin@MikroTik] > /ip dhcp-client set ether1 use-peer-dns=no
[admin@MikroTik] > /ip dhcp-client print
- sample output -
Columns: INTERFACE, USE-PEER-DNS, ADD-DEFAULT-ROUTE, STATUS, ADDRESS
# INTERFACE USE-PEER-DNS ADD-DEFAULT-ROUTE STATUS ADDRESS
;;; defconf
0 ether1 no yes bound 192.168.1.93/24

Cool Tip: Free fast public DNS servers! Read more → (/free-fast-public-dns-servers/)

Open the MikroTik’s “DNS Setting” by going to “IP” → “DNS” and set the DNS servers:
(https://u2

4.gov.ua/)

To set the DNS server from the terminal, execute:

[admin@MikroTik] > /ip dns set servers=<dnsServerIP(s)>


- example -
[admin@MikroTik] > /ip dns set servers=8.8.8.8,8.8.4.4

Clear a DNS cache by clicking on the “Cache” button in the “DNS Settings” and then “Flush Cache”:

To clear the DNS cache from the terminal, execute:

[admin@MikroTik] > /ip dns cache flush

To enure that the DNS server settings of your MikroTik router have changed, open the DnsLeakTest.com (https://www.dnsleaktest.com)

from one of the connected devices and run a test:


(https://u2

4.gov.ua/)

In the example above I used the Google’s public DNS servers 8.8.8.8 and 8.8.4.4 , so instead of my IPS’s DNS servers the

DnsLeakTest.com (https://www.dnsleaktest.com) shows that I use the Google’s DNS servers.

Was it useful? Share this post with the world!

(https://www.facebook.com/sharer/sharer.php?

u=https%3A%2F%2Fwww.shellhacks.com%2Fmikrotik-dns-servers-

setup%2F)

(http://twitter.com/inte

via=ShellHacks&text=MikroTik%3A%20DNS%20Servers%20Setup&url=h

dns-servers-setup%2

(http://www.linkedin.com/shareArticle?

mini=true&url=https%3A%2F%2Fwww.shellhacks.com%2Fmikrotik-

dns-servers-

setup%2F&title=MikroTik%3A%20DNS%20Servers%20Setup)
(https://u2

4.gov.ua/)
(http://reddit.com/submit?

url=https%3A%2F%2Fwww.shellhacks.com%2Fmikrotik-dns-servers-

setup%2F&title=MikroTik%3A%20DNS%20Servers%20Setup)

(https://api.whatsapp.com/send?

text=MikroTik%3A%20DNS%20Servers%20Setup

https%3A%2F%2Fwww.shellhacks.com%2Fmikrotik-dns-servers-

setup%2F)

(https://telegram.me/share/url?

url=https%3A%2F%2Fwww.shellhacks.com%2Fmikrotik-dns-servers-

setup%2F&text=MikroTik%3A%20DNS%20Servers%20Setup)

(/mikrotik-dns-servers-setup/)

No comments yet (/mikrotik-dns-servers-setup/#respond)

MIKROTIK ( / TAG/MIKROTIK/ )

Ponuda koja se ne
propušta
Dopuni svaku odevnu kombinaciju sa
modernim i elegantnim Samsung
pametnim satom.
Gigatron

Kupite Odmah
L E A V E A R E P LY
(https://u2

4.gov.ua/)

Comment

Name

Email

POST REPLY

SUBSCRIBE

 (https://t.me/ShellHacks)  (https://twitter.com/shellhacks)  (/feed)

ONLINE TOOLS

Base64 Decode (https://base64-decode.online/)

Base64 Encode (https://base64-encode.online/)

TAGS

ACCESS -CONTROL ( / TAG/ACCESS -CONTROL / ) ANONYMITY ( / TAG/ANONYMITY/ ) ANSIBLE ( / TAG/ANSIBLE/ ) APACHE ( / TAG/APACHE/ ) ARCHIVE ( / TAG/ARCHIVE/ )

ARDUINO ( / TAG/ARDUINO/ ) ARGOCD ( / TAG/ARGOCD/ ) ARTIFACTORY ( / TAG/ARTIFACTORY/ ) BASH ( / TAG/BASH/ ) BOOT ( / TAG/BOOT/ ) CMD ( / TAG/CMD/ )

COMMAND-LINE ( / TAG/COMMAND-LINE/ ) CURL ( / TAG/CURL / ) DNS ( / TAG/DNS/ ) DOCKER ( / TAG/DOCKER/ ) ENCRYPTION ( / TAG/ENCRYPTION/ ) GIT ( / TAG/GIT/ )

GITLAB ( / TAG/GITLAB/ ) HELM ( / TAG/HELM/ ) IPTABLES ( / TAG/IPTABLES/ ) JENKINS ( / TAG/JENKINS/ ) KUBERNETES ( / TAG/KUBERNETES/ ) LINUX ( / TAG/LINUX / )

MACOS ( / TAG/MACOS/ ) MAIL ( / TAG/MAIL / ) MIKROTIK ( / TAG/MIKROTIK/ ) MONGODB ( / TAG/MONGODB/ ) MYSQL ( / TAG/MYSQL / ) NETWORK ( / TAG/NETWORK/ )

OPENSSL ( / TAG/OPENSSL / ) PASSWORD ( / TAG/PASSWORD/ ) PDF ( / TAG/PDF/ ) POWERSHELL ( / TAG/POWERSHELL / ) PYTHON ( / TAG/PYTHON/ )

RASPBERRY PI ( / TAG/RASPBERRY-PI/ ) SSH ( / TAG/SSH/ ) SUBLIME TEXT ( / TAG/SUBLIME-TEXT/ ) TELEGRAM ( / TAG/ TELEGRAM/ ) TELNET ( / TAG/ TELNET/ )

TEXT-PROCESSING ( / TAG/ TEXT-PROCESSING/ ) TOR ( / TAG/ TOR/ ) TSM ( / TAG/ TSM/ ) WINDOWS ( / TAG/ WINDOWS/ ) WORDPRESS ( / TAG/ WORDPRESS/ )

YUM ( / TAG/ YUM/ )

 (https://t.me/ShellHacks)  (https://twitter.com/shellhacks)  (/feed)


Privacy (/privacy)

Copyright © 2011-2023 | www.ShellHacks.com

You might also like