6

You all probably know commercial dynamic DNS providers like dyndns.org or no-ip.com.

But how to create a similar service for just a handful of machines?

What server software would be best suited for such a setup (under Linux)?

Advantages:

  • the service would be under your control
  • no tracking by some opaque company

Minimal requirements:

Probably something like: you own at least one host machine with a static IP, a domain and your domain provider let you configure DNS records.

Clients:

A few machines that are connected via cable/DSL and only get dynamic IP addresses on each dial-up and/or every x hours.

maxschlepzig
  • 56,316
  • 50
  • 205
  • 279
  • Look at the German WiKi on DynDNS [http://de.wikipedia.org/wiki/DynDNS]. The English WiKi is not worth visiting. – Nils Jan 14 '12 at 21:45

4 Answers4

5

This depends on how similar to DynDNS.org this service should be.

For your seemmingly small use case I would propably set up a combined DHCP/bind-server (with Linux - what else).

The DHCP server is able to update your DNS-server that acts as primary server for a subdomain of "your" provider-domain. Make sure to register that subdomain with a short TTL or register your sub-domain at your provider as "to be forwarded to".

The more complicated part is assigning fixed names for your DSL-machines. Do you control them/have a fixed number with not changing fixed MAC-adresses?

The lease-time for DHCP should be > 1 day, so the same client gets the same IP+name again.

Update: I found someone with exactly your problem and the solution here. There is a Open Source project named GNUdip that should fulfill your requirements.

Nils
  • 18,202
  • 11
  • 46
  • 82
  • Ok, the outline is clear - but what about the details? e.g. with which command you update a DNS server, what DNS record to set such that a host acts as a primary server etc. - how to configure 'to be forwarded to'? Regarding the DSL-machines - they have fixed MAC-addresses and I control them. – maxschlepzig Jan 14 '12 at 11:23
  • Since you have a number of fixed MAC-adresses you can use HCP mode - i.e. you can specify which MAC-address should get which IP (and thus name). In this combination you can even used "normal", fixed DNS entries. Then you don`t have to fight your way through putting up your own DNS server that accepts dynamic updates (which is just a simple option for the DHCPD). – Nils Jan 14 '12 at 20:08
  • well, the point is that the (external) IPs of the DSL-machines are dynamic ... – maxschlepzig Jan 14 '12 at 20:34
  • So the DSL-machines do not dial up your server to get an IP, but just to change their CNAME to a differnent IP in you DNS subdomain. This should be doable with a (faked) DHCP-request to your server, too. Problem is that this has to be an IP level request - not Ethernet. So you need some kind of wrapper there (on client and server side). – Nils Jan 14 '12 at 21:38
2

Take a look at the GnuDIP Project. It is old but with a little work it should perform

Stéphane Gimenez
  • 28,527
  • 3
  • 76
  • 87
1

You assign an IP address using DHCP conf bound to a mac address and have their names setup in either the hosts file or your in internal view with acl in named.conf bind9 (named)/dhcpd daemons. Or if you have a real dial-in you want to consider a pppd solution.

Mat
  • 51,578
  • 10
  • 158
  • 140
Sergey Benner
  • 171
  • 1
  • 3
0

I have created my own DDNS service using shared web hosting on direct admin. The no-ip and dyndns protocol are very similar. Follow them with the direct admin command CMD_API_DNS_CONTROL.

Unfortunately routers does not support "common ddns protocol". Still updating ip ends with just calling:

wget --user <user> --password <password> "https://ddns.XXX.XXX/nic/update/?hostname=rrr.ddns.XXX.XXX"

where the password and user can be hardcoded in the scripts.

Fco Javier Balón
  • 1,144
  • 2
  • 11
  • 31
Fantastory
  • 101
  • 1