Skip to main content
sinamdar
Staff & Editor
Staff & Editor
September 17, 2014

Technical Note: Website redirecting to a different Website using DNS Database on FortiGate

  • September 17, 2014
  • 0 replies
  • 8657 views
Description
This article describes how to redirect a website to a different website using DNS database on FortiGate and have the workstations on the network with FortiGate DNS IP.

Solution
Configure DNS Database on CLI :

Testing website is bing.com, which will redirect to Fortinet.com web page :

config system dns-database
    edit "forward"
        set domain "www.bing.com"
            config dns-entry
                edit 1
                    set type CNAME
                    set hostname "www.bing.com"
                    set canonical-name "www.fortinet.com"
                next
                edit 2
                    set hostname "www.fortinet.com"
                    set ip 66.171.121.34
                next
            end
    next
end

Configure DNS server for internal interface:

config system dns-server
    edit "internal"
        set mode recursive
        next
end

Set the FortiGate internal interface IP to the workstations as the primary DNS server, so that the when the PC tries to resolve www.bing.com it will be resolved to IP 66.171.121.34 which will access the webpage of  www.fortinet.com website.

agodwin_FD35062_FD35062.bmp


Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT