Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
sanderl
New Contributor III

DNS Servers - DNS Database - DNS Zone - A record - TLD

I want to use the internal Fortinet Fortigate (5.6.3) DNS service. I have succesfully created a DNS Server, listening on (some) interface(s) and a DNS database with a DNS Zone (Authoritative or not) and some A records. All working very well.

 

BUT

 

I am not able to add an "empty" TLD name to the DNS entries database. I MUST specify a hostname for an A record. But I do not want that in this case.

 

e.g. www.mydomain.com and mail.mydomain.com (where www and mail is the domain name) work and resolve well. But I do want to have the TLD to also be "resolvable" being just mydomain.com without any hostname in the A record in front of it. This is prefectly possible in any other open or custom DNS system, but I am not able to get this configured in a Fortigate (GUI or CLI). Any tip is more than welcome...

 

Because, in this way I do not want am not able to use DNS service in the fortigate.

 

ps. don't ask me why I want to use it: long story, but If this TLD A record works with an {empty} hostname I am more than happy.

2 REPLIES 2
rwpatterson
Valued Contributor III

I know in BIND and WinDoze DNS you could use the @ to represent the domain name. Give that a try.

 

config system dns-database
    edit "mydomain.mine.org"
        set domain "mydomain.mine.org"
        set contact "hostmaster.mydomain.mine.org"
        set primary-name "server"
        set forwarder "1.2.3.4"
        set view public
        config dns-entry
            edit 0
                set hostname "@"
                set ttl 600
                set ip 192.168.123.21
            next
        end
    next
end

 

Not sure if the 40Gate will choke on that.

Bob - self proclaimed posting junkie!
See my Fortigate related scripts at: http://fortigate.camerabob.com

Bob - self proclaimed posting junkie!See my Fortigate related scripts at: http://fortigate.camerabob.com
sanderl
New Contributor III

Hi, rwpatterson, that worked like a charm. Thank you for your reply.

Labels
Top Kudoed Authors