Read this in other languages: English, 简体中文.
It's a pretty common requirement for the folks who want to host some service at their home and expose it to the public network, for example I have a NAS at home and would like to access the admin UI remotely. I use PPPoE to connect to the public Internet, and my ISP usually won't give me a static IPv4 address, they will constantly renew it like weekly or whenever they wish to.
Most of modern routers now have build-in support for DDNS, and we have lots of well-known service providers, some of them even have free-tier product but requires a constant renew every month.
If you've already got your own domain name(like me) and prefer to reuse it, things could be a little bit different. Obviously you can continue to use DDNS products, and create a CNAME record point to the hostname supplied by DDNS service provider, but when people do a nslookup, that hostname will be exposed in the result.
To avoid that, I'm more preferred use my own way to update A record automatically when IP changes been detected. Here comes my Google Cloud DNS based solution.
ddns-client.docker run -d --restart=unless-stopped \
--name=google-ddns \
-e ZONE=<your zone name> \
-e DOMAIN_NAME=<your domain name> \
-e PROXY_TYPE=<type of proxy, http or socks5 for instance> \
-e PROXY_ADDR=<IP address or hostname of proxy> \
-e PROXY_PORT=<Port of proxy> \
-v <path to json file>:/credential \
sgrio/google-ddns
Please be sure you've replaced <your zone name>, <your domain name> and <path to json file> in above command to actual values.
I'm more prefer to use a sub-domain like home.example.com instead of go with top level domain name.
You should be able see the record been created within 5 mins.
docker logs -f goodle-ddns
Content type
Image
Digest
Size
151.9 MB
Last updated
over 4 years ago
docker pull sgrio/google-ddns