Revision 2c46f11f
Added by Scott Ullrich almost 15 years ago
etc/inc/services.inc | ||
---|---|---|
603 | 603 |
if (isset($config['dnsmasq']['regdhcp'])) { |
604 | 604 |
$args .= " --dhcp-hostsfile={$g['varetc_path']}/hosts "; |
605 | 605 |
} |
606 |
|
|
606 |
|
|
607 |
/* Setup forwarded domains */ |
|
607 | 608 |
if (isset($config['dnsmasq']['domainoverrides']) && is_array($config['dnsmasq']['domainoverrides'])) { |
608 | 609 |
foreach($config['dnsmasq']['domainoverrides'] as $override) { |
609 | 610 |
$args .= ' --server=/' . $override['domain'] . '/' . $override['ip']; |
610 | 611 |
} |
611 | 612 |
} |
612 | 613 |
|
613 |
/* suppose that dnsmasq handles our domain and don't send |
|
614 |
requests for our local domain to upstream servers */ |
|
615 |
//if (!empty($config['system']['domain'])) { |
|
616 |
// $args .= sprintf(' --local=/%s/', $config['system']['domain']); |
|
617 |
//} |
|
614 |
/* Allow DNS Rebind for forwarded domains */ |
|
615 |
if($config['dnsmasq']['domainoverrides']) { |
|
616 |
foreach($config['dnsmasq']['domainoverrides'] as $override) { |
|
617 |
$args .= ' --rebind-domain-ok=/' . $override['domain'] . '/ '; |
|
618 |
} |
|
619 |
} |
|
618 | 620 |
|
619 | 621 |
/* run dnsmasq */ |
620 |
//--rebind-localhost-ok |
|
621 | 622 |
mwexec("/usr/local/sbin/dnsmasq --rebind-localhost-ok --stop-dns-rebind --local-ttl 1 --all-servers --dns-forward-max=5000 --cache-size=10000 {$args}"); |
622 | 623 |
|
623 | 624 |
if ($g['booting']) |
Also available in: Unified diff
Allow forwarded domains to be queried.