I have found an interesting way to rewrite DNS requests to other IP addresses.
This makes it possible to use the internal private addresses on the internal DNS server for the DNS requests.
External DNS queries that are requested via the Internet can be rewritten to official addresses on the firewall.
The ISP function can be used as a hack for this purpose.
If you activate and configure ISP Redundancy on the gateway, you have the option of rewriting DNS queries. This can be used to rewrite regular DNS queries to other IP addresses.
Example configuration:
1) Enable ISP on the gateway
![DNS1_57h543.jpg DNS1_57h543.jpg](https://community.checkpoint.com/t5/image/serverpage/image-id/28408iFFFC1FAF07E15CA0/image-size/large?v=v2&px=999)
2) Now select the “Primary/Backup” redundancy mode (see picture 1)
3) Now create an ISP link (that corresponds to your external interface in the direction to the Internet in my example “external_interface”.
![DNS2_345njk3k4.jpg DNS2_345njk3k4.jpg](https://community.checkpoint.com/t5/image/serverpage/image-id/28409i76EC3BDBACE0F773/image-size/large?v=v2&px=999)
4) Unfortunately, two interfaces must be defined, so you have to work with a placeholder interface for ISP2 link. Then create a link that only functions as a placeholder in my example “not_used”. Fictitious IP addresses can be used for the interface.
5) Now enabling “DNS Proxy”
![DNS2B_64hjh423.png DNS2B_64hjh423.png](https://community.checkpoint.com/t5/image/serverpage/image-id/28410i74BE6882F0DBD9B4/image-dimensions/417x47?v=v2)
6) In the next step, you can enter the DNS settings that you want to rewrite (red).
![DNS3_345hj345.png DNS3_345hj345.png](https://community.checkpoint.com/t5/image/serverpage/image-id/28411i9913B47A13E3119E/image-size/large?v=v2&px=999)
You can enter any address for the second ISP backup link (blue), as this is not used in my example.
➜ CCSM Elite, CCME, CCTE ➜ www.checkpoint.tips