Multi-wan dyndns error



  • I have two wan interfaces.

    WAN -> vr0
    WAN2 -> vr1

    I tried to set up two dyndns updates and only WAN is being updated and pfsense does not find the ip address for WAN2.

    Below are debug logs:

    alix-pfsense:/var/etc#  more dyndns_opt1dyndns.debug
    08-10-09 08:31:46 - (6655684) - [dyndns] - /1249898519\n
    08-10-09 10:35:24 - (9171339) - [dyndns] - /1249898519\n
    08-10-09 10:47:55 - (4171148) - [dyndns] - /1249898519\n



  • Wow…  Still no apparent progress on this, and they've even locked my original thread, reflecting the same / similar issue:  http://forum.pfsense.org/index.php/topic,13126.0.html



  • Patience, patience, please.



  • No worries, Sullrich…  I understand that I'm running not just Alpha, but ALPHA-ALPHA software, and do expect breakage and disaster.  Honestly, for the most part, it has been quite stable.

    I don't mean to rush, or be impatient.  Just don't want to see this issue fall thru the cracks, what with old threads being locked, and as a result, being buried under all the other threads.

    I really wish I knew more about coding in today's world (I'm an old hand at Basic / QBasic, as if that's useful anymore...).



  • I fixed this by editing /etc/inc/dyndns.class, last function,

    function _checkIP() {
    
    			log_error("DynDns: _checkIP() starting.");
    
    			$hosttocheck = "checkip.dyndns.org";
    			$checkip = gethostbyname($hosttocheck);
    			//if ($hosttocheck == $checkip) {
    				$ip_address = find_interface_ip($this->_if);
    				log_error("DynDns debug information: {$ip_address} extracted from local system.");
    			//} else {
    			//	$ip_ch = curl_init("http://{$checkip}");
    			//	curl_setopt($ip_ch, CURLOPT_RETURNTRANSFER, 1);
    			//	curl_setopt($ip_ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    			//	curl_setopt($ip_ch, CURLOPT_INTERFACE, $this->_if);
    			//	$ip_result_page = curl_exec($ip_ch);
    			//	curl_close($ip_ch);
    			//	$ip_result_decoded = urldecode($ip_result_page);
    			//	preg_match('=Current IP Address: (.*)=siU', $ip_result_decoded, $matches);
    			//	$ip_address = trim($matches[1]);
    			//	log_error("DynDns debug information: {$ip_address} extracted from {$hosttocheck}");
    			//}
    
    			return $ip_address;
    		}
    

    Basically I forced the system to not look up the IP using the web and taking it from the interface directly. It cured the 3min hang and got my ip successfully.



  • Nice find!!

    I implemented this fix, and on first reboot, all's well with dual dynamic IP's.  I've been waiting for months, for this fix, even if it is a work-around.

    I had no idea that it was set up to use the if=web configuration.  Of course, even if I had, I'd not have known the first thing about where to look…  I've always used the interface, on my own gear, unless trapped behind NAT...

    Thanx again!



  • After an upgrade / reload or 2, this fix resulting overwritten, and what with a different fix alleged to be in place in new snapshots, it seems at least the hangs are fixed.

    However, dns-o-matic err's out on EVERY host, at this point.  Not sure yet how this new problem is caused, or where it stems from…



  • There seems to be an update about one or two weeks ago which broke my dyndns in this way that I have to go to  Services - dyndns and have to save my settings without changing them. After this saving my dyndns-adress is actualized. The update-dyndns which is present in cron never detects a new IP-adress. I put the error on redmine.


Log in to reply