Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    DynDNS still updating with internal WAN IP

    DHCP and DNS
    5
    5
    3393
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hessie last edited by

      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

      1 Reply Last reply Reply Quote 0
      • T
        trendchiller last edited by

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

        Are you behind some NAT-device or else ?

        1 Reply Last reply Reply Quote 0
        • C
          cmb last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • S
            suporteintime.com.br last edited by

            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

            1 Reply Last reply Reply Quote 0
            • S
              sullrich last edited by

              http://devwiki.pfsense.org/SubmittingPatches

              1 Reply Last reply Reply Quote 0
              • First post
                Last post