sentora / sentora-core

Sentora is a web hosting control panel written in PHP for *NIX
GNU General Public License v3.0
648 stars 446 forks source link

Add the ability to setup Dynamic DNS for a subdomain #173

Closed iammeat closed 8 months ago

iammeat commented 9 years ago

It would be fantastic if the system could be modified so that users can setup Dynamic DNS for any of their, or their clients' subdomains.

I found this guide here, which also references an open source DDNS client (source is here on GitHub) that allows users to update:

http://www.randomnoun.com/wp/2013/07/08/a-dead-simple-dynamic-dns-server/

If it's preferred, I can make this into an addon for the system. Please advise me how I would do such a thing.

Thanks for creating the best open source Control Panel in existence!

TGates71 commented 9 years ago

If properly set up, your clients would not need to worry about the IP changing since they are supposed to point their domains at your name servers and not your server IP. You do however have to worry about your own server's IP changing. There is already a module that updates your server's IP if it changes (Auto-IP Updater) which finds all references to your old IP and updates it to the new IP for all vhosts and panel assignments and can send you an email notifying you of an IP change so you can go right to your domain registrar and update the new IP. It also allows you to run a script which could connect to your domain registrar and update the IP (if your domain registrar supports it.)

TGates71 commented 9 years ago

After further review, I did notice that GoDaddy has an API for remotely updating your IP on their service. This would be the part worth looking into and making a tutorial or module that would allow your server to update the IP with them (And possibly other domain registrars that support it). A simple drop down selection box of supported registrars and the required APIs would be the way to go ;)

Of course, this module would also rely on the autoip module.

Best idea is to add this functionality into the existing autoip module. I have posted the autoip module install instructions here: http://forums.sentora.org/showthread.php?tid=1690&pid=10844#pid10844

iammeat commented 9 years ago

Thanks for posting replies, and for the autoip information, TGates71. I think I should clarify what I was meaning, since I'm aware there are ways to have the control panel support a dynamic IP address. I was thinking more along the lines of a user/customer who is hosting their DNS via the panel, and wishes to manage their DNS accordingly. In that case, they could create any subdomain they wanted to, and then set that subdomain to be dynamically updated with the correct IP via a client application like I mentioned above.

What do you think?

TGates71 commented 9 years ago

Thats a whole other can of worms LOL Basically you want to set it up like dyndns.com or similar. To my knowledge, there is no intention at this point to add that kind of functionality within the panel.

PhilipMcGaw commented 9 years ago

You could if you wanted to write something that: • listens for a IP address. • compares it to the last value • Writes it to the database. • forces the demon to re run

You would want the TTL to be quite low (150 ish?)

This is not something that needs to be done via the control panel.

Philip McGaw www.philipmcgaw.com 07969502077

@Philip_McGaw

On 21 Jun 2015, at 05:39, TGates notifications@github.com wrote:

Thats a whole other can of worms LOL Basically you want to set it up like dyndns.com or similar. To my knowledge, there is no intention at this point to add that kind of functionality within the panel.

— Reply to this email directly or view it on GitHub.

Caffe1neAdd1ct commented 9 years ago

A module which specifies a daemon run hook would work quite well as it is run every 5 minutes...

Going to put this in the backlog for someone to pickup when time allows.

pomtom44 commented 7 years ago

Sorry to revive an old thread, This is just the only reference to DynDNS style module I can find online

Just wondering if any progress has been made on this? Or if another solution has been found to do the same thing,

Not updating the servers IP etc, but allowing clients to set a subdomain to point to their own PC and dynamically update that as their IP changes (DynDNS setup)

modcar commented 7 years ago

Wouldn't it be easier to setup a no-ip domain, then just add a cname to point to their no-ip domain?

Most routers come with ability to update the no-ip domain out of the box, else there's a windows app that runs in the background

pomtom44 commented 7 years ago

You would do that, but thats just adding another step in the chain. My DNS -> DynDNS -> Their system

If thats what is required then i guess it will have to do But if there was a way to add DynDNS to sentora to remove that middle step it would just make things that step easier

chongma commented 7 years ago

i think this is a great idea. i already have my own dynamic dns running. i am sure i discussed this with sentora team in the past because their dns setup overwrites dynamic changes. it requires generating a text block like: my $filename = "/home/user/scripts/updatedns-" . $target . ".txt"; open(my $fh, '>', $filename) or die "Could not open file '$filename' $!"; print $fh "server " . $host . "\n"; print $fh "zone " . $zone . "\n"; print $fh "update delete " . $target . ". A\n"; print $fh "update add " . $target . ". 86400 A " . $ipaddress . "\n"; print $fh "show\n"; print $fh "send\n"; print $fh "quit"; into the command /usr/bin/nsupdate -k /home/user/scripts/Kuser.domain.tld.+123+45678.private -v $filename the private key has to be generated for the user on the server (by sentora?)

maybe there is an easier way to do it...

the client only has to hit a password protected web page on the control panel to authenticate and then the control panel can use their ip address to update the dynamic dns.

it would be a really nice feature to have

MBlagui commented 7 years ago

Not a priority currently. This will remain in backlog.

I'm expressing here my point of view but think shared among the team. We have a lot to do to fix the core.

iammeat commented 7 years ago

If I am able to build this, would you consider a pull?

pedroponte commented 7 years ago

+1!

chongma commented 7 years ago

+1

MBlagui commented 7 years ago

What if you create a bash script .sh that with a cron will do it first. Then We will see later. I understand it might be interesting for some but this would be a solution. You won't be setting dyndns all the time.

TGates71 commented 8 months ago

Since this is more of a feature than a bug, I will close it and make a note in our private task tracker to be revisited in the future.