Yes, that would be true if it wasn't for the fact that the DNS on the inside is the primary DNS for the whole domain. There is a bit of traffic in both directions between it and the secondary DNS that is located outside the firewall. It is queried for updates on a regular basis from the secondary DNS and since it also is authoritative for the domains it hosts other DNS'es needs to be able to query it too.
I see. So I take it you have multiple public IP addresses? Can you please post all the relevant NAT and WAN firewall rules so we can figure out what's going wrong?
Yes, that's right. There are three external public addresses, 193.11.112.144, 193.11.112.145 and 193.11.112.146. The last address is also the address of the physical WAN interface. On the inside there are a number of servers, all on a private 192.168.1.XYZ network. The first two addresses are NAT'ed 1:1 to corresponding servers on the inside and the last address is NAT'ed to several servers on the inside. The rules of interest are the following:
NAT:
WAN TCP/UDP 53 (DNS) 192.168.1.4 53 (DNS)
WAN:
TCP/UDP * * 192.168.1.4 53 (DNS) NAT
The problem is not with the rules however but rather with the way dnsmasq binds to the different interfaces. By making the following change I was able to get the desired behavior and I would recommend that it is added to the mainstream release.
In the function services_dnsmasq_configure() in /etc/inc/services.inc I added this just before the dnsmasq binary is executed.
/* determine WAN interface name */
$wanif = get_real_wan_interface();
/* remove WAN interface from bindings */
$args .= " --except-interface={$wanif}";
It makes sure that you still can use DNS forwarding on the inside and any OPT interfaces but that dnsmasq never replies to requests on the WAN interface.