# Running my own DyDNS server for domains

## Seather

Hi there,

As you cannot get adsl or similar connections in this country with a static ip address, I would like to setup my own Dynamic DNS server (like no-ip.com or whatever), only I need it to update a full domain name, such as pointing example.com to a certain ip address, every 12 hours.

I do currently run a bind dns server for multiple domains, but need this added functionality.

I also have experience in using automatic-dns updates from dhcp for a local area network's host names.

Anyone know how to do this, or where I can find information to do this?

Thanks

----------

## j-m

Huh? Perhaps you mean dynamic DNS client  :Question: 

----------

## Seather

No I meant server. I want to host dynamic dns for certain domains.

----------

## j-m

 *Seather wrote:*   

> No I meant server. I want to host dynamic dns for certain domains.

 

But you have your own DNS... Do you want two things doing the same thing or what?  :Question:   :Confused: 

----------

## linuxbum

j-m

What will you use to choose which DNS entry  is returned?

At work we use this via domain controller/yea WINDOWS/ or DHCP server that user is logged into to return the closest server requested.

example:

FTP to FTPGATE.domain.net

we have say 10 different ftpgates around world so the ftpdgate get requested as ftpgate.dynamic.domain.net the DNS server forward this to DYNAMIC DIRECTOR it returns based on location of DHCP or Domain Controller it will return to DNS(QIP) server the closest ftpgate.

example/

So what will you use for decision maker?  I'm not sure how BIND(DNS) exits to make call to Dynamic Director, Our DNS(QIP) that we use has the user exit to do this.

Anybody know if the BIND RFC supports this?

That just my $.02...

Bryan

----------

## j-m

linuxbum:

I don´t quite understand your example. If you have multiple A records for the same hostname, it works like round-robin. MX records have priorities, not A or CNAME. Are you using SRV records or what?  :Question: 

Seather:

Could you explain in detail what are you trying to achieve?  :Confused: 

----------

## battra

FYI, the following DNS server is VERY well-suited for a dynamic DNS service:

http://mydns.bboy.net/

I've used it - it's pretty cool.  With mydns, you can update your dns in near real-time instead of once every 12 hours. (Normal internet propogation time still applies though).

----------

## Kuan

You can try Dynodns distributed by one of the programmers at MooreSystems.

He talks about it here.

Also, you can have a look at a software package that does the same, it is GnuDip.

----------

## linuxbum

J-m

Sorry I though you were original poster.

All our ftp gates alias to ftpgate0.dynamic.domian.net A record in QIP points to this as we then exit to DD for the closest one to user.

Thats why I asked if the BIND(RFC) supported this.

The QIP system is based on BIND but not all the rules and action apply.

Like bind should return first and only first entry found for system  right?

This QIP application will return all it finds. Really Dumb eh??

----------

## Seather

Hi there everyone,

Thanks for all the replies, I did figure it out. Unfortunately I cannot use any other dns server software than bind. Here is how I did it:

First generate a key with dnskeygen that will create your .key and .private files:

```
dnskeygen -H 128 -h -n seather
```

Then, add that key to the zone you want the user to be able to update, in named.conf:

```
key seather {

        algorithm HMAC-MD5.SIG-ALG.REG.INT;

        secret W4FySAFeGjwuwhd4SXGD3Q==;

};

zone "domain.tld" {

        type master;

        file "pri/domain.tld.zone";

        allow-update {

                key seather;

        };

};
```

Learn how to use nsupdate, and write a script to run commands in a file, with the filename of your key:

```
#!/bin/sh

# usage: do-nsupdate [text-file-containing-nsupdate-instructions]

nsupdate -k Kseather.+157+02182.private -v $1
```

Then write your filename with nsupdate commands:

```
server ns1.example.com

zone domain.tld

update delete seather.domain.tld A

update add seather.domain.tld 86400 A 165.146.44.118

show

send 

```

Currently busy writing a web interface and a c++ client that will use that.

----------

## chukaman

 *Seather wrote:*   

> Currently busy writing a web interface and a c++ client that will use that.

 

Thanks for the BIND instructions, that helped me. Have you written the web interface yet? That would really help!!

----------

