News: This forum is now permanently frozen.
Pages: [1]
Topic: VPN PPTP configuration's DNS setting bug  (Read 1726 times)
« on: September 14, 2012, 04:23:35 »
ejzhang *
Posts: 14

If enabled DNS forwarder and the pptp users dialin from optional interface (not lan interface), well the DNS setting will corrected (see below red codes).
Quote
if (is_array($pptpdcfg['dnsserver']) && ($pptpdcfg['dnsserver'][0])) {
   $mpdconf .= "   set ipcp dns " . join(" ", $pptpdcfg['dnsserver']) . "\n";
} else if (isset($config['dnsmasq']['enable'])) {
   $mpdconf .= "   set ipcp dns " . $config['interfaces']['lan']['ipaddr'];
   if ($syscfg['dnsserver'][0])
      $mpdconf .= " " . $syscfg['dnsserver'][0];
   $mpdconf .= "\n";
} else if (is_array($syscfg['dnsserver']) && ($syscfg['dnsserver'][0])) {
   $mpdconf .= "   set ipcp dns " . join(" ", array_slice($syscfg['dnsserver'], 0, 2)) . "\n";
}
« Last Edit: September 14, 2012, 04:25:57 by ejzhang »
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines