Chapter 10 Install and System Administration for FortiOS 5.0 : Advanced concepts : Dynamic DNS
  
Dynamic DNS
If your ISP changes the your external IP address on a regular basis, and you have a static domain name, you can configure the external interface to use a dynamic DNS service to ensure external users and/or customers can always connect to your company firewall.
If you have a FortiGuard subscription, you can use FortiGuard as your DDNS server. To configure dynamic DNS in the web-based manager, go to System > Network > DNS, select Enable FortiGuard DDNS, and enter the relevant information for the interface communicating to the server, and which server to use, and relevant information.
If you do not have a FortiGuard subscription, or want to use an alternate server, you can configure dynamic DNS in the CLI use the commands below. Within the CLI you can configure a DDNS for each interface. Only the first configured port appears in the web‑based manager. Additional commands vary with the DDNS server you select.
config system ddns
edit <instance_value>
set monitor-interface <external_interface>
set ddns-server <ddns_server_selection>
end
You can also use FortiGuard (when subscribed) as a DDNS as well. To configure, use the CLI commands:
config system fortiguard
set ddns-server-ip
set ddns-server-port
end
See Also
DNS services
DNS settings
Additional DNS CLI configuration
DNS server