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

IPv6 entries: updating AAAA records #44

Closed
DesertCookie opened this issue Jan 8, 2020 · 6 comments
Closed

IPv6 entries: updating AAAA records #44

DesertCookie opened this issue Jan 8, 2020 · 6 comments
Assignees

Comments

@DesertCookie
Copy link

Is there a way to update AAAA records using dnsupdater?

By default, dnsupdater tries to set my IPv4 address, failing at it, because in CloudFlare I have no A record. This is due to my ISP only providing IPv6 (common in Germany). More precisely, my IPv4 address is that of my ISP, shared with thousands of other people through DS-Lite.

INFO[0000] Loading configuration from C:\caddy\dnsupdater\config.yaml
INFO[0000] Checking current IP address...
INFO[0006] Current IP address is: 185.221.135.135
INFO[0006] 1 CloudFlare DNS record(s) found.
INFO[0006] Processing my.domain.ext
INFO[0006] Fetching the IP address of domain my.domain.ext
ERROR[0006] 404 Not Found
INFO[0006] Updating the IP address of record ID my.domain.ext to 185.221.135.135
ERROR[0006] invalid character '<' looking for beginning of value
INFO[0006] 0 Aliyun DNS record(s) found.
@boris1993
Copy link
Owner

Sorry, there's no IPv6 support for now.
I'll try to support IPv6, but my ISP only providing IPv4 addresses, which makes me hard to test. So I can't make a solid promise to you.

@boris1993
Copy link
Owner

BTW, it seems you are trying to update a DNS record in Aliyun with errors? If you don't need to update any records in Aliyun DNS you can safely remove the whole AliDNSRecords part.

@DesertCookie
Copy link
Author

DesertCookie commented Jan 14, 2020

Feel free to contact me to test IPv6.

I already have removed the AliDNSRecords part. This is my reducted config file:

---
System:
  IPAddrAPI: "https://api.ipify.org/"
  CloudFlareAPIEndpoint: "https://api.cloudflare.com/client/v4"
CloudFlareRecords:
  - APIKey: "abcdefghijklmnop12345"
    ZoneID: "domain.ext"
    AuthEmail: "mail@provider.com"
    DomainName: "sub.domain.ext"

@boris1993 boris1993 self-assigned this Jan 15, 2020
boris1993 added a commit that referenced this issue Jan 23, 2020
Support updating IPv6 records for fixing issue #44

Known bugs:

Addresses with leading zeros(e.g. 2001:0db8:0000:0000:0000:ff00:0042:8329) and without leading zeros(e.g. 2001:db8:0:0:0:ff00:42:8329) will be treated as different addresses.
Addresses with consecutive sections of zeros(e.g. 2001:0db8:0000:0000:0000:ff00:0042:8329) and without consecutive sections of zeros(e.g. 2001:db8::ff00:42:8329) will be treated as different addresses.
boris1993 added a commit that referenced this issue Jan 23, 2020
Support updating IPv6 records on CloudFlare

Support updating IPv6 records for fixing issue #44

Known bugs:

Addresses with leading zeros(e.g. 2001:0db8:0000:0000:0000:ff00:0042:8329) and without leading zeros(e.g. 2001:db8:0:0:0:ff00:42:8329) will be treated as different addresses.
Addresses with consecutive sections of zeros(e.g. 2001:0db8:0000:0000:0000:ff00:0042:8329) and without consecutive sections of zeros(e.g. 2001:db8::ff00:42:8329) will be treated as different addresses.
@boris1993
Copy link
Owner

I've added support for updating IPv6 on the latest release, you can have a try.

And beware that there is a new property called DomainType in the config.yaml, so you need to update your config.yaml before trying this version.

@DesertCookie
Copy link
Author

DesertCookie commented Jan 23, 2020

Thank you for making an update this quickly! Here's what I found after testing:

  1. Using your tool through PIA VPN returned an IPv4 address for the requested IPv6 address: msg="Current IPv6 address is: 186.221.71.136" (fair enough - exclude your tool from PIA).
  2. The IPv6 address used by your tool is different from the one ipconfig returns me. Accessing my server via the IP directly like this [2001:16bb:576b:6512:1916:82df:6861:9900]:32400 works, but not via the domain.
  3. While your tool successfully updates the IP, it disables proxying, exposing my host IP!

Points two and three should be easy enough fixes. In Java I got the IPv6 directly from the ethernet adapter, instead of a website - maybe you can do the same? Enabling proxying should be as easy as setting the corresponding flag in the HTTP request if I'm not mistaken...?

@boris1993
Copy link
Owner

Sorry for the late response.

In short, I'm not going to do further developing on IPv6 support, instead, I'll remove it in the next version.

Here's the detailed explanation.

  1. The reason why I decided to remove IPv6 support is that I have no public IPv6 address, which makes it hard to do any testing. Continue developing on this will cost too much effort to both you and me.

  2. The only way for me to get my public IP address is to request it from an API, rather than from my ethernet card. So I'm not going to support fetching addresses from ethernet card.

My suggestion is, you can fork this repo and do your customization on top of it, or you can make your own application.

I'm going to close this issue. If you have any further questions, feel free to re-open it.


Also I think there is something I should let you know.

After I did some research, I found out that usually there are 3 IPv6 addresses on one computer: the link-local address, the temporary address, and the permanent address.

The link-local address is just like 127.0.0.1 in IPv4, nothing much to talk about.

The permanent address, which usually shown as IPv6 address in ipconfig, is the one you should never expose to anyone else. Because this address will not change, and others can trace to you with this address.

The temporary address is the one you can expose to others. It is generated with some sort of rules, and it will change after some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants