A suggestion. Since a major motivation of doing Dynamic DNS with PowerDNS is to avoid using third-party services, it would be possible to both eliminate the need to change the IP location service and to eliminate the third-party service if the client were changed to call a script at the PowerAdmin user's own site.

The one-line script: http://example.com/poweradmin/addons/my_ip.php
  <?php echo $_SERVER['REMOTE_ADDR']; ?>

Here's a patch for dynamic_dns_client.pl:
--- dynamic_dns_client.pl.orig  2012-05-02 16:11:07.000000000 -0400
+++ dynamic_dns_client.pl       2012-11-12 18:45:24.000000000 -0500
@@ -10,24 +10,11 @@
 my $login             = 'username';
 my $password          = 'password';
 my $domain            = 'mydynamicdns.example.com';
-my $ip_lookup_service = 'whatismyip';                 # or 'hostip'
+my $ip_lookup_url     = 'http://example.com/poweradmin/addons/my_ip.php';
 my $verbose           = 1;

 my $poweradmin_url = 'http://example.com/poweradmin/';

-# try to get client ip address using whatismyip service
-my $ip_lookup_url;
-if ( $ip_lookup_service eq 'whatismyip' ) {
-    $ip_lookup_url = "http://automation.whatismyip.com/n09230945.asp";;
-}
-elsif ( $ip_lookup_service eq 'hostip' ) {
-    $ip_lookup_url = "http://api.hostip.info/get_html.php";;
-}
-else {
-    print "Error: unknown global ip address lookup service\n";
-    exit;
-}
-
 my $ipaddress = LWP::Simple::get($ip_lookup_url)
   or die("Error: Could not get your global IP address!\n");


- Ron

_______________________________________________
poweradmin-users mailing list
[email protected]
http://lists.poweradmin.org/cgi-bin/mailman/listinfo/poweradmin-users

Reply via email to