> 
> We have a few customers on dynamic IP addresses that we would like to be
> able to connect to remotely. If we lead the customer through the procedure
> to find their IP address and tell us then it all works fine but I'd like 
> something
> a bit smoother. The customers in this case are charities and other very low
> budget organisations so even then extra $10/month for a static IP address
> isn't feasible.
> 
> I have a bind9 server, can that make use of standard dyndns protocols
> somehow (even via a separate daemon)?
> 
> Or anything option would be good too. I'm getting a lot of noise on google
> when I try and search.
> 

I just wrote a quick php script (redacted below) to do this for now. It's 
basically just for us to be able to connect to remote PCs and servers and we 
can just schedule a wget to the script with some authentication (htaccess file 
etc). Most of the servers will be Windows so a wget on a schedule is the most 
straightforward way to do it.

James

<?
$ip = $_SERVER["REMOTE_ADDR"];
$user = $_SERVER['PHP_AUTH_USER'];

$pipespecs = array(
 0 => array("pipe", "r"),
 1 => array("pipe", "w")
);

$proc = proc_open('/usr/bin/nsupdate', $pipespecs, $pipes, '/tmp');

if (is_resource($proc)) {
  fwrite($pipes[0], "key <domain name> <key> \n");
  fwrite($pipes[0], "server <server name>\n");
  fwrite($pipes[0], "zone <zone name>\n");
  fwrite($pipes[0], "update delete $user.<zone name>. A\n");
  fwrite($pipes[0], "update add $user.<zone name>. 900 A $ip\n");
  fwrite($pipes[0], "send\n");
  fclose($pipes[0]);
  echo stream_get_contents($pipes[1]);
}
?>
_______________________________________________
luv-main mailing list
[email protected]
http://lists.luv.asn.au/listinfo/luv-main

Reply via email to