DynDNS still updating with internal WAN IP



  • Hi !

    Just wanted to ask when or if it will be fixed that pfsense is constantly updating DDNS with its internal WAN IP instead of the "real" IP i.e. 192.168.1.1 instead of 195.101.123.123.

    I'm using this "fix" since 1.0 and it is still working fine but its a "pain in the ass" to change the dyndns.class after every update:

    $wan_ip = $this->_checkip();

    /* Private function for getting real IP */

    function _checkip() {

    log_error("DynDns: Running _checkip() for real WAN IP");

    $ch = curl_init();
                            curl_setopt($ch, CURLOPT_URL, 'http://checkip.dyndns.com');
                            curl_setopt($ch, CURLOPT_HEADER, 0);
                            curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);

    $data = curl_exec($ch);
                            curl_close($ch);

    list($part1, $part2) = split(': ', $data, 2);
                            list($ip, $junk) = split('<', $part2);

    return $ip;
                    }
                    /* End of function */

    Thanks



  • It's irritating… you are the only one having this problems i suppose...

    Are you behind some NAT-device or else ?



  • DynDNS updates whatever the IP assigned to your WAN is, in this case it's a private IP.

    That may be changed in the future, but there are no plans to do so at this time. Patches are welcome.



  • Hi,
    I am having this same problem (or need) too!
    In somecases we use pfsense behind NAT device with a dynamic IP.
    And it would be a great update.

    We are able to make a patch with this update.
    But we don't know how to make it.
    Could you send us information to make patches?

    Thanks.
    Hamilton
    INTIME
    Brazil




Log in to reply