Page 1 of 1
Static DNS entries
Posted: Sun Jan 25, 2015 6:57 pm
by kintho
Hi all,
I'm having trouble with my first MikroTik.
I've read some basic docuemnts in the wiki and some threads on the forum but I'm confused about this problem.
I want to configure the DNS server so the LAN PCs could:
a. resolve IP addresses outside the LAN with static hostnames
b. resolve the LAN PCs IP addresses with the relative hostnames
I've setup the DHCP server with the MikroTik IP address as DNS server for the LAN PCs.
I've setup the DNS in the MikroTik with the Google DNS servers and I added two static DNS entries to test point a. and b.
I'm not able to make it works.
Any suggestion?
Thank you.
Re: Static DNS entries
Posted: Sun Jan 25, 2015 8:15 pm
by vstman
check the ip, routes, for proper gateway. I've had this issue and sometime the router will add a default that is not the preferred.
Re: Static DNS entries
Posted: Wed Jan 28, 2015 10:41 am
by kintho
I've checked the ip routes and it's all ok:
ether4 -> LAN: 192.168.100.x
ether2 -> WAN: DHCP Client with IP 192.168.0.x and route Dst. Address 0.0.0.0/0, Gateway: 192.168.0.1
Other suggestions?
Re: Static DNS entries
Posted: Wed Jan 28, 2015 2:31 pm
by noib
Static local & external DNS works fine for me, here is my config
# jan/28/2015 13:28:50 by RouterOS 6.15
# software id = Q19U-9W6Z
#
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=10.1.10.1 name=local.nas
add address=159.148.147.196 name=www.babayaga.dumb
[ben@ECH_CT04] > ping local.nas
HOST SIZE TTL TIME STATUS
10.1.10.1 56 64 0ms
sent=1 received=1 packet-loss=0% min-rtt=0ms avg-rtt=0ms max-rtt=0ms
[ben@ECH_CT04] > ping www.babayaga.dumb
HOST SIZE TTL TIME STATUS
159.148.147.196 56 55 107ms
sent=1 received=1 packet-loss=0% min-rtt=107ms avg-rtt=107ms max-rtt=107ms
[ben@ECH_CT04] >
Re: Static DNS entries
Posted: Wed Jan 28, 2015 3:03 pm
by kintho
That's the excatly configuration I have and it works from the routerboard itself.
It doesn't work from PC client both with static IP (with IP of the routerboard as DNS server) or dynamic IP via DHCP.
Re: Static DNS entries
Posted: Wed Jan 28, 2015 3:45 pm
by noib
Then it means that your computer does not ask for Mikrotik as first DNS.
Have you checked that you don't block by mistake the MT DNS port (53/udp)?
Have you checked that MT DNS is first on the DNS list of client computer, or that MT is the only DNS on the computer?
Have you done a traceroute from the client computer to check where the request goes?
Re: Static DNS entries
Posted: Wed Jan 28, 2015 4:45 pm
by kintho
Thank you for the reply.
Then it means that your computer does not ask for Mikrotik as first DNS.
Have you checked that you don't block by mistake the MT DNS port (53/udp)?
Do you mean in the firewall?
I've addes this lines:
/ip firewall filter
add chain=input protocol=udp dst-portaction=53 accept comment="DNS-UDP"
add chain=input protocol=tcp dst-portaction=53 action=accept comment="DNS-TCP"
Have you checked that MT DNS is first on the DNS list of client computer, or that MT is the only DNS on the computer?
Yes, it's the first and the only one.
Have you done a traceroute from the client computer to check where the request goes?
Yes: nslookup -debug hostname stops at routerboard IP address with nothing more.
Re: Static DNS entries
Posted: Thu Jan 29, 2015 11:50 am
by noib
can you ping the hosts (with IP) from the client computer?