Chapter 10 Install and System Administration for FortiOS 5.0 : Advanced concepts : DNS services : DNS server
  
DNS server
You can also create local DNS servers for your network. Depending on your requirements, you can manually maintain your entries (master DNS server), or use it as a jumping point, where the server refers to an outside source (slave DNS server). A local master DNS server works similarly to the DNS server addresses configured in System > Network > DNS, but all entries must be added manually. This enables you to add a local DNS server to include specific URL/IP address combinations.
The DNS server options are not visible in the web-based manager by default. To enable the server, go to System > Admin > Settings and select DNS Database.
While a master DNS server is an easy method of including regularly used addresses to save on going to an outside DNS server, it is not recommended to make it the authoritative DNS server. IP addresses may change, and maintaining any type of list can quickly become labor-intensive.
A FortiGate master DNS server is best set for local services. For example, if your company has a web server on the DMZ that is accessed by internal employees as well as external users, such as customers or remote users. In this situation, the internal users when accessing the site would send a request for website.example.com, that would go out to the DNS server on the web, to return an IP address or virtual IP. With an internal DNS, the same site request is resolved internally to the internal web server IP address, minimizing inbound/outbound traffic and access time.
As a slave, DNS server, the FortiGate server refers to an external or alternate source as way to obtain the url/IP combination. This useful if there is a master DNS server for a large company where a list is maintained. Satellite offices can then connect to the master DNS server to obtain the correct addressing.
The DNS server entries does not allow CNAME entries, as per rfc 1912, section 2.4.
To configure a master DNS server - web-based manager
1. Go to System > Network > DNS Server, and select Create New.
2. Select the Type of Master.
3. Select the View as Shadow.
4. The view is the accessibility of the DNS server. Selecting Public, external users can access, or use, the DNS server. Selecting Shadow, only internal users can use it.
5. Enter the DNS Zone, for example, WebServer.
6. Enter the domain name for the zone, for example example.com.
7. Enter the hostname of the DNS server, for example, Corporate.
8. Enter the contact address for the administrator, for example, admin@example.com.
9. Set Authoritative to Disable.
10. Select OK.
11. Enter the DNS entries for the server by selecting Create New.
12. Select the Type, for example, Address (A).
13. Enter the Hostname, for example web.example.com.
14. Enter the remaining information, which varies depending on the Type selected.
15. Select OK.
To configure a DNS server - CLI
config system dns-database
edit WebServer
set domain example.com
set type master
set view shadow
set ttl 86400
set primary-name corporate
set contact admin@exmple.com
set authoritative disable
config dns-entry
edit 1
set hostname web.example.com
set type A
set ip 192.168.21.12
set status enable
end
end
end
See Also
Dynamic DNS
DNS services
DNS settings
Additional DNS CLI configuration
Recursive DNS