Code Monkey home page Code Monkey logo

Comments (6)

eayin2 avatar eayin2 commented on May 29, 2024

In the code I found an undocumented daemon implementation. Daemon runs by appending -d to dyndnsc. I think

def check(self):
then only runs the updater if an IP has changed.

from python-dyndnsc.

infothrill avatar infothrill commented on May 29, 2024

Can you provide logs of the said behaviour? thx

from python-dyndnsc.

eayin2 avatar eayin2 commented on May 29, 2024
DEBUG ArgumentParser(prog='dyndnsc', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
DEBUG Attempting to read configuration from ['/home/user/.local/pipx/venvs/dyndnsc/lib/python3.8/site-packages/dyndnsc/resources/presets.ini', '/home/user/.config/dyndnsc.ini']
DEBUG Successfully read configuration from ['/home/user/.local/pipx/venvs/dyndnsc/lib/python3.8/site-packages/dyndnsc/resources/presets.ini', '/home/user/.config/dyndnsc.ini']
DEBUG config file sections: ['preset:no-ip.com', 'preset:freedns.afraid.com', 'preset:nsupdate.info:ipv4', 'preset:nsupdate.info:ipv6', 'preset:dns.he.net', 'preset:dnsimple.com', 'preset:dnsdynamic.org', 'preset:hopper.pw:ipv4', 'preset:hopper.pw:ipv6', 'preset:dyn.com', 'preset:duckdns.org', 'dyndnsc', 'myconf_ipv4', 'myconf_ipv6']
DEBUG raw config for 'myconf_ipv4': {'updater': 'dyndns2', 'updater-url': 'https://ipv4.nsupdate.info/nic/update', 'detector': 'webcheck4', 'detector-family': 'INET', 'detector-url': 'https://ipv4.nsupdate.info/myip', 'detector-parser': 'plain', 'use_preset': 'nsupdate.info:ipv4', 'updater-hostname': 'userpc01.dnsupdate.info', 'updater-userid': 'userpc01.dnsupdate.info', 'updater-password': 'my-pass'}
DEBUG raw config for 'myconf_ipv6': {'updater': 'dyndns2', 'updater-url': 'https://ipv6.nsupdate.info/nic/update', 'detector': 'webcheck6', 'detector-family': 'INET6', 'use_preset': 'nsupdate.info:ipv6', 'updater-hostname': 'userpc01.dnsupdate.info', 'updater-userid': 'userpc01.dnsupdate.info', 'updater-password': 'my-pass'}
DEBUG Available plugins: []
DEBUG Enabled plugins: []
DEBUG collected_configs: {'myconf_ipv4': {'detector': [('webcheck4', {'family': 'INET', 'url': 'https://ipv4.nsupdate.info/myip', 'parser': 'plain'})], 'updater': [('dyndns2', {'url': 'https://ipv4.nsupdate.info/nic/update', 'hostname': 'userpc01.dnsupdate.info', 'userid': 'userpc01.dnsupdate.info', 'password': 'my-pass'})]}, 'myconf_ipv6': {'detector': [('webcheck6', {'family': 'INET6'})], 'updater': [('dyndns2', {'url': 'https://ipv6.nsupdate.info/nic/update', 'hostname': 'userpc01.dnsupdate.info', 'userid': 'userpc01.dnsupdate.info', 'password': 'my-pass'})]}}
DEBUG Initializing client for 'myconf_ipv4'
DEBUG IP detector uses address family <AddressFamily.AF_INET: 2>
DEBUG DynDnsClient initializer done
DEBUG Querying IP address from 'https://ipv4.nsupdate.info/myip'
DEBUG Starting new HTTPS connection (1): ipv4.nsupdate.info:443
DEBUG https://ipv4.nsupdate.info:443 "GET /myip HTTP/1.1" 200 14
DEBUG IPDetectorWebCheck.set_current_value(my-ipv4)
INFO userpc01.dnsupdate.info: dns IP 'None' does not match detected IP 'my-ipv4', updating
DEBUG Updating 'userpc01.dnsupdate.info' to 'my-ipv4' at service 'https://ipv4.nsupdate.info/nic/update'
DEBUG Starting new HTTPS connection (1): ipv4.nsupdate.info:443
DEBUG https://ipv4.nsupdate.info:443 "GET /nic/update?myip=my-ipv4&hostname=userpc01.dnsupdate.info HTTP/1.1" 200 5
DEBUG status 200, abuse
DEBUG Initializing client for 'myconf_ipv6'
DEBUG IP detector uses address family <AddressFamily.AF_INET6: 10>
DEBUG DynDnsClient initializer done
DEBUG Querying IP address from 'https://ipv6.nsupdate.info/myip'
DEBUG Starting new HTTPS connection (1): ipv6.nsupdate.info:443
DEBUG https://ipv6.nsupdate.info:443 "GET /myip HTTP/1.1" 200 36
DEBUG IPDetectorWebCheck6.set_current_value(my-ipv6)
INFO userpc01.dnsupdate.info: dns IP 'None' does not match detected IP 'my-ipv6', updating
DEBUG Updating 'userpc01.dnsupdate.info' to 'my-ipv6' at service 'https://ipv6.nsupdate.info/nic/update'
DEBUG Starting new HTTPS connection (1): ipv6.nsupdate.info:443
DEBUG https://ipv6.nsupdate.info:443 "GET /nic/update?myip=my-ipv6-string-encoded&hostname=userpc01.dnsupdate.info HTTP/1.1" 200 5
DEBUG status 200, abuse

from python-dyndnsc.

infothrill avatar infothrill commented on May 29, 2024

According to the log (I assume it was redacted for privacy), the public dns resolution does not return an IP address:

INFO userpc01.dnsupdate.info: dns IP 'None' does not match detected IP 'my-ipv6', updating

dns IP 'None' causes dyndnsc to perform an update, since it could not resolve the hostname, thus assuming it needs to be set.

Can you verify if this is correct by performing a manual DNS lookup on your hostname? ie dig +short $hostname

from python-dyndnsc.

eayin2 avatar eayin2 commented on May 29, 2024

Correct, but I can't update because the FQDN is flagged. I unflagged it and could update it now. I wonder what caused it being flagged. I run dyndnsc in systemd every minute, maybe nsupdate.info was bothered about the lookup? Or maybe something else caused my client to send an update request multiple times, as I run dyndnsc for quiet some while and had no issues. So best to let it run as daemon now and see if they flag it again before we troubleshoot too much

from python-dyndnsc.

infothrill avatar infothrill commented on May 29, 2024

ok. Closing for now. Please feel free to re-open if there's more clarity about what happened. thx!

from python-dyndnsc.

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.