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

Services / Dynamic DNS / Check IP Services

DHCP and DNS
3
7
5.2k
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.
  • W
    wkn
    last edited by Mar 13, 2017, 10:29 PM

    Hi,

    setting up another Check IP service (myip.ch) has no effect in processing the update, still using default checkip.dyndns.com, which a lot of times is very busy and not reliable.

    Is this a bug or a misconfiguration?

    Version: 2.4.0-BETA (amd64) built on Mon Mar 13 13:55:02 CDT 2017 FreeBSD 11.0-RELEASE-p8

    BR
    wkn

    1 Reply Last reply Reply Quote 0
    • N
      NOYB
      last edited by Mar 14, 2017, 12:57 AM Mar 13, 2017, 11:07 PM

      What are the settings on the Check IP Services page?

      Did enable the service you want to use?
      Did you disable the default service?
      Is the check being done for "Dynamic DNS Clients" or "RFC2136 Clients"?

      @Services:

      The first (highest in list) enabled check ip service will be used to check IP addresses for Dynamic DNS services, and RFC 2136 entries that have the "Use public IP" option enabled.

      1 Reply Last reply Reply Quote 0
      • B
        Braklet
        last edited by Mar 14, 2017, 6:59 PM

        I see the exact same behavior running 2.3.3-RELEASE.

        I only use "Dynamic DNS Clients."  I disabled the preconfigured "Default" Check IP Service using dyndns.org.  I enabled a new service and confirmed it works correctly from the pfSense shell.

        Whenever the daily IP check fires off, or whenever I force an update through the edit page, system logs only show retrieval from checkip.dyndns.org:

        Mar 14 14:56:21 php-fpm 93976 /services_dyndns_edit.php: Dynamic DNS freedns (<myserver.org>): <myserver ip="">extracted from checkip.dyndns.org
        Mar 14 14:56:21 php-fpm 93976 /services_dyndns_edit.php: Dynamic DNS (<myserver.org>): running get_failover_interface for wan. found fxp0
        Mar 14 14:56:21 php-fpm 93976 /services_dyndns_edit.php: Dynamic DNS freedns (<myserver.org>): _update() starting.
        Mar 14 14:56:22 php-fpm 93976 /services_dyndns_edit.php: Dynamic DNS freedns (<myserver.org>): _checkStatus() starting.
        Mar 14 14:56:52 php-fpm 93976 /services_dyndns_edit.php: Dynamic DNS freedns (<myserver.org>): IP address could not be extracted from checkip.dyndns.org
        Mar 14 14:56:52 php-fpm 93976 /services_dyndns_edit.php: phpDynDNS (<myserver.org>): (Success) No Change In IP Address</myserver.org></myserver.org></myserver.org></myserver.org></myserver.org></myserver></myserver.org>

        1 Reply Last reply Reply Quote 0
        • B
          Braklet
          last edited by Mar 14, 2017, 8:26 PM

          The public IP checking code appears to be located in the pfSense filesystem at:  /etc/inc/dyndns.class.  The default service "checkip.dyndns.org" is hardcoded in function _checkIP():

                                          $hosttocheck = "checkip.dyndns.org";
                                          $try = 0;
                                          while ($try < 3) {
                                                  $checkip = gethostbyname($hosttocheck);
                                                  if (is_ipaddr($checkip)) {
                                                          break;
                                                  }
                                                  $try++;
                                          }
                                          if ($try >= 3) {
                                                  log_error(sprintf(gettext('Dynamic DNS %1$s debug information (%2$s): Could not resolve %3$s to IP using interface IP %4$s.'), $this->_dnsService, $this->_FQDN, $hosttocheck, $ip_address));
                                                  return 0;
                                          }
                                          $ip_ch = curl_init("http://{$checkip}");
          

          I tried hacking it to point at another URI but couldn't get it to work.  Based on the system logs, it's very clear that pfSense is executing my hack when I force a dynamic DNS update.

          Point being, there do not appear to be any provisions in this PHP code for the alternate Check IP Services supported by the web configuration.

          1 Reply Last reply Reply Quote 0
          • N
            NOYB
            last edited by Mar 14, 2017, 9:39 PM

            The check ip used by the "Save & Force Update" action of the edit page (services_dyndns_edit.php) is not the same as the check ip that is used by the service status page (services_dyndns.php).

            The service status page uses the dyndnsCheckIP() function in services.inc.

            Probably the _checkIP() function of dyndns.class should use the dyndnsCheckIP() also.  Or at least be changed to obtain the hosttocheck value from the configured check ip services, similarly to the dyndnsCheckIP() function.

            I'm strictly "RFC2136 Clients" here and don't want to mess with "Dynamic DNS Clients".  So someone else well have to make, test and commit the needed changes.

            But the status page should already be using the "Check IP Services" feature.  It's just the "Save & Force Update" action of the edit page that is using the hard coded "check.dyndns.org" service in dyndns.class _checkIP() function.

            1 Reply Last reply Reply Quote 0
            • B
              Braklet
              last edited by Mar 16, 2017, 4:30 PM

              @NOYB, I'll have to take your word for it, since I haven't noticed service status page problems behind my double NAT WAN.  Well, the reported IP is always red, but I assumed that was because I hadn't hit the 25 day update interval yet.

              But I did take the time to rewrite the _checkIP() function in dyndns.class to use another (private) hard coded HTTP IP checker.  Now my pfSense system logs reflect success for every daily dynamic DNS update, whereas with checkip.dyndns.org I had about 20% success.

              So the cron-driven periodic Dynamic DNS update also uses dyndns.class::_checkIP().

              1 Reply Last reply Reply Quote 0
              • W
                wkn
                last edited by Mar 18, 2017, 12:07 AM

                I also tried to hack the dyndns.class, but my check url myip.ch dont match the regex.

                But i tried to add the port :8245 to the checkip.dyndns.org and it is more reliable now.

                But i think developers have to add the functionallity in the script to be consistent with the GUI.

                1 Reply Last reply Reply Quote 0
                3 out of 7
                • First post
                  3/7
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.