User Tools

Site Tools


internet:dns:public_dns

This is an old revision of the document!


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 Caching DNS Client

Allow LAN clients behind the Mikrotik to use it as their DNS server:

  1. Select IP → DNS → Allow Remote Requests
  2. Configure the LAN's DHCP server to hand out the Mikrotik's IP address as the DHCP 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.1451795811.txt.gz · Last modified: 2016/01/02 21:36 by gcooper