Comments (17)
Good to see it working.
I'll catch the error at runtime and output / explain the fix in the container logs.
from docker-cloudflare-ddns.
Message shown if container is unable to get public ip in IPv6 mode:
----------------------------------------------------------------
ERROR: Failed To Get Public IPv6 Address
----------------------------------------------------------------
You must be running Docker with IPv6 support enabled or this
container with host networking enabled.
Add '--net=host' to your docker run command or if using
docker-compose add 'network_mode: host' to this service.
----------------------------------------------------------------
IPv4 Mode:
----------------------------------------------------------------
ERROR: Failed To Get Public IPv4 Address
----------------------------------------------------------------
from docker-cloudflare-ddns.
Hi,
Presently this only project only does IPv4.
Happy to accept a PR to add support for AAAA / IPv6 records. My network isn't setup for IPv6 at the moment so it's difficult test.
from docker-cloudflare-ddns.
I could test it for you. With DS-Lite you only get a shared IPv4 thats why it is a problem to use/set the IPv4 in cloudflare.
from docker-cloudflare-ddns.
Your script looks fairly easy, I see the fastest way for me is to replace the IPv4 lookup with IPv6 lookup and post the new IP to record AAA
instead of A
.
More work is needed to create a config to define if I like to update IPv4 or IPv6 or both.
from docker-cloudflare-ddns.
I don't think ipinfo.io supports IPv6 self-lookups, the dns record has no AAAA records as far as I can tell. So we will need an alternative http lookup method provider for that.
Can you see if this command works?
dig +short @resolver1.opendns.com myip.opendns.com AAAA
from docker-cloudflare-ddns.
Never mind, tested that command on a vps. It does not work.
from docker-cloudflare-ddns.
-e RRTYPE=A
- Set to AAAA
to use set IPv6 records instead of IPv4 records. Defaults to A
for IPv4 records.
See https://github.com/oznu/docker-cloudflare-ddns#ipv6
The message there is very important:
You need to run docker with IPv6 support, or run the container with host networking enabled.
Running the container with host networking (on a host that can resolve IPv6 directly) is probably easier than enabling docker IPv6 support. To do this just add --net=host
to your docker run command, or network_mode: host
to your docker-compose.yml.
from docker-cloudflare-ddns.
wow, that was fast - very cool! For me this is all I need but I guess there are user with an IPv4 and an IPv6 that they want to refresh at the same time. I still close this issue since my use case works 👍
from docker-cloudflare-ddns.
I thought of adding both IPv4 and IPv6 support simultaneously, but that would require a bit more work to keep track of the AAAA and A record IDs at the same time.
A project for later :)
from docker-cloudflare-ddns.
The IPv6 is not fixed since your query provider does not support IPv6. You need to use a provide that returns you an IPv6 like:
curl --ipv6 https://myonlineportal.net/checkip
// curl --ipv4 https://myonlineportal.net/checkip
curl --ipv6 --url 'https://ipv6.nsupdate.info/myip'
from docker-cloudflare-ddns.
Both providers I added for IPv6 support IPv6:
# primary
curl -sf6 https://ifconfig.co
# backup
curl -sf6 https//diagnostic.opendns.com/myip
from docker-cloudflare-ddns.
I get the following error:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 30-cloudflare-setup: executing...
DNS Zone: jwillmer.de (xxxx)
DNS Record: test.jwillmer.de (xxxx)
[cont-init.d] 30-cloudflare-setup: exited 0.
[cont-init.d] 50-ddns: executing...
Updating CloudFlare DNS record test.jwillmer.de from 1234:de:1234:4567:baae:8910:1112:cc3 to ...
ERROR: Failed to update CloudFlare DNS record test.jwillmer.de from 1234:de:1234:4567:baae:8910:1112:cc3 to
[cont-init.d] 50-ddns: exited 0.
docker-compose.yml
cloudflare-ddns:
image: oznu/cloudflare-ddns
container_name: cloudflare-ddns
restart: always
environment:
- EMAIL=xxxx
- API_KEY=xxxx
- ZONE=jwillmer.de
- SUBDOMAIN=test
- RRTYPE=AAAA
from docker-cloudflare-ddns.
Did you enable IPv6 on the docker daemon? Otherwise add network_mode: host
to your docker-compose.yml:
from docker-cloudflare-ddns.
Works as intended 👍
Maybe you can add that info to Readme or create a demo docker-compose file?
from docker-cloudflare-ddns.
I noticed you did but it didn't stand out
- sorry, my bad!
from docker-cloudflare-ddns.
Small note:
You must be running Docker with IPv6 support enabled or enable host networking on this container.
from docker-cloudflare-ddns.
Related Issues (20)
- ERROR: Failed to update CloudFlare DNS <domain> from X.X.X.X to ;; connection timed out; no servers could be reached HOT 2
- ssh not working HOT 3
- ERROR: Failed To Get Public IPv4 Address HOT 1
- Update multiple domains HOT 8
- cannot update wildcard * A record HOT 9
- Can update zone or subdomains, but not both HOT 7
- Cloudflare proxy had been disabled. HOT 3
- Updating AAAA record: "connection timed out; no servers could be reached" HOT 1
- Add multiple subdomains without using CNAME?
- API key not working HOT 6
- Support for updating both IPV4 and IPV6 at the same time
- Suggestion - Implement a healthcheck ping HOT 1
- getZoneId is always using the ZONE environment variable, even when ZONE_FILE is set. HOT 4
- Improper DIG Error Handling For IPv4
- log file - no time stamp
- Update multiple sub-domains HOT 3
- IPv6 address detection fallback not working correctly HOT 2
- Large amount of vulnerabilities HOT 2
- Unable to update A record Cookie mismatch
- ERROR: Failed to update CloudFlare DNS record HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-cloudflare-ddns.