topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 23, 2024, 12:41 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Create your own DynDNS type service  (Read 6365 times)

parttimecoder

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 16
  • Donation code is cool!
    • View Profile
    • Donate to Member
Create your own DynDNS type service
« on: December 04, 2008, 09:46 AM »
Hi all.

Does anybody have suggestions on how to create a DynDns type service for personal use. I don't want to use DynDns but create my own redirection for personal uses. I am not asking for an exact recipe, rather just a pointer in the right direction. For example:

Can it be achieved with PHP scripts ?
Can it be done without setting up a dedicated server - Paid hosting?

At the moment I have a small http get program that updates IP's from various locations and stores them to text files. And when user needs access he retrieves  latest IP from that text file.

Any suggestions would be great  :)
 

Rover

  • Master of Smilies
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 632
    • View Profile
    • Donate to Member
Re: Create your own DynDNS type service
« Reply #1 on: December 04, 2008, 02:47 PM »
hmm.... I'd need more details to understand exactly what you're trying to accomplish, but if it's just for web redirects you could do something like this:

Assuming you have access to a conf.d directory for apache and a hosted server with a static IP and Name.

You can have your remote servers call the static server when their IP address changes.  If they call a php script with the URL they serve, you could update a passthru proxy configuration on apache.  When the static apache server sees a request coming it, redirects to the remote Server.

Sample proxy.conf:

<VirtualHost *>
DocumentRoot /www/docs/host.foo.com
ServerName host.foo.com
ServerAlias host
   ProxyPass         /   http://10.10.123.10/
   ProxyPassReverse  /   http://10.10.123.10/

</VirtualHost>


This should allow you to point all of your domains (www.ex1.com, www.ex2.com) to the same IP as your static server and have it re-route traffic to the dynamic ip servers based on name.

If you want to use just 1 domain name and re-route based on directory, you could do the same, you would just have multiple proxypass lines for the 1 server and list each directory. 

When an IP address changed, your php script would modify the proxy.conf file and send a reload command to apache.  kill -HUP `cat /var/run/apache.pid` or whatever.

It could work.  DynDNS is much easier.   :P
Insert Brilliant Sig line here

hilltop

  • Participant
  • Joined in 2008
  • *
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Create your own DynDNS type service
« Reply #2 on: December 09, 2008, 08:54 PM »
Certainly you can. Its a pretty involved project though, you dont want to just throw something that works up and cross your fingers. Do not use the DNS WMI if your using a Windows Server and do not update zones in Bind then relaod bind to have the changes take effect on Linux Unix.

Do Use GSS-TSIG updates for Windows Server
Do Use TSIG updates for Linux Unix

I personally would have a look at
MintDNS http://www.dyndnsservices.com
for Windows Server or
GNUDIP http://gnudip2.sourceforge.net/
for Linux Unix

Both are free for non commercial use, and both are open sourced.
« Last Edit: December 09, 2008, 09:00 PM by hilltop »