Code Monkey home page Code Monkey logo

Comments (14)

libertyx82 avatar libertyx82 commented on May 18, 2024 10

To the reason that your ubuntu server is probably located behind an router, you should use the option use=web, web=checkip.dyndns.org to determine your external IPv4 Address

as example my cloudflare setup

##
## CloudFlare (www.cloudflare.com)
##

# /etc/ddclient.conf
cache=/var/cache/ddclient/ddclient.cache
pid=/var/run/ddclient.pid
daemon=300
syslog=yes
ssl=yes
protocol=cloudflare
ttl=1
use=web
web=checkip.dyndns.org
usev6=if, if=eth0
[email protected]
password=API KEY
zone=your.domain.de
your.host..de

from ddclient.

misterjtc avatar misterjtc commented on May 18, 2024 2

To the reason that your ubuntu server is probably located behind an router, you should use the option use=web, web=checkip.dyndns.org to determine your external IPv4 Address

as example my cloudflare setup

##
## CloudFlare (www.cloudflare.com)
##

# /etc/ddclient.conf
cache=/var/cache/ddclient/ddclient.cache
pid=/var/run/ddclient.pid
daemon=300
syslog=yes
ssl=yes
protocol=cloudflare
ttl=1
use=web
web=checkip.dyndns.org
usev6=if, if=eth0
[email protected]
password=API KEY
zone=your.domain.de
your.host..de

This worked for me!

Thank you!

from ddclient.

AlexBander avatar AlexBander commented on May 18, 2024 1

Hi there,
sorry but i can't confirm.
ddclient version 3.8.3
on run with option use=cmd or usev6=cmd
and cmd-skip option get the following result:

# ddclient -debug -verbose

DEBUG:    get_ip: using cmd, wget -q -O - "http://checkipv6.dyndns.com" | lynx --dump -stdin reports <undefined>
WARNING:  unable to determine IP address

Result run clear on console for the IPv6:
' Current IP Address: xxxx:xx:xxxx:xxxx:xxxx:xxxx:xxx:xxxx' , works

with the same skip option cmd-skip='Current IP Address: '
and IPv4 only use=cmd
of course usev6=cmd => get's an error

DEBUG:    get_ip: using cmd, wget -q -O - "http://checkip.dyndns.com" | lynx --dump -stdin reports xxx.xxx.xxx.xxx
SUCCESS:  ...

and works very well.

Result run clear on console for the IPv4:
' Current IP Address: xxx.xxx.xxx.xxx' - works, too

  • the wget ipv4/ipv6 results are comparable.
  • the clear wget results are the same but on ddclient didn`t ipv6 work
  • use and usev6 didn't change anything on ipv6 request
  • ipv6 tested with many variations off cmd's and web providers|urls but didn't work

from ddclient.

minuzed avatar minuzed commented on May 18, 2024

I'm not very experienced with this but my guesses would be the following:

WARNING: found neither ipv4 nor ipv6 address
DEBUG: get_ip: using ip, ip reports
WARNING: unable to determine IP address

Check which method ddclient is using to determine the ip-address of your WAN interface. This is determined by the use= statement, which seems to be missing in your config. Personally I use this option to get the ip of my WAN interface:
use=if, if=enp1s0
Change enp1s0 to match your interface. I prefer this since it doesn't rely on any external tools to return the ip-address but instead takes it from the interface itself.

Also, I see a lot of your lines are ending with a comma, which I would remove since I don't think they should be there.

from ddclient.

SpencerDub avatar SpencerDub commented on May 18, 2024

@minuzed, thanks for the suggestions. I excised the commas and added use=if, if=enp3s0 based on the results of ifconfig.

However, I still get the same results:

WARNING: found neither ipv4 nor ipv6 address
DEBUG: get_ip: using ip, ip reports <undefined>
WARNING: unable to determine IP address

Where should I go from here?

from ddclient.

SpencerDub avatar SpencerDub commented on May 18, 2024

@libertyx82, thanks for the suggestion. That is correct; my server is set up behind a home router.

I added use=web, web=checkip.dyndns.org to the config file:

##
## CloudFlare (www.cloudflare.com)
##
ssl=yes
protocol=cloudflare
server=www.cloudflare.com
zone=<mydomain.us>
use=web
web=checkip.dyndns.org
login=<[email protected]>
password=API KEY
<mydomain.us>

This caused some changes in the error messages:

DEBUG: proxy =
DEBUG: url = checkip.dyndns.org
DEBUG: server = checkip.dyndns.org
CONNECT: checkip.dyndns.org
WARNING: cannot connect to checkip.dyndns.org:80 socket: IO::Socket::INET: Bad hostname 'checkip.dyndns.org'
WARNING: found neither ipv4 nor ipv6 address
DEBUG: get_ip: using web, checkip.dyndns.org reports
WARNING: unable to determine IP address

I'm starting to suspect my firewall has something to do with it. UFW logs show an abundance of items like this (extra items removed):

Nov 12 19:39:44 [...] [UFW BLOCK] IN=enp3s0 OUT= [...] SRC=192.168.0.1 DST=224.0.0.1

My UFW settings look like this:

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip
 
To                         Action      From
--                         ------      ----
137,138/udp (Samba)        ALLOW IN    192.168.0.0/16             # allow Samba
139,445/tcp (Samba)        ALLOW IN    192.168.0.0/16             # allow Samba
<SSH port>/tcp             LIMIT IN    Anywhere                   # allow SSH connections
80/tcp                     ALLOW IN    Anywhere                   # allow HTTP
443/tcp                    ALLOW IN    Anywhere                   # allow HTTPS
<SSH port>/tcp (v6)        LIMIT IN    Anywhere (v6)              # allow SSH connections
80/tcp (v6)                ALLOW IN    Anywhere (v6)              # allow HTTP
443/tcp (v6)               ALLOW IN    Anywhere (v6)              # allow HTTPS

Is there something I should add to UFW in order to allow ddclient to function?

from ddclient.

DaveSophoServices avatar DaveSophoServices commented on May 18, 2024

from ddclient.

SpencerDub avatar SpencerDub commented on May 18, 2024

@DaveSophoServices, when I access http://checkip.dyndns.org/ from my desktop computer (not my server), it does indeed show my IP.

But ping http://checkip.dyndns.org/ from my server yields:

ping: http://checkip.dyndns.org/: Temporary failure in name resolution

I get the same result from ping checkip.dyndns.org.

from ddclient.

libertyx82 avatar libertyx82 commented on May 18, 2024

What does systemd-resolve --status are showing?

It should look like this

Link 2 (enp0s31f6)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 192.168.x.1
                      fd00::464e:ffff:eeee:xxx4
          DNS Domain: fritz.box

from ddclient.

farhank3389 avatar farhank3389 commented on May 18, 2024

Looks like a DNS issue. Are you able to resolve any other names?

from ddclient.

SpencerDub avatar SpencerDub commented on May 18, 2024

What does systemd-resolve --status are showing?

It should look like this

Link 2 (enp0s31f6)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 192.168.x.1
                      fd00::464e:ffff:eeee:xxx4
          DNS Domain: fritz.box

I get this:

Global
          DNSSEC NTA: 10.in-addr.arpa
                      16.172.in-addr.arpa
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa
                      18.172.in-addr.arpa
                      19.172.in-addr.arpa
                      20.172.in-addr.arpa
                      21.172.in-addr.arpa
                      22.172.in-addr.arpa
                      23.172.in-addr.arpa
                      24.172.in-addr.arpa
                      25.172.in-addr.arpa
                      26.172.in-addr.arpa
                      27.172.in-addr.arpa
                      28.172.in-addr.arpa
                      29.172.in-addr.arpa
                      30.172.in-addr.arpa
                      31.172.in-addr.arpa
                      corp
                      d.f.ip6.arpa
                      home
                      internal

Which doesn't look at all similar.

Are you able to resolve any other names?

Pinging google.com and mit.edu both give me the same issue: "Temporary failure in name resolution".

from ddclient.

SpencerDub avatar SpencerDub commented on May 18, 2024

I looked around and found this resource on opening port 53 via UFW. I added the following UFW rules:

sudo ufw allow 53/tcp comment 'Open port DNS tcp port 53'
sudo ufw allow 53/udp comment 'Open port DNS udp port 53'

After a reboot, this seems to have resolved ddclient's issue with determining the IP address. When I run ddclient -daemon=0 -debug -verbose -noquiet, I'm not getting any errors related to determining IP address. And systemd-resolve --status now includes this entry:

Link 2 (enp3s0)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 192.168.0.1
          DNS Domain: lan

from ddclient.

DaveSophoServices avatar DaveSophoServices commented on May 18, 2024

from ddclient.

Jayky avatar Jayky commented on May 18, 2024

Result run clear on console for the IPv4: ' Current IP Address: xxx.xxx.xxx.xxx' - works, too

* the `wget` ipv4/ipv6 results are comparable.

* the clear `wget` results are the same but on ddclient didn`t ipv6 work

* `use` and `usev6` didn't change anything on ipv6 request

* ipv6 tested with many variations off cmd's and web providers|urls but didn't work

I've got the same problem here. Have you found a solution or a workaround meanwhile?

from ddclient.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.