How to configure DNS NAT or DNS Doctoring on Checkpoint FW-1

In some topologies, it is required to DNS reply traffic from a DNS server so that the querying host will think that a certain DNS entry (example is resolvable to a different IP address than the one written in the database of the DNS server.

The feature has a global on/off switch, in the objects_5_.C file, called fw_dns_xlation (by default set to false). When it is set to true, the regular NAT Rule Base is used to determine how to change the DNS packets.
The regular NAT rules used to NAT the internal servers will suffice. There is no need to define special NAT rules in addition to the regular ones defined.

To enable the fw_dns_xlation property, perform on the SmartCenter server:

  1. Close all SmartConsole clients connected to the SmartCenter server.
  2. Open the GuiDBedit utility and and connect to the SmartCenter server.
  3. Find the fw_dns_xlation property.
  4. Change the value of this property to true. Click OK.
  5. Select File -> Save All.
  6. Open the SmartDashboard and re-install the Security Policy on the Security gateway.

From this point on, the Security gateway will NAT the DNS data, according to the NAT Rule Base.
You must also enable the DNS protocol protection for UDP in the IPS (formerly, SmartDefense). To enable this protection:

For the Security Gateway R70:

  1. Open the IPS tab in the SmartDashboard.
  2. Go to the Protections -> By Protocol -> Application Intelligence -> DNS view.
  3. Open the ‘DNS – General Settings’ Protection Details.
  4. Click Edit.
  5. Verify that either the ‘UDP only’ or ‘Both TCP and UDP’ checkbox is selected.

For all other versions:

  1. Open the SmartDefense tab in the SmartDashboard.
  2. Go to the Application Intelligence -> DNS -> Protocol Enforcement view.
  3. Verify that the ‘UDP protocol enforcement’ checkbox is selected.


  1. The manual rules for network objects or Automatic NAT Static rules for host objects must be used. This feature does not work with Automatic NAT Static rules of network objects.
  2. Traffic will be modified based on the destination address of the NAT rules without considering the source of the traffic.
  3. The feature does not work for a DNS zone transfer (used to synchronize DNS databases between to internal DNS servers).
  4. The feature does not work for DNS queries over TCP.
  5. The Security gateway must be between the querying host and the DNS server.
  6. On Security Gateway R70, DNS traffic cannot be accelerated when using this feature.

If the “NAT for DNS payload” option is enabled and the “UDP DNS protocol enforcement” protection is disabled on at least one of SmartDefense/IPS profiles, the Security Policy installation will succeed but the following warning will appear:
“You enabled NAT on DNS payload, please make sure that DNS UDP protocol enforcement defense is enabled on the desired gateway.”