# DynDNS

## xbmodder

I am running with zoneedit now, they are amazingly slow. I have one machine with static IP, but that cannot run as a webserver. Then I have a machine with dynamic IP which I do run as my webserver. Lets name these machines machine.s and machine.d. machine.s has the ability to run a dns server and a simple webserrver. I would like to have a dynamic IP uptdater client running on machine.d that changes the IP address on machine.s' BIND DNS server. Is this possible.

----------

## andrewy

Yes, use either dyndns.org or noip.com. I use noip.com because of cost, but their Linux client isn't quite as good.

----------

## omnicloud

the noip client works fine for me

Added it to default runlevel

put in my account info

Set interval to 12 hours (my IP is "almost" static so there is a slight chance it will change but it never does.)

????

Profit

----------

## rouben

I've been using ZoneEdit for over 4 years now with no major issues. I have never had both of my DNS servers go down simultaneously (sometimes one of them goes down, but that's why there's always a backup on a completely separate network). They give you total control over your zone, os if the updates are too slow, simply increase the zone refresh rate. That will force all the other DNS server on the Internet to re-request your Zone's records at higher intervals, hence higher refresh rates. I think my zones are set to refresh every 6 hours or so. I don't care, since I don't get that much traffic, and such I am well within ZoneEdit's free DNS bandwidth limits.

With regards to DNS updates, I believe with a certain flavour of dhcpcd you can create a certain file in /etc/dhcpcd/dhcpcd-eth0.exe or something similar that will be executed by dhcpcd whenever a change in your IP configuration is detected. That file happens to be a symbolic link to a very simple script I whipped up that wget's a couple of URLs from ZoneEdit like so, for each of my domains:

```
wget -O - --http-user=username --http-passwd=password 'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain.com'
```

Nice and simple. For more information, check out their Dynamic DNS FAQ: http://www.zoneedit.com/doc/dynamic.html#faq3

P.S. ZoneEdit's help section is an amazing DNS resource. It explains how DNS works really well. I strongly suggest that anyone trying to understand DNS to start their research there.

----------

## Bob P

i'm using dyndns.org to provide name resolution for my home server and for the Jackass! project server.  because i've got a dynamically assigned IP address, i need to look into a DNS-update client so that i don't have to manually update my IP every month.  (technically speaking, i have a dynamically assigned IP, even though it hasn't changed in a year).

does anyone have experience with the DNS-update clients in portage?  the only one that i see that;s specifically designed for dyndns.org is named "dyndnsupdate", and its presently masked in portage.  i was wondering if anyone knows why the package is maksed, and whether or not it works.  alternatively, if anyone can recommend another good update package to use with dyndns.org, i'd appreciate it!  :Wink: 

thanks.

----------

## tomk

 *Bob P wrote:*   

> idoes anyone have experience with the DNS-update clients in portage?  the only one that i see that;s specifically designed for dyndns.org is named "dyndnsupdate", and its presently masked in portage.  i was wondering if anyone knows why the package is maksed, and whether or not it works.  alternatively, if anyone can recommend another good update package to use with dyndns.org, i'd appreciate it! 

 

I use ddclient, works perfectly.

----------

## think4urs11

net-dns/ez-ipupdate

something like the swiss knife for dynamic dns; works since ~2years here (with dyndns.org) with daily updated ip.

----------

## morphal

ez-ipupdate seems to be working for me at the moment. The documentation is more than a little shaky though. I'd like to set it up to not run as root but I'm scared about doing it just yet as I don't want to break something. Anybody care to give a little more input on just what needs to be/should be in the conf file?

----------

## Bob P

i had tried using ddclient and ran into some strange behavior.  on every alternate contact with dyndns.org, it would change my IP address from my real IP address to the rfc1919 address on my LAN, and then back again, repeating the cycle in an infinite loop.  as a result, at any given point in time there was always a 50% probability that dyndns would have the right IP, and a 50% chance that it would report my rfc1919 address instead.  after a prolonged bout of beating my head on the keyboard, i gave up.  to this day i cannot explain what had happened.

----------

## think4urs11

 *morphal wrote:*   

>  Anybody care to give a little more input on just what needs to be/should be in the conf file?

 

```
# cat /etc/dyndns.conf

#!/usr/bin/ez-ipupdate -c

service-type=dyndns

user=<username>:<password>

host=<your fqdn>

interface=ppp0

max-interval=86400

period=300 <- check every 5 minutes

cache-file=/tmp/ez-ipupdate.cache

daemon
```

----------

## Bob P

i've got a question for users of either ez-ipupdate or ddclient:

it seems that these daemons are reporting the rfc1919 address of the server on my lan instead of the IP address for my DSL router.  as soon as the daemons are activated, they go to DynDNS and update my IP address -- but instead of using the IP address for my modem (ie: 4.16.x.x), they update the DynDNS server with the rfc1919 address on my LAN, ie: something like  192.168.x.x.

the way that my LAN is configured, my webserver (and everything else on the LAN) sits behind a DSL router.  the router at 4.16.x.x is configured to port forward all of the HTTP requests to the machine on the LAN located at 192.168.x.x.  unfortunately, the DynDNS daemons are reporting 192.168.x.x to DynDNS instead of 4.16.x.x.

interestingly, when i go to DynDNS org and log-on using my browser, the browser correctly reports the real IP address of 4.16.x.x to DynDNS.

can anyone offer any help?  

FYI here is a copy of the ez-ipupdate config file that is presently being used:

```
# cat /etc/dyndns.conf

#!/usr/bin/ez-ipupdate -c /etc/dyndns.conf --foreground

service-type=dyndns

user=<username>:<password>

host=<your fqdn>

interface=ppp0

max-interval=86400

period=300 <- check every 5 minutes

cache-file=/tmp/ez-ipupdate.cache

daemon
```

----------

## think4urs11

At first - its RFC1918, not 1919  :Wink: 

Seems to as if you need to do it the other way around

try to use the address parameter instead of the interface

you should get your correct (means the one your seen as from external) by using 

```
wget http://www2.simflex.com/ip.shtml -qO - | grep ^[1-9]
```

so the conf use might be (not tested)

```
#!/usr/bin/ez-ipupdate -c

service-type=dyndns

user=<username>:<password>

host=<your fqdn>

address=`wget http://www2.simflex.com/ip.shtml -qO - | grep ^[1-9]`

max-interval=86400

period=300 <- check every 5 minutes

cache-file=/tmp/ez-ipupdate.cache
```

----------

## Bob P

 *Think4UrS11 wrote:*   

> At first - its RFC1918, not 1919  

 

oops.  my bad.   :Embarassed: 

 *Quote:*   

> you should get your correct (means the one your seen as from external) by using 
> 
> ```
> wget http://www2.simflex.com/ip.shtml -qO - | grep ^[1-9]
> ```
> ...

 

yes, that does indeed work, and is a very clever idea.

 *Quote:*   

> so the conf use might be (not tested)
> 
> ```
> #!/usr/bin/ez-ipupdate -c
> 
> ...

 

unfortunately, ez-ipupdate doesn't like the grep'd wget character string as an address parameter.  it issues the following error:

```
#/usr/bin/ez-ipupdate -c /etc/dyndns.conf --foreground

the IP address "'wget http://www2.simflex.com/ip.shtml -qO | grep ^[1-9]'" is invalid

invalid data to perform requested action.

```

it looks like the wget/grep line is being treated as a character string literal, instead of being processed as an instruction.  :Confused: 

i have to complement you on the novel idea.  now i'm wondering -- i can't be the first person who's ever encountered this sort of problem, so how does everyone else get these daemons to work?

----------

## Headrush

I just use lynx and a cron entry to check the IP every 15 minutes. 

```
0,15,30,45 * * * * lynx -source -auth=username:password 'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mywebsite.com'
```

----------

## think4urs11

 *Bob P wrote:*   

> 
> 
> ```
> #/usr/bin/ez-ipupdate -c /etc/dyndns.conf --foreground
> 
> ...

 

You were using ' (single quote) instead of ` (backtick) around the wget, correct? Try the later ones please.

----------

## Bob P

backtics?  i feel really stoopid for having missed that -- i even enlarged the font onscreen by 3 sizes to get a better look at the text.   :Embarassed: 

the sad news is that the backtics don't resolve the problem -- i get the same error.   :Confused: 

----------

## el_chavo

I tried way too long to get ez-ipupdate to work properly, I could not for the life of me make it post my router wan address, just the internal network 192* one. Using ddclient made it much easier, just follow these instructions below, it'll check the ip via the router rather than online and change it when need be. I've kept my ip current via dyndns.org, seems to work fine.  

Linksys

If you are using ddclient, uncomment this information in ddclient.conf:

File: /etc/ddclient/ddclient.conf

use=linksys,                fw=192.168.1.1:80           # via Linksys's internet FW

fw-login=user,             fw-password=secret              # FW login and password

----------

## think4urs11

 *Bob P wrote:*   

> the backtics don't resolve the problem -- i get the same error.  

 

hmm, maybe it might work when adding the address parameter on the command line instead of putting it into the conf.

If everything else fails, see  :Arrow:  DynDNS Howto, especially the part about ddclient

HTH

T.

----------

## morphal

My ez-ipupdate seems to be working fine. I have it set to check the address every five minutes as recommended in one of the earlier posts. I use the backtics and everything seems to be alright.

However, this morning I woke up to find an IM from a friend saying that my domain was currently pointing to a private IP address. This is obviously no good. The message was sent about an hour before I went to zoneedit and manually changed it. The address hasn't changed in the two hours since then. What would cause the address to randomly change to a private one like that and not change back but still accept the proper one once it had been manually entered?

As far as problems with ez-ipupdate ... I had some problems at first with the -qO - switch. For what it's worth, the O is a letter and the trailing - (dash) is required before the pipe to grep.

----------

