Skip to main content
FGNoobUser1
New Member
May 26, 2022 7:04 PM UTC
Solved

FG can't resolve any hostnames - Clients working fine

Hi,

a few days before, we made the Update 6.4.8 to 6.4.9. After this, the FG can't resolve any Hostnames.

Ping with FQDN on FG CLI says "unable to resolve hostname". All rules that use FQDN doesn't work anymore. If I ping the IP-Address the FG is working fine. He also can ping the DNS. We didn't change any other configuration on the FG.

Only thing I did after Update was this, cause I couldn't reach the GUI: "set admin-server-cert Fortinet_Factory"

FG has configured the same DNS like every client in the network and all clients working fine!

It is a FG100F. There is nothing special configured: In DNS-Settings there is only our DNS-Server / DC set with it's IP. I don't know what to do anymore. I tried to contact the support but for every answer they take about 2 days. I hope the FG community can help a little faster.

AEK
AEKAnswer
SuperUser
May 27, 2022 2:20 PM UTC

Yes it is a slave DNS server and the server doesn't allow it to fetch the zone.

 

So in case you want your FGT to be a slave DNS server for your local domain then just allow it to fetch the DNS zone on your primary DNS server. Otherwise just unconfigure it as secondary DNS server.

AEK

21 replies

AEK
SuperUser
SuperUser
May 26, 2022 9:31 PM UTC

Hello,

Please share output of:

    show system dns

    execute ping <DNS-SERVER-IP>

    execute ping <somehost>

    execute ping <somehost.yourdomain.xyz>

 

Translate
AEK
FGNoobUser1
New Member
May 27, 2022 5:22 AM UTC

FGNoobUser1_0-1653628929014.png

 

Translate
chethan
Explorer II
May 27, 2022 5:37 AM UTC

Hi @FGNoobUser1 ,

 

In DNS settings, check by only enabling clear text DNS over (UDP/53) port. This will resolve the issue most probably.

 

Have you configured SD-WAN? If yes have you set up the sd-wan rules properly? 

Create a new rule to send only the DNS traffic through your best ISP link.

 

You can also configure what interface must be used for DNS via CLI:

#config sys dns

#set interface-select-method specify

#set interface {interface-name}

 

Please reply if this doesn't help you out.

 

Thank you

 

 

Translate
FGNoobUser1
New Member
May 27, 2022 6:51 AM UTC

Still the same Problem (sorry, i tried some commands)

with clear text dns you mean no-ssl and no-https dns? it's deactivated

 

FGNoobUser1_0-1653634211320.png

 

Translate
AEK
SuperUser
SuperUser
May 27, 2022 6:50 AM UTC

Now please try:

diag siffer packet any 'host x.y.5.1 and port 53'

Run the same on your dns server x.y.5.1 on port 53, e.g. if the server is linux, then run something like that:

tcpdump -n -i any port 53

On Windows use Wireshark on port 53 TCP/UDP

 

An on a second FGT CLI window, run ping somehost.yourdomain.local

Then share the sniffer & tcpdump logs from both sides.

Translate
AEK
Esteemed Contributor III
May 27, 2022 7:16 AM UTC

Hi,

As per the packet flow, the Fortigate will query the DNS server which is configured in the network settings, The DNS query need to be sent to the specifc DNS server and the DNS server should provide the DNS response with the mapped ip address to the google.com.
step1) you can take the packet capture at the fortigate level to check if the DNS query is being sent or not.

#diag sniffer packet any 'host a.b.c.d  and port 53' 6 0 a  where a.b.c.d is the DNS server ipaddress.

Translate
FGNoobUser1
New Member
May 27, 2022 8:28 AM UTC

 

 

Translate
FGNoobUser1
New Member
May 27, 2022 8:38 AM UTC

Maybe I got something: as I wrote in my first post, I needed to execute ""set admin-server-cert Fortinet_Factory". When i use "get" on dns configuration, there is set "ssl_certifate : Fortinet_Factory". Is it possible that this is the reason? Can I delete this without losing the connection to GUI?

 

FGNoobUser1_1-1653640652227.png

 

 

Translate
AEK
SuperUser
SuperUser
May 27, 2022 8:39 AM UTC

Hi FGN user

On Wireshark don't apply filter "ip.src=x.y.5.254", because it doesn't let us see the replies from your DNS server. Instead apply filter just for DNS packets (port 53 TCP/UDP).

On the other hand there is a trick here, as your FGT NATs the clients' requests, we cannot see if the request is coming from FGT or other clients

Translate
AEK
FGNoobUser1
New Member
May 27, 2022 12:27 PM UTC

Hey, thx for your answer.

I checked every rule. None of the rules that connects to the DC/DNS having NAT configured. So every request coming from X.Y.5.254 should be the FG. (the FG is using this address in the network of our DC/DNS, cause the DC/DNS has it's own net/vlan/dmz).

Or am I wrong?

Translate
AEK
SuperUser
SuperUser
May 27, 2022 9:23 AM UTC

Don't worry with certificate since the last output shows you are not using DNS over SSL.

On the other hand, as I said before, the fact that you use NAT doesn't help the troubleshooting. So can you explain why are you using NAT inside your company from clients to DNS server? Is it possible to disable it temporarily just for the troubleshooting? If so then disable it and redo the test and share both Wireshark & diag sniffer traces.

 

Translate
AEK
FGNoobUser1
New Member
May 27, 2022 12:36 PM UTC

As I wrote in the post before, connections to the DNS doesn't use NAT, so they all should use their originally IP. The strange thing is, the FG uses our DNS for every external address but I can't find any requests for internal hosts. I can only find these SOA and AXFR with our Domain:

FGNoobUser1_0-1653654997645.png

 

Translate
FGNoobUser1
New Member
May 27, 2022 12:50 PM UTC

There are some strange entries with "refused AXFR" and the entry above with "SOA.... local". There is the Hostname of our DC/DNS and the .local is our domain, but i don't know what he's doing there.

FGNoobUser1_0-1653655840335.png

 

Translate
AEK
SuperUser
SuperUser
May 27, 2022 1:48 PM UTC

That means your FGT is trying to get a copy of DNS zone from your DNS server, and DNS server is refusing. So it seems your FGT is configured as DNS server right? So probably your FGT is just sending his DNS queries (of your local domain) to himself.

To confirm check the output of:

show system dns-server

show system dns-database

 

So in case you want your FGT to be a slave DNS server for your local domain then just allow it to the DNS zone on your primary DNS server. Otherwise just unconfigure it as secondary DNS server.

Translate
AEK
FGNoobUser1
New Member
May 27, 2022 2:10 PM UTC

FGNoobUser1_0-1653660368944.pngFGNoobUser1_1-1653660640339.png

 

Translate
AEK
SuperUser
AEKAnswer
SuperUser
May 27, 2022 2:20 PM UTC

Yes it is a slave DNS server and the server doesn't allow it to fetch the zone.

 

So in case you want your FGT to be a slave DNS server for your local domain then just allow it to fetch the DNS zone on your primary DNS server. Otherwise just unconfigure it as secondary DNS server.

Translate
AEK
Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024