Preface#
What is DDNS#
DDNS (Dynamic Domain Name System) is a DNS-based service that maps dynamic IP addresses to static domain names. Typically, internet service providers assign users a dynamic IP address, which means that their IP address changes every time they reconnect to the network. This makes it difficult to access remote servers and devices because the IP address cannot be guaranteed to remain the same.
The purpose of DDNS is to periodically detect and update a user's dynamic IP address using software, and associate it with their domain name. This way, whenever a user reconnects to the internet, the DDNS service automatically updates their IP address, ensuring that their domain name matches the correct IP address. This allows users to access their devices and servers using a memorable domain name without worrying about the issues caused by changing IP addresses.
Applicable Conditions#
You have a public IP address (from a mobile, telecom, or internet service provider) that is either IPV4 or IPV6, but it is not static and changes periodically. Now, if you want to map the IP address to a static domain name and access it using the domain name, then this article is for you.
Main Character: DDNS-GO#
DDNS-GO GitHub Official Website: Click here to visit.
Brief introduction: Automatically obtain your public IPv4 or IPv6 address and resolve it to the corresponding domain name service. It includes numerous features such as support for all platforms (Mac, Windows, Linux), support for ARM and x86 architectures, and support for various domain name service providers (Alidns (Alibaba Cloud)
, Dnspod (Tencent Cloud)
, Cloudflare
, Huawei Cloud
, Callback
, Baidu Cloud
, Porkbun
, GoDaddy
, Google Domain
), etc.
Using DDNS-GO#
Installation#
There are two installation methods available on the official website. One is to use the pre-packaged binary program, and the other is to use Docker. Personally, I recommend installing using Docker.
If your system does not have Docker installed, please refer to the previous article: Building Shadowsocks Based on Docker, which includes a method for installing Docker.
Installation command:
docker run -d --name ddns-go --restart=always --net=host -v /opt/ddns-go:/root jeessy/ddns-go
# Chinese users can choose the ghcr.io mirror
docker run -d --name ddns-go --restart=always --net=host -v /opt/ddns-go:/root ghcr.io/jeessy2/ddns-go
Open http://hostIP:9876
in your browser for configuration. You can use the docker ps
command to check if the installation was successful.
Configuration of DNS Server Provider#
There's nothing much to say about this. Choose the DNS service provider where your domain name is registered.
After selecting the DNS service provider, configure the corresponding provider's key according to the blue font links below and fill it in.
Configuration of IPV4 and IPV6#
You can decide whether to enable IPV4 or IPV6. It is recommended to prioritize obtaining the IP address through the network card. If the network card cannot obtain the IP address, choose to obtain it through the interface. Then, enter the domain name you want to configure in the "Domains" section.
Other Configurations#
It is strongly recommended to disable public access and configure a username and password.
WebHook Configuration#
The main purpose of this is to send messages to you when the domain name update is successful or unsuccessful.
I use Server Chan, and you can refer to the specific configuration below.
https://sctapi.ftqq.com/${EnterYourKeyHere}.send?title=MasterIPv6Changed#{ipv6Addr},DomainUpdateResult:#{ipv6Result}
For detailed configuration, please refer to the DDNS-GO GitHub Official Website: Click here to visit.
Finally#
I wish you all a happy time 😊😊😊😊😊😊, and I hope my article can inspire you.
The wind warms the sound of birds, the sun shines on the flowers