[patch] ddclient debconf doesn't offer 'web' as available configuration

Bug #3429 reported by Ken Dibble
32
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ddclient (Debian)
Fix Released
Unknown
ddclient (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

The installation gui for ddclient asks for an interface (eth0, etc), but fails to ask about firewalls, routers, etc. If the user foolishly believes that the ddclient installer and script are capable of correctly deducing the ip address of the router, etc., the ddclient will update dyndns with the lan address.

To be more verbose, since the installer never asks about anything other than an interface, the user could be led to believe that the installer will check the machines ip, find it to be a private ip (192.168. etc) and that the installer will deduce the ip by other means. This is, of course, not true, but the user has no way of knowing this until a bad update occurs at dyndns.

The installer should either ask about other devices (routers, etc), or not start the service as if all is well, when, in fact, the installer has no idea whether all is well or not.

It is my understanding that the purpose of the ddclient is to cause unnecessary updates at dyndns NOT TO OCCUR, rather than CAUSING THEM TO OCCUR.

SPECIFIC EXAMPLE:
my exposed IP (that of the router) is 67.x.x.x. This is verified
at dyndns.com and whatismyip.com.
my lan IP of the ubuntu machine running the ddclient is 192.168.1.107
The ddclient installer asks about an interface, clicking on help
tells me that the installer wants an interface(no help there..).
I tell it eth0, which is the machines interface to the router.
The installer completes, starts ddclient in daemon mode and
promptly updates my hostname to have an ip of 192.168.1.107, which is,
of course, wrong.

If for some reason this bug report is unclear, please email me.
<email address hidden>

Related branches

Revision history for this message
In , Felix Kroeger-Naudiet (f-kroeger-naudiet) wrote : Re: Bug#285007: ddclient: A patch adding use=web support to webconf (and a minor bug correction)
Download full text (3.9 KiB)

Hello Itay,

> Lack of "use=web" support is very annoying to us who need it. This
> patch should add preliminary support for that (to be improved on...)
>
> Also corrects a minor bug in the config script where it tries to guess
> some default answers ([ -z ... ] should have been [ -n ... ])

Thanks for the patch.
>
>
> -- System Information:
> Debian Release: 3.1
> APT prefers unstable
> APT policy: (990, 'unstable')
> Architecture: i386 (i686)
> Kernel: Linux 2.6.9-3
> Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)
>
> Versions of packages ddclient depends on:
> ii debconf 1.4.41 Debian configuration management sy
> ii perl [perl5] 5.8.4-4 Larry Wall's Practical Extraction
>
> -- debconf information excluded

> diff -u -Nru ddclient-3.6.2/debian/config ddclient-3.6.2.new/debian/config
> --- ddclient-3.6.2/debian/config 2004-12-09 20:05:36.000000000 -0600
> +++ ddclient-3.6.2.new/debian/config 2004-12-09 20:00:09.000000000 -0600
> @@ -102,16 +102,24 @@
> db_input critical ddclient/names || true
> db_input critical ddclient/username || true
> db_input critical ddclient/password || true
> - db_input critical ddclient/interface || true
> + db_input critical ddclient/method || true
> db_go
>
> + db_get ddclient/method
> + if [ "$RET" = interface ]; then
> + db_input critical ddclient/interface || true
> + db_go
> +
> + db_get ddclient/interface
> + interface="$RET"
> + else
> + interface=""
> + fi
> +
> # set the default mode ddclient should run in (ip-up | daemon),
> # depending on the entered interface (XpppX or other)
> - db_get ddclient/interface
> - interface=$RET
> -
> # if it is actually a ppp or related interface
> - if [ -z "${interface##*ppp*}" ]; then
> + if [ -n "${interface##*ppp*}" ]; then
> db_fget ddclient/run_ipup seen
> if [ $RET = "false" ]; then
> db_set ddclient/run_ipup true
> diff -u -Nru ddclient-3.6.2/debian/postinst ddclient-3.6.2.new/debian/postinst
> --- ddclient-3.6.2/debian/postinst 2004-12-09 20:05:36.000000000 -0600
> +++ ddclient-3.6.2.new/debian/postinst 2004-12-09 20:02:33.000000000 -0600
> @@ -44,8 +44,17 @@
> db_get ddclient/names && names="$RET"
> db_get ddclient/username && username="$RET"
> db_get ddclient/password && password="$RET"
> + db_get ddclient/method && method="$RET"
> db_get ddclient/interface && interface="$RET"
>
> + case "$method" in
> + interface)
> + use="if, if=$interface"
> + ;;
> + web)
> + use="web, web=checkip.dyndns.org/, fw-skip='IP Address'"
> + ;;
> + esac
>
> # create configuration file /etc/ddclient.conf
> config=`mktemp /etc/ddclient.conf.XXXXXX`
> @@ -57,7 +66,7 @@
>
> pid=/var/run/ddclient.pid
> protocol=$protocol
> -use=if, if=$interface
> +use=$use
> server=$server
> login=$username
> password=$password
> diff -u -Nru ddclient-3.6.2/debian/templates ddclient-3.6.2.new/debian/templates
> --- ddclient-3.6.2/debian/templates 2004-12-09 20:05:36.000000000 -0600
> +++ ddclient-3.6.2.new/debian/templates 2004-12-09 19:56:09.000000000 -0600
> @@ -61,6...

Read more...

Revision history for this message
Ken Dibble (kdibble) wrote : installation failure with router installed

The installation gui for ddclient asks for an interface (eth0, etc), but fails to ask about firewalls, routers, etc. If the user foolishly believes that the ddclient installer and script are capable of correctly deducing the ip address of the router, etc., the ddclient will update dyndns with the lan address.

To be more verbose, since the installer never asks about anything other than an interface, the user could be led to believe that the installer will check the machines ip, find it to be a private ip (192.168. etc) and that the installer will deduce the ip by other means. This is, of course, not true, but the user has no way of knowing this until a bad update occurs at dyndns.

The installer should either ask about other devices (routers, etc), or not start the service as if all is well, when, in fact, the installer has no idea whether all is well or not.

It is my understanding that the purpose of the ddclient is to cause unnecessary updates at dyndns NOT TO OCCUR, rather than CAUSING THEM TO OCCUR.

SPECIFIC EXAMPLE:
my exposed IP (that of the router) is 67.x.x.x. This is verified
at dyndns.com and whatismyip.com.
my lan IP of the ubuntu machine running the ddclient is 192.168.1.107
The ddclient installer asks about an interface, clicking on help
tells me that the installer wants an interface(no help there..).
I tell it eth0, which is the machines interface to the router.
The installer completes, starts ddclient in daemon mode and
promptly updates my hostname to have an ip of 192.168.1.107, which is,
of course, wrong.

If for some reason this bug report is unclear, please email me.
<email address hidden>

Changed in ddclient:
assignee: nobody → motu
Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

Support from more ddclient option in configuration gui (debconf) has already been asked in Debian.
The request from use=web support would for example solve your problem. I'll link this bug to the corresponding debian bug.

Changed in ddclient:
status: Unconfirmed → Confirmed
Revision history for this message
Alexandre Otto Strube (surak) wrote :

Yann, which debian bug is this? How is that going on dapper? Thanks!

Changed in ddclient:
status: Unknown → Unconfirmed
Revision history for this message
Marcos (deflagmator) wrote :

I am working with ubuntu edgy and feisty with both I have to modify the ddclient.conf file to add web support.

Revision history for this message
Marco Rodrigues (gothicx) wrote :

Hi! Can you test with the latest version 3.7.3-2ubuntu1 from Gutsy, if the problem still persist ?

Changed in ddclient:
assignee: motu → gothicx
status: Confirmed → Incomplete
importance: Medium → Low
milestone: none → later
status: New → Invalid
Revision history for this message
In , Marco Rodrigues (gothicx-sapo) wrote : add patch tag

tags 285007 patch

Revision history for this message
Marcos (deflagmator) wrote : Re: installation failure with router installed

I have checked with hardy (latest versions) and still the same.

Rich Johnson (nixternal)
Changed in ddclient:
assignee: gothicx → nobody
Dan Bishop (danbishop)
Changed in ddclient:
status: Incomplete → Confirmed
Changed in ddclient:
importance: Undecided → Unknown
status: Invalid → Unknown
Changed in ddclient:
status: Unknown → New
Revision history for this message
Dominic Evans (oldmanuk) wrote :

This is still a problem in 3.7.3-6ubuntu1 in Jaunty, despite the linked bug in debian containing a patch since 'Dec 2004? :-)

pasted from bug 373666

Binary package hint: ddclient

= Abstract

The debconf configuration wizard for ddclient offers a choice of network interfaces to monitor for their bound ip, but doesn't offer the configuration of using 'web'.

= Use Case

'web' tells ddclient not to use an ip bound to a network interface (if) but instead to make a GET call to the web and extract the external facing (i.e., gateway) ip from that for publication. This is the likely use case for >50% of ddclient users who would want to use the dyndns type services.

= Howto

See http://www.dyndns.com/support/kb/using_ddclient_with_dyndns_services.html for /etc/ddclient.conf settings

ProblemType: Bug
Architecture: amd64
Dependencies:

DistroRelease: Ubuntu 9.04
Package: ddclient None [modified: /var/lib/dpkg/info/ddclient.list]
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: ddclient
Uname: Linux 2.6.28-11-generic x86_64
UnreportableReason: This is not a genuine Ubuntu package

summary: - installation failure with router installed
+ [patch] ddclient debconf doesn't offer 'web' as available configuration
Revision history for this message
Dominic Evans (oldmanuk) wrote :
Revision history for this message
In , Daniel Hahler (debian-bugs-thequod) wrote : Patch does not apply anymore

The patch does not apply anymore - which is not surprising given its age.

Any chance you have updated it locally already and resend it?

I was looking into applying it to Ubuntu.
(https://bugs.launchpad.net/bugs/3429).

Thanks.

Revision history for this message
In , Torsten Landschoff (t-landschoff) wrote : Re: Bug#285007: Patch does not apply anymore

Hi Daniel,

On Sat, May 23, 2009 at 02:11:41AM +0200, Daniel Hahler wrote:
> The patch does not apply anymore - which is not surprising given its age.
>
> Any chance you have updated it locally already and resend it?
>
> I was looking into applying it to Ubuntu.
> (https://bugs.launchpad.net/bugs/3429).

Should not be too hard to reimplement that patch based on the current
ddclient version.

In fact I think the original submitter is right and something like this
should be the default. OTOH, personally I would prefer to delegate
updating the IP to the router (which many routers currently support
as well).

Anyway, we should do better than the current state.

Greetings, Torsten

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ddclient - 3.8.0-3ubuntu1

---------------
ddclient (3.8.0-3ubuntu1) karmic; urgency=low

  * Merge from debian unstable, Ubuntu remaining changes:
    - Add debian/patches/sample_ubuntu.diff.
  * Fixed bugs:
    - LP: #3429
    - LP: #321456

ddclient (3.8.0-3) unstable; urgency=low

  * Add upstream changeset 110 as patch which fixes the abuse message
    (closes: #531594).
  * Use dh_installppp for installing our ip-up script (closes: #212862).
  * debian/control: Increase Standards-Version to 3.8.1 (checked against
    upgrading-checklist, no changes required).
  * Fix handling of backslashes in password (every other character should
    already be fine, at least in 8 bit charsets) by escaping all backslashes
    with another backslash in the configuration file (closes: #516282).
  * Apply Basque translation update (closes: #516548).
  * Apply Spanish translation update (closes: #517766).
  * Merge Galician translation update (closes: #517515).

ddclient (3.8.0-2) experimental; urgency=low

  * Apply patch from Dan McCombs to ease usage of DynDNS services
    (closes: #513626).
    + This also partially fixes #285007 as it uses a web interface
      to determine the own IP address (but only when configuring for
      DynDNS.com services). This must be fixed for others as well.

 -- Alessio Treglia <email address hidden> Thu, 18 Jun 2009 14:27:09 +0200

Changed in ddclient (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
In , Adam Cecile (Le_Vert) (gandalf-le-vert) wrote : #285007, ddclient: A patch adding use=web support to webconf

Hello,

What's the am of ddclient if it doesn't support IP retreiving from a
remote website ?
I had to downgrade the package on all my routers to the lenny's one.

Thanks.

Adam.

Revision history for this message
In , Torsten Landschoff (t-landschoff) wrote : Re: Bug#285007: #285007, ddclient: A patch adding use=web support to webconf

Hi Adam,

On Sun, Aug 16, 2009 at 03:44:26PM +0200, Adam Cécile (Le_Vert) wrote:
> What's the am of ddclient if it doesn't support IP retreiving from a

I don't understand your question. What is "am"?

> remote website ?

It should support "use=web", but it's not yet supported for the configuration
script.

> I had to downgrade the package on all my routers to the lenny's one.

What for?

Greetings, Torsten

Revision history for this message
Fibonacci (fibonacci-prower) wrote :

The fix doesn't work. The relevant line on ddclient.conf is written as follows when selecting web interface on debconf:
use=if, if=checkip.dyndns.com/
Of course, when running ddclient later one gets the following error messages:
WARNING: file /etc/ddclient.conf, line 6: Invalid Value for keyword 'if' = 'checkip.dyndns.com/'
WARNING: file /etc/ddclient.conf, line 6: Invalid Value for keyword 'if' = 'checkip.dyndns.com/'
WARNING: unable to determine IP address

That line should have been written with "web" instead of "if".

Revision history for this message
Fibonacci (fibonacci-prower) wrote :

Update: apparently that only happens when updating an old install of ddclient. When using a fresh install that's not an issue.

Changed in ddclient (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.