Community discussions

MikroTik App
SpaceCommander
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 50
加入: Fri Dec 26, 2008 3:35 am

Static DNS record does not suppress external one?

Fri Sep 20, 2013 9:56 pm

There is RouterOS 5.25, with DNS server enabled.
All clients are confugured to use ROS DNS only.

When "www.microsoft.com" is added to IP/DNS/Static as 10.20.30.40,
网路资讯查询在客户机工作站s returns multiple values - 10.20.30.40 and external ones.

How to suppress external DNS resolution for names presented in static DNS list?
I want to get 10.20.30.40 only.
Top
用户头像
asaleh75
Trainer
Trainer
Posts: 193
加入: Thu Nov 17, 2011 2:51 pm
Location:Dhaka, Bangladesh
Contact:

Re: Static DNS record does not suppress external one?

Fri Sep 20, 2013 10:01 pm

Hi,
Please check your work stations DNS entry. There should be only your router's IP.
Top
SpaceCommander
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 50
加入: Fri Dec 26, 2008 3:35 am

Re: Static DNS record does not suppress external one?

Fri Sep 20, 2013 10:03 pm

Hi,
Please check your work stations DNS entry. There should be only your router's IP.
Yes, it is so, of course.
Top
用户头像
asaleh75
Trainer
Trainer
Posts: 193
加入: Thu Nov 17, 2011 2:51 pm
Location:Dhaka, Bangladesh
Contact:

Re: Static DNS record does not suppress external one?

Fri Sep 20, 2013 10:12 pm

Please provide your DNS configuration.
Top
SpaceCommander
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 50
加入: Fri Dec 26, 2008 3:35 am

Re: Static DNS record does not suppress external one?

Fri Sep 20, 2013 10:26 pm

Please provide your DNS configuration.
Mikrotik Settings:
Code:Select all
[admin@MikroTik] > /ip dns ex # sep/20/2013 23:17:15 by RouterOS 5.25 # software id = N69E-277L # /ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB max-udp-packet-size=4096 \ servers="" /ip dns static add address=192.168.88.1 disabled=no name=router ttl=1d add address=10.20.30.40 disabled=no name=microsoft.com ttl=1d [admin@MikroTik] > /ip dns pr servers: dynamic-servers: 8.8.8.8, 8.8.4.4 allow-remote-requests: yes max-udp-packet-size: 4096 cache-size: 2048KiB cache-max-ttl: 1w cache-used: 452KiB
Workstation Settings (Ubuntu + NetworkManager):
Code:Select all
$ cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.0.1 $ pgrep -fl dns 801 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/sendsigs.omit.d/network-manager.dnsmasq.pid --listen-address=127.0.0.1 --conf-file=/var/run/nm-dns-dnsmasq.conf --cache-size=0 --proxy-dnssec $ cat /var/run/nm-dns-dnsmasq.conf server=192.168.88.1
Workstation Check:
Code:Select all
$ host microsoft.com microsoft.com has address 64.4.11.37 microsoft.com has address 65.55.58.201 microsoft.com has address 10.20.30.40 microsoft.com mail is handled by 10 microsoft-com.mail.protection.outlook.com. $ host microsoft.com 192.168.88.1 Using domain server: Name: 192.168.88.1 Address: 192.168.88.1#53 Aliases: microsoft.com has address 65.55.58.201 microsoft.com has address 64.4.11.37 microsoft.com has address 10.20.30.40 microsoft.com mail is handled by 10 microsoft-com.mail.protection.outlook.com.
Top
用户头像
asaleh75
Trainer
Trainer
Posts: 193
加入: Thu Nov 17, 2011 2:51 pm
Location:Dhaka, Bangladesh
Contact:

Re: Static DNS record does not suppress external one?

Fri Sep 20, 2013 10:39 pm

Hi,
I tested it on my network & working fine. Please try to redirect all dns traffic to router itself.
Code:Select all
/ip firewall nat add action=redirect chain=dstnat disabled=no dst-port=53 protocol=udp src-address=192.168.88.0/24 to-ports=53
Top
SpaceCommander
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 50
加入: Fri Dec 26, 2008 3:35 am

Re: Static DNS record does not suppress external one?

Fri Sep 20, 2013 10:52 pm

Hi,
I tested it on my network & working fine. Please try to redirect all dns traffic to router itself.
Code:Select all
/ip firewall nat add action=redirect chain=dstnat disabled=no dst-port=53 protocol=udp src-address=192.168.88.0/24 to-ports=53
Hmmm...
It is very-very strange, but after adding this rule all works fine, as it should be.
And even after disabling this rule, all still works.
Top
用户头像
asaleh75
Trainer
Trainer
Posts: 193
加入: Thu Nov 17, 2011 2:51 pm
Location:Dhaka, Bangladesh
Contact:

Re: Static DNS record does not suppress external one?

Fri Sep 20, 2013 10:57 pm

It is very-very strange, but after adding this rule all works fine, as it should be.
And even after disabling this rule, all still works.
Good Luck
Top
JackANSI
Frequent Visitor
Frequent Visitor
Posts: 71
加入: Wed Apr 03, 2013 6:52 pm

Re: Static DNS record does not suppress external one?

Sat Sep 21, 2013 6:16 pm

Client devices tend to have a DNS cache... Be sure in the future to clear the MikroTik's cache as well as the computer you're running the test on.
Top

Who is online

Users browsing this forum:AlexDerkachev,Bing [Bot],Markinson,rajx2,Semrush [Bot],thomasand 78 guests