DescriptionThis 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.
SolutionConfigure 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.