Created on
‎04-28-2023
12:04 AM
Edited on
‎08-31-2025
10:10 PM
By
sramesh1
Description | This article describes how to fix an issue that may prevent users from using DDNS to access the FortiGate GUI instead of using the IP address. |
Scope | FortiGate. |
Solution |
In the example used in this article, the IP address of the wan1 interface is used for DDNS on FortiGate. FortiGate is unable to update the DDNS due to a connection error. The solution will explain how to update the DDNS in FortiGate.
Below is the IP address of the interface.
config system interface edit "wan1" set ip 10.109.17.53 255.255.240.0 set allowaccess ping https ssh http next edit "dmz" set ip 10.10.5.3 255.255.240.0 set allowaccess ping https ssh http next end
Below is the DDNS setting for fortiservice.fortiddns.com.
config system ddns edit 1 set ddns-server FortiGuardDDNS set ddns-domain "fortiservice.fortiddns.com" set use-public-ip enable set monitor-interface "wan1" next end
diagnose test application ddnscd 3
Since the DDNS server IP address is set to 0.0.0.0 and the connection port is 443 by default under the FortiGuard settings, FortiGate will connect to the resolved IP of the domain globalddns.fortinet.net with destination port 443, unless a DDNS server IP address is configured specifically as follows.
config system fortiguard set ddns-server-ip 173.243.138.225 set ddns-server-port 443 end
diagnose debug disable
Check which interface there is an internet connection from:
get router info routing-table details 173.243.138.225 Routing table for VRF=0
In the above output, the FortiGate has a default route 0.0.0.0 through the wan1 interface. However, an incorrect interface and source IP have been configured in FortiGuard settings. As a result, FortiGate will not be able to connect to the FortiGuard server:
config system fortiguard set source-ip 10.10.5.3 set interface-select-method specify set interface dmz end
Note:
To resolve the issue, a correct source IP and interface must be configured under FortiGuard settings. Since the internet is accessible through a WAN1 interface, the FortiGuard settings have been changed as follows:
config system fortiguard set source-ip 10.109.17.53 set interface-select-method specify set interface wan1 end
config sys ddns edit 1 get ddnsid : 1 ddns-server : FortiGuardDDNS server-type : ipv4 ddns-domain : fortiservice.fortiddns.com use-public-ip : enable addr-type : ipv4 update-interval : 0 monitor-interface : "wan1" bound-ip : 10.109.17.53
Note: If the use-public-ip setting in DDNS is disabled on FortiGate, the bound-ip will not be visible in the above output.
To ensure the DDNS is updated (when a correct IP address is set for the DDNS in FortiGate):
exe ping fortiservice.fortiddns.com --- fortiservice.fortiddns.com ping statistics ---
diagnose test application ddnscd 5
Delete the existing entry:
config system ddns delete 1 end
Reconfigure the DDNS again:
config system ddns edit 1 set ddns-server <ddns server> set ddns-domain <Domain name> set use-public-ip enable set monitor-interface <wan interface> next end
Screenshot from successful GUI access through DDNS:
Related documents: config system ddns - FortiOS CLI reference Technical Tip: How to transfer the DDNS record to new FortiGate |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.