Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: ipv4 AND ipv6 update #507

Open
felixwrt opened this issue Jul 19, 2023 · 4 comments
Open

Feature request: ipv4 AND ipv6 update #507

felixwrt opened this issue Jul 19, 2023 · 4 comments
Labels
Category: Documentation ✒️ A problem with the readme or in the docs/ directory Category: Maintenance ⛓️ Anything related to code or other maintenance Category: Provider update ♻️ Complexity: ☣️ Hard to do Priority: 🚨 Urgent Status: 🔒 After next release Will be done after the next release

Comments

@felixwrt
Copy link
Contributor

  1. What's the feature?

I want to update both the ipv4 (A) and the ipv6 (AAAA) address. I'm using cloudflare and strato as providers. I'm currently using the following configuration where I'm duplicating the entries for each provider to set ipv4 and ipv6 respectively:

{
    "settings": [
        {
            "provider": "strato",
            "domain": "mydomain.com",
            "host": "@",
            "password": "pw",
            "ip_version": "ipv4",
            "provider_ip": false
        },
        {
            "provider": "strato",
            "domain": "mydomain.com",
            "host": "@",
            "password": "pw",
            "ip_version": "ipv6",
            "provider_ip": false
        },
        {
            "provider": "cloudflare",
            "zone_identifier": "zone_id",
            "domain": "anotherdomain.com",
            "host": "@,*",
            "ttl": 1,
            "token": "token",
            "ip_version": "ipv4"
        },
        {
            "provider": "cloudflare",
            "zone_identifier": "zone_id",
            "domain": "anotherdomain.com",
            "host": "@,*",
            "ttl": 1,
            "token": "token",
            "ip_version": "ipv6"
        }
    ]
}

This approach has a couple of disadvantages:

  • Duplicated info in the config
  • Unnecessary update requests: For strato, the update is performed using the following request: https://mydomain.com:pw@dyndns.strato.com/nic/update?hostname=mydomain.com&myip=<ip_addr>. Using ipv4 and ipv6 as separate entries in the config causes two update requests to be sent. I've been banned for abuse while setting everything up and while I'm not 100% sure, I could imagine that performing two requests per update contributed to that.
  • The web UI seems to get confused and shows incorrect IPs:
    image
    It seems like the "Set IP" column shows the latest updated IP for each domain and doesn't filter for the IP type. Same goes for the "Previous IPs" column.

Feature request:

  • Allow "ip_version": "ipv4 and ipv6" that updates both the A and AAAA records with the corresponding IPs
  • For strato, both IPs should be updated using a single request like so: https://mydomain.com:pw@dyndns.strato.com/nic/update?hostname=mydomain.com&myip=<ipv4_addr>,<ipv6_addr>
  • The web UI should show both IPs in two lines within the same table row. Alternatively, keep using separate rows but filter the displayed IPs by type (such that ipv4 addresses don't show up in an ipv6 row).

I hope that this request makes sense. Thanks in advance and let me know if you have questions.

  1. Extra information?
Logs
ddns-updater  | ========================================
ddns-updater  | ========================================
ddns-updater  | ============= ddns-updater =============
ddns-updater  | ========================================
ddns-updater  | =========== Made with ❤️ by ============
ddns-updater  | ======= https://github.com/qdm12 =======
ddns-updater  | ========================================
ddns-updater  | ========================================
ddns-updater  |
ddns-updater  | Running version latest built on 2023-06-30T07:13:52.346Z (commit 7b3b660)
ddns-updater  |
ddns-updater  | 🔧 Need help? https://github.com/qdm12/ddns-updater/discussions/new
ddns-updater  | 🐛 Bug? https://github.com/qdm12/ddns-updater/issues/new
ddns-updater  | ✨ New feature? https://github.com/qdm12/ddns-updater/issues/new
ddns-updater  | ☕ Discussion? https://github.com/qdm12/ddns-updater/discussions/new
ddns-updater  | 💻 Email? quentin.mcgaw@gmail.com
ddns-updater  | 💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
ddns-updater  | 2023-07-19T08:27:41Z INFO Settings summary:
ddns-updater  | ├── HTTP client
ddns-updater  | |   └── Timeout: 10s
ddns-updater  | ├── Update
ddns-updater  | |   ├── Period: 5m0s
ddns-updater  | |   └── Cooldown: 5m0s
ddns-updater  | ├── Public IP fetching
ddns-updater  | |   ├── HTTP enabled: yes
ddns-updater  | |   ├── HTTP IP providers
ddns-updater  | |   |   └── all
ddns-updater  | |   ├── HTTP IPv4 providers
ddns-updater  | |   |   └── all
ddns-updater  | |   ├── HTTP IPv6 providers
ddns-updater  | |   |   └── all
ddns-updater  | |   ├── DNS enabled: yes
ddns-updater  | |   ├── DNS timeout: 3s
ddns-updater  | |   └── DNS over TLS providers
ddns-updater  | |       └── all
ddns-updater  | ├── Resolver: use Go default resolver
ddns-updater  | ├── IPv6
ddns-updater  | |   └── Mask bits: 128
ddns-updater  | ├── Server
ddns-updater  | |   ├── Port: 8000
ddns-updater  | |   └── Root URL: /
ddns-updater  | ├── Health
ddns-updater  | |   └── Server listening address: 127.0.0.1:9999
ddns-updater  | ├── Paths
ddns-updater  | |   └── Data directory: /updater/data
ddns-updater  | ├── Backup: disabled
ddns-updater  | └── Logger
ddns-updater  |     ├── Caller: no
ddns-updater  |     └── Level: INFO
ddns-updater  | 2023-07-19T08:27:41Z INFO reading JSON config from file /updater/data/config.json
ddns-updater  | 2023-07-19T08:27:41Z INFO Found 6 settings to update records
ddns-updater  | 2023-07-19T08:27:41Z INFO Reading history from database: domain mydomain.com host @
ddns-updater  | 2023-07-19T08:27:41Z INFO Reading history from database: domain mydomain.com host @
ddns-updater  | 2023-07-19T08:27:41Z INFO Reading history from database: domain anotherdomain.com host @
ddns-updater  | 2023-07-19T08:27:41Z INFO Reading history from database: domain anotherdomain.com host *
ddns-updater  | 2023-07-19T08:27:41Z INFO Reading history from database: domain anotherdomain.com host @
ddns-updater  | 2023-07-19T08:27:41Z INFO Reading history from database: domain anotherdomain.com host *
ddns-updater  | 2023-07-19T08:27:41Z INFO [backup] disabled
ddns-updater  | 2023-07-19T08:27:41Z INFO [healthcheck server] listening on 127.0.0.1:9999
ddns-updater  | 2023-07-19T08:27:41Z INFO [http server] listening on :8000
ddns-updater  | 2023-07-19T08:27:42Z INFO IPv6 address of mydomain.com is invalid IP and your IPv6 address is 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:27:42Z INFO Updating record [domain: mydomain.com | host: @ | provider: Strato] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:27:42Z ERROR banned due to abuse: for domain mydomain.com, no more update will be attempted for 1h
ddns-updater  | 2023-07-19T08:32:41Z INFO IPv6 address of anotherdomain.com is invalid IP and your IPv6 address is 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:32:41Z INFO IPv6 address of any.anotherdomain.com is invalid IP and your IPv6 address is 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:32:41Z INFO Updating record [domain: anotherdomain.com | host: @ | provider: cloudflare | ip: ipv6] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:32:42Z INFO Updating record [domain: anotherdomain.com | host: * | provider: cloudflare | ip: ipv6] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:37:42Z INFO IPv6 address of anotherdomain.com is invalid IP and your IPv6 address is 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:37:42Z INFO Updating record [domain: anotherdomain.com | host: @ | provider: cloudflare | ip: ipv6] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:42:41Z INFO IPv6 address of any.anotherdomain.com is invalid IP and your IPv6 address is 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:42:41Z INFO Updating record [domain: anotherdomain.com | host: * | provider: cloudflare | ip: ipv6] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:47:42Z INFO IPv6 address of anotherdomain.com is invalid IP and your IPv6 address is 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:47:42Z INFO IPv6 address of any.anotherdomain.com is invalid IP and your IPv6 address is 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:47:42Z INFO Updating record [domain: anotherdomain.com | host: @ | provider: cloudflare | ip: ipv6] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
ddns-updater  | 2023-07-19T08:47:43Z INFO Updating record [domain: anotherdomain.com | host: * | provider: cloudflare | ip: ipv6] to use 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091
updates.json
{
  "records": [
    {
      "domain": "mydomain.com",
      "host": "@",
      "ips": [
        {
          "ip": "87.XXX.XXX.14",
          "time": "2023-07-19T07:46:59.239723541Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T07:47:03.96693024Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:12:01.28513465Z"
        }
      ]
    },
    {
      "domain": "anotherdomain.com",
      "host": "@",
      "ips": [
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T07:46:59.346158629Z"
        },
        {
          "ip": "87.XXX.XXX.14",
          "time": "2023-07-19T07:47:04.065104403Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T07:54:57.175564129Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T07:59:57.361639817Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:09:57.341648736Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:17:01.122359171Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:25:28.975790503Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:32:41.909602086Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:37:42.145871021Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:47:42.17759498Z"
        }
      ]
    },
    {
      "domain": "anotherdomain.com",
      "host": "*",
      "ips": [
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T07:47:01.71713604Z"
        },
        {
          "ip": "87.XXX.XXX.14",
          "time": "2023-07-19T07:47:04.790859541Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T07:54:58.071158708Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:04:57.082118778Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:09:58.168602724Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:17:02.084668332Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:25:28.05301924Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:32:42.775340219Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:42:41.969407454Z"
        },
        {
          "ip": "2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:c091",
          "time": "2023-07-19T08:47:43.004288387Z"
        }
      ]
    }
  ]
}
@felixwrt
Copy link
Contributor Author

felixwrt commented Aug 4, 2023

I just opened #514 which fixes the UI. I also investigated adding an option to update both ipv4 and ipv6 addresses, but this would be a bigger change within the codebase. I'm leaving this issue open because an option to have a single config item that takes care of updating ipv4 and ipv6 addresses would still be nice.

@tcurdt
Copy link

tcurdt commented Sep 4, 2023

Is there anything that could be done to help with this?
Or is using two setting entries for (ipv4 and ipv6) the way to go?

@qdm12
Copy link
Owner

qdm12 commented Jan 19, 2024

desec.io does not allow to update ipv4 then ipv6 (or vice versa) and need to update both at the same time (ugly implementation but oh well), so this issue is getting more important. I'll add a "ip_version": "ipv4andipv6" option to get this done, and internally convert two config objects for the same domain + host but different ip_version, to that new ipv4andipv6 style internally.

EDIT: will do this after long overdued 2.6 release to avoid breaking too many things.

@bugQ
Copy link

bugQ commented Apr 22, 2024

that duplicate issue was onto something tho, it would be nice for the option to be called "ipv4 and ipv6" rather than "ipv4andipv6" to remain congruent with the naming of the existing option called "ipv4 or ipv6"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Documentation ✒️ A problem with the readme or in the docs/ directory Category: Maintenance ⛓️ Anything related to code or other maintenance Category: Provider update ♻️ Complexity: ☣️ Hard to do Priority: 🚨 Urgent Status: 🔒 After next release Will be done after the next release
Projects
None yet
Development

No branches or pull requests

4 participants