I have setup ddclient on my machine which has a internal ip within the organization. However, ddclient returns the public ip of the organization. Is there a way to tell ddclient to return the internal ip?

Here's my configuration in /etc/ddclient.conf:

use=web, web=dynamicdns.park-your-domain.com/getip, web-skip='IP Address'

I have vpn access to connect to an ip within the organization, so I just need to know the internal ip of my machine to be able to access it.

  • Why would you setup servers with dynamic IP addresses? It's also a very bad idea to rely on Internet DNS servers to link to local addresses. – Julie Pelletier Feb 14 '17 at 3:31
  • 1
    he is trying to get to his desktop (or similar) via vpn... – ivanivan Feb 14 '17 at 4:26
  • I just took a quick glance at its man page and wonder if you tried setting use=if. – Julie Pelletier Feb 14 '17 at 5:37

Looking at the source of ddclient, one can see that the "where do I get my IP" strategy can be set via use (not an obvious name...). Your configuration uses a webserver (use=web) to get your IP, which is of course your public IP. The example in the source reads:

For example:

use=if, if=eth0             

specifies that ${program} should operate as a daemon, checking the eth0 interface for an IP address change every 5 minutes and use the 'dyndns2' protocol by default. The daemon interval can be specified as seconds (600s), minutes (5m), hours (1h) or days (1d).

So if you set use=if, if=tun0 where the network interface tun0 has the internal IP of the VPN endpoint (or whatever interface has the IP you want to access), I'd assume it would work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.