Sign inSign up

tscci/cloudflare-ddns

By tscci

•Updated almost 4 years ago

Image
0

164

tscci/cloudflare-ddns repository overview

官方centos镜像,更换阿里源,安装wget/vim/cronie包

API令牌:https://dash.cloudflare.com/profile/api-tokens⁠

参考文档:https://blog.natcloud.net/cf-ddns.html⁠

Github项目:https://github.com/yulewang/cloudflare-api-v4-ddns/blob/master/cf-v4-ddns.sh⁠

启动参数:--net=host

配置文档:

CFKEY= # 这里填写上一步获取的CFKEY

CFZONE= #输入你需要解析用来DDNS解析的根域名 eg: example.com,比如我的域名是123.com,那么此处填写123.com

CFUSER= # 登陆CF的Username, eg: [email protected]⁠(即CF的登录邮箱)

CFHOST= # 填写用来DDNS解析的二级域名,与上面设置的要一致, eg: ddns.yourdomain.com(例 ddns.123.com)

输入 crontab -e 然后会弹出 vi 编辑界面,按小写字母 i 进入编辑模式,在文件里面添加一行: */2 * * * * /root/cf-v4-ddns.sh >/dev/null 2>&1

#如果您需要日志文件,输入下面命令 */2 * * * * /root/cf-v4-ddns.sh >> /var/log/cf-ddns.log 2>&1

Tag summary

Content type

Image

Digest

sha256:8d45f3ff8…

Size

209 MB

Last updated

almost 4 years ago

docker pull tscci/cloudflare-ddns