Revision 7bdd28fb
Added by Phil Davis over 12 years ago
usr/local/www/services_dnsmasq.php | ||
---|---|---|
50 | 50 |
$pconfig['dhcpfirst'] = isset($config['dnsmasq']['dhcpfirst']); |
51 | 51 |
$pconfig['strict_order'] = isset($config['dnsmasq']['strict_order']); |
52 | 52 |
$pconfig['domain_needed'] = isset($config['dnsmasq']['domain_needed']); |
53 |
$pconfig['no_private_reverse'] = isset($config['dnsmasq']['no_private_reverse']); |
|
53 | 54 |
$pconfig['custom_options'] = $config['dnsmasq']['custom_options']; |
54 | 55 |
|
55 | 56 |
if (!is_array($config['dnsmasq']['hosts'])) |
... | ... | |
73 | 74 |
$config['dnsmasq']['dhcpfirst'] = ($_POST['dhcpfirst']) ? true : false; |
74 | 75 |
$config['dnsmasq']['strict_order'] = ($_POST['strict_order']) ? true : false; |
75 | 76 |
$config['dnsmasq']['domain_needed'] = ($_POST['domain_needed']) ? true : false; |
77 |
$config['dnsmasq']['no_private_reverse'] = ($_POST['no_private_reverse']) ? true : false; |
|
76 | 78 |
$config['dnsmasq']['custom_options'] = str_replace("\r\n", "\n", $_POST['custom_options']); |
77 | 79 |
|
78 | 80 |
if ($config['dnsmasq']['custom_options']) { |
... | ... | |
196 | 198 |
</td> |
197 | 199 |
</tr> |
198 | 200 |
<tr> |
199 |
<td rowspan="2" width="22%" valign="top" class="vncellreq"><?=gettext("DNS Query Forwarding");?></td>
|
|
201 |
<td rowspan="3" width="22%" valign="top" class="vncellreq"><?=gettext("DNS Query Forwarding");?></td>
|
|
200 | 202 |
<td width="78%" class="vtable"><p> |
201 | 203 |
<input name="strict_order" type="checkbox" id="strict_order" value="yes" <?php if ($pconfig['strict_order'] == "yes") echo "checked";?>> |
202 | 204 |
<strong><?=gettext("Query DNS servers sequentially");?><br> |
... | ... | |
216 | 218 |
""), $g['product_name']); ?></p> |
217 | 219 |
</td> |
218 | 220 |
</tr> |
221 |
<tr> |
|
222 |
<td width="78%" class="vtable"><p> |
|
223 |
<input name="no_private_reverse" type="checkbox" id="no_private_reverse" value="yes" <?php if ($pconfig['no_private_reverse'] == "yes") echo "checked";?>> |
|
224 |
<strong><?=gettext("Do not forward private reverse lookups");?><br> |
|
225 |
</strong><?php printf(gettext("If this option is set, %s DNS Forwarder (dnsmasq) will ". |
|
226 |
"not forward reverse DNS lookups (PTR) for private addresses (RFC 1918) to upstream name servers. ". |
|
227 |
"Any entries in the Domain Overrides section forwarding private \"n.n.n.in-addr.arpa\" names to a specific server are still forwarded. ". |
|
228 |
"If the IP to name is not known from /etc/hosts, DHCP or a specific domain override then a \"not found\" answer is immediately returned. ". |
|
229 |
""), $g['product_name']); ?></p> |
|
230 |
</td> |
|
231 |
</tr> |
|
219 | 232 |
<tr> |
220 | 233 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Advanced");?></td> |
221 | 234 |
<td width="78%" class="vtable"><p> |
Also available in: Unified diff
Add DNS Forwarder option to not forward private reverse lookups
Currently, reverse lookups of private IP addresses that are not resolved on the pfSense box itself (e.g. like 192.168.42.43) are forwarded to the default DNS servers. For most use cases, those PTR queries go out to the real internet, when they actually have no chance of a successful answer. This loads up the real internet DNS servers with rubbish requests and also causes a round-trip delay before dnsmasq can reply with a "not found".
This change tells dnsmasq not to forward these requests.
Note that users can add specific domain overrides, which are implemented before this option. So a user can forward "1.168.192.in-addr.arpa" to an internal DNS server that knows about 192.168.1.0/24 - and then turn on this new option and all other requests for private reverse lookups will not be forwarded.