User Tools

Site Tools


internet:dns:public_dns

Build and Secure a Public Recursive DNS Server

Install PowerDNS Recursor on Ubuntu Server

apt-get install pdns-recursor
vim /etc/powerdns/recursor.conf

allow-from=0.0.0.0/0
etc-hosts-file=/etc/hosts
export-etc-hosts=on
forward-zones=internal.yourdomain.com=10.0.0.20
local-address=127.0.0.1,123.123.123.123
log-common-errors=yes

:!: With export-etc-hosts=on, we can take advantage of a hosts file with ad servers.

Configure a Mikrotik Router as DNS Client and Caching DNS Server

  1. Select IP → DNS → Allow Remote Requests
    1. Allows LAN clients behind the Mikrotik to use it as their DNS server
  2. Configure the LAN's DHCP server to hand out the Mikrotik's IP address as the DNS server
    1. Mikrotik as DHCP Server configuration shown here

Mikrotik IP DNS Settings

Mikrotik DHCP Server Settings

/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=bridge1 lease-time=3d name=dhcp1
/ip dhcp-server network
add address=192.168.20.0/24 dns-server=192.168.20.1 gateway=192.168.20.1
internet/dns/public_dns.txt · Last modified: 2016/01/02 21:40 by gcooper