summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-08 16:20:25 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-08 16:20:25 +0000
commit91adc5c16f8293a9f4680e79e4d0aa2d8903eee1 (patch)
treec28d6da198804e7806d4d0a466f3853b1f2b3076 /etc
parentad1719997b25299696078eb7c2d8329d8bc8f84d (diff)
downloadpfsense-91adc5c16f8293a9f4680e79e4d0aa2d8903eee1.zip
pfsense-91adc5c16f8293a9f4680e79e4d0aa2d8903eee1.tar.gz
Sometimes people have local domains which they do not want forwarded to upstream servers. This is accomodated by using server options without the server IP address. To make things clearer local is a synonym for server. For example the option local=/localnet/ ensures that any domain name query which ends in .localnet will be answered if possible from /etc/hosts or DHCP, but never sent to an upstream server.
Ticket #1190
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/services.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index a95e22a..f6fd5f6 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -613,6 +613,12 @@ function services_dnsmasq_configure() {
}
}
+ /* suppose that dnsmasq handles our domain and don't send
+ requests for our local domain to upstream servers */
+ if (!empty($config['system']['domain'])) {
+ $args .= sprintf(' --local=/%s/', $config['system']['domain']);
+ }
+
/* run dnsmasq */
mwexec("/usr/local/sbin/dnsmasq {$args}");
OpenPOWER on IntegriCloud