Skip to content

Feature request: ipv4 AND ipv6 update #507

Open
@felixwrt

Description

@felixwrt
  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:[email protected]/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:[email protected]/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? [email protected]
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"
        }
      ]
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions