summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dnsmasq_domainoverride_edit.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@world.inf.org>2013-03-05 15:02:39 +0545
committerPhil Davis <phil.davis@world.inf.org>2013-03-05 15:02:39 +0545
commit4560c2d196e8f89a15098290a76255bae81d941e (patch)
treee2ce247588fb6d469e4485d178dfac22bf058e7d /usr/local/www/services_dnsmasq_domainoverride_edit.php
parent6f8679af81411f7994258708905e593ce9b786e9 (diff)
downloadpfsense-4560c2d196e8f89a15098290a76255bae81d941e.zip
pfsense-4560c2d196e8f89a15098290a76255bae81d941e.tar.gz
DNS Forwarder allow null forwarding address
dnsmasq allows a blank forwarding IP address to be specified in --server parameters. In that case, dnsmasq will attempt a local lookup of the name (e.g. in hosts file), but will not forward the request on to the standard name servers. This is a useful way to prevent internal name requests from being sent out to the real internet name servers.
Diffstat (limited to 'usr/local/www/services_dnsmasq_domainoverride_edit.php')
-rwxr-xr-xusr/local/www/services_dnsmasq_domainoverride_edit.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/local/www/services_dnsmasq_domainoverride_edit.php b/usr/local/www/services_dnsmasq_domainoverride_edit.php
index 74869b4..9f26c8a 100755
--- a/usr/local/www/services_dnsmasq_domainoverride_edit.php
+++ b/usr/local/www/services_dnsmasq_domainoverride_edit.php
@@ -86,8 +86,8 @@ if ($_POST) {
elseif ($_POST['domain'] && !is_domain($_POST['domain'])) {
$input_errors[] = gettext("A valid domain must be specified.");
}
- if ($_POST['ip'] && !is_ipaddr($_POST['ip']) && ($_POST['ip'] != '#')) {
- $input_errors[] = gettext("A valid IP address must be specified, or # for an exclusion.");
+ if ($_POST['ip'] && !is_ipaddr($_POST['ip']) && ($_POST['ip'] != '#') && ($_POST['ip'] != '!')) {
+ $input_errors[] = gettext("A valid IP address must be specified, or # for an exclusion or ! to not forward at all.");
}
if ($_POST['dnssrcip'] && !in_array($_POST['dnssrcip'], get_configured_ip_addresses())) {
$input_errors[] = gettext("An interface IP address must be specified for the DNS query source.");
@@ -131,14 +131,14 @@ include("head.inc");
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="domain" type="text" class="formfld unknown" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>">
<br> <span class="vexpl"><?=gettext("Domain to override (NOTE: this does not have to be a valid TLD!)"); ?><br>
- <?=gettext("e.g."); ?> <em><?=gettext("test"); ?></em></span></td>
+ <?=gettext("e.g."); ?> <em><?=gettext("test"); ?></em> <?=gettext("or"); ?> <em><?=gettext("mycompany.local"); ?></em> <?=gettext("or"); ?> <em><?=gettext("1.168.192.in-addr.arpa"); ?></em> </span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("IP address");?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="ip" type="text" class="formfld unknown" id="ip" size="40" value="<?=htmlspecialchars($pconfig['ip']);?>">
<br> <span class="vexpl"><?=gettext("IP address of the authoritative DNS server for this domain"); ?><br>
- <?=gettext("e.g."); ?> <em>192.168.100.100</em><br/><?=gettext("Or enter # for an exclusion to pass through this host/subdomain to standard nameservers instead of a previous override."); ?></span></td>
+ <?=gettext("e.g."); ?> <em>192.168.100.100</em><br/><?=gettext("Or enter # for an exclusion to pass through this host/subdomain to standard nameservers instead of a previous override."); ?><br/><?=gettext("Or enter ! for lookups for this host/subdomain to NOT be forwarded anywhere."); ?></span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Source IP");?></td>
OpenPOWER on IntegriCloud