All Projects → wherelse → cloudflare-ddns-script

wherelse / cloudflare-ddns-script

Licence: other
CloudFlare ddns / 树莓派IPV6 DDNS解决方案

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to cloudflare-ddns-script

cloudflare-ddns
A script to update your Cloudflare DNS records at a glance.
Stars: ✭ 152 (+61.7%)
Mutual labels:  cloudflare, cloudflare-ddns
CloudFlare-DDNS-Script
CloudFlare-DDNS-Script Support LEDE/Openwrt with IPv4/IPv6
Stars: ✭ 40 (-57.45%)
Mutual labels:  cloudflare, cloudflare-ddns
cf ddns
CloudFlare DDNS executable written in Swift
Stars: ✭ 20 (-78.72%)
Mutual labels:  cloudflare, cloudflare-ddns
Sites Using Cloudflare
💔 Archived list of domains using Cloudflare DNS at the time of the CloudBleed announcement.
Stars: ✭ 1,914 (+1936.17%)
Mutual labels:  cloudflare
Cloudflare Cors Anywhere
CORS "anywhere" proxy in a Cloudflare worker. DEMO at: https://test.cors.workers.dev/
Stars: ✭ 162 (+72.34%)
Mutual labels:  cloudflare
Cloudmare
Cloudflare, Sucuri, Incapsula real IP tracker.
Stars: ✭ 213 (+126.6%)
Mutual labels:  cloudflare
DDos-Attack-OVH-
Powerful DDoS Attack
Stars: ✭ 155 (+64.89%)
Mutual labels:  cloudflare
Firewall
ASP.NET Core middleware for IP address filtering.
Stars: ✭ 159 (+69.15%)
Mutual labels:  cloudflare
Cloudflare Docs
Cloudflare’s developer docs.
Stars: ✭ 219 (+132.98%)
Mutual labels:  cloudflare
Terraform Provider Cloudflare
Cloudflare Terraform Provider
Stars: ✭ 208 (+121.28%)
Mutual labels:  cloudflare
Cloudflare Scrape
A Python module to bypass Cloudflare's anti-bot page.
Stars: ✭ 2,606 (+2672.34%)
Mutual labels:  cloudflare
Sslify
Rapidly SSLify Your Server!
Stars: ✭ 168 (+78.72%)
Mutual labels:  cloudflare
Gortr
The RPKI-to-Router server used at Cloudflare
Stars: ✭ 216 (+129.79%)
Mutual labels:  cloudflare
Isbgpsafeyet.com
Is BGP safe yet?
Stars: ✭ 163 (+73.4%)
Mutual labels:  cloudflare
Flaresolverr
Proxy server to bypass Cloudflare protection
Stars: ✭ 241 (+156.38%)
Mutual labels:  cloudflare
Ddns
🚩 自动更新域名解析到本机IP(支持dnspod,阿里DNS,CloudFlare,华为云,DNSCOM...)
Stars: ✭ 2,582 (+2646.81%)
Mutual labels:  cloudflare
Synologycloudflareddns
📜 Cloudflare DDNS script for Synology
Stars: ✭ 222 (+136.17%)
Mutual labels:  cloudflare
Cfpmp
Cloudflare Partner Management Panel
Stars: ✭ 194 (+106.38%)
Mutual labels:  cloudflare
Cloudflare
CloudFlare API - PHP
Stars: ✭ 192 (+104.26%)
Mutual labels:  cloudflare
Google Drive Index
Index Google Drive Files Easily and Free
Stars: ✭ 205 (+118.09%)
Mutual labels:  cloudflare

CloudFlare DDNS script/Raspberry pi IPV6 DDNS Solution

cloudflare ddns 脚本/树莓派IPV6 DDNS解决方案

中文 | English

更新Server酱支持版本

概述

本脚本是基于cloudflare API的DDNS脚本,支持IPV4和IPV6,可通过网络方式和本地方式获取脚本安装主机的IP地址,理论支持所有使用linux系统的主机,已在debian和ubuntu上测试可用。

使用脚本前需要做的

  1. 一台可联网的liunx设备
  2. 拥有一个域名,免费的或者收费的都可以(中国大陆的域名需要备案)
  3. 注册一个CloudFlare账户 ( www.cloudflare.com ), 并将需要使用的域名添加到账户上,完成配置后根据需要添加服务设备的IPV6地址添加一个AAAA解析,并设为仅进行DNS解析
  4. 查询CloudFlare账户的Globel API Key并记录下来,用于后续配置

使用方法

打开命令窗口,执行以下程序:

wget https://raw.githubusercontent.com/wherelse/cloudflare-ddns-script/master/cloudflare-ddns.sh
sudo chmod +x /home/username/cloudflare-ddns.sh #目录根据实际用户等进行更改

需要对脚本内的个人配置信息进行更改,目录和上一条命令保持一致

sudo nano /home/username/cloudflare-ddns.sh
#
sudo vi /home/username/cloudflare-ddns.sh

找到如下内容进行更改

auth_email="[email protected]"  #你的CloudFlare注册账户邮箱
auth_key="*****************"   #你的cloudflare账户Globel ID 
zone_name="Your main Domain"   #你的域名
record_name="Your Full Domain" #完整域名

ip_index="local"   #域名获取方式,本地或者网络         
#use "internet" or "local",使用本地方式还是网络方式获取地址
eth_card="eth0"    #使用本地获取方式时绑定的网卡,使用网络方式可不更改         
#使用本地方式获取ip绑定的网卡,默认为eth0,仅本地方式有效

以任意一个域名为例,ipv6.google.com 这个域名,zone_name为 google.com 和record_name则为 ipv6.google.com ,修改完成后,保存并退出。

在命令行中输入以下内容运行脚本:

bash /home/username/cloudflare-ddns.sh

如果提示 IP changed to: xxxxxIP has not changed. 则说明配置成功了

定时运行脚本 为了实现动态域名解析,必须让脚本保持运行以获取IP状态,这里使用系统crontab定时 在命令行输入:crontab -e 后在文件最后添加以下内容

*/5 * * * *  /home/username/cloudflare-ddns.sh >/dev/null 2>&1

更改完成后保存并退出。 在这里将脚本设置为每五分钟执行一次 cloudflare-ddns.sh 脚本,就可以实现动态域名解析了。

结束

该脚本不仅适用于树莓派,在其他Linux服务器上也适用,使用时都需要根据自己的实际情况更改以上配置时使用的路径

FAQ

错误日志为以下内容时: API UPDATE FAILED. DUMPING RESULTS: {"success":false,"errors":[{"code":7001,"message":"Method PUT not available for that URI."}],"messages":[],"result":null} 删除脚本运行目录下的cloudflare.ids文件,然后再次尝试运行。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].