qwert1388 发表于 2024-4-9 21:34:33

dynv6 IPV6 DDNS不成功

本帖最后由 qwert1388 于 2024-4-9 21:36 编辑

:local hostname "sz.mkadmin.dns.army"
:local token "edZkL1ZVv8fidonfA1Sxd-XyqSx-xH"
:local IPV6 address]
:set IPV6 [:pick $IPV6 0 ( -3)]
:if ([:resolve $hostname server=1.1.1.1] != $IPV6) do={
/tool fetch url="http://dynv6.com/api/update?hostname=$hostname&token=$token&ipv6prefix=$IPV6" mode=http keep-result=no
:log info "IPV6 Update: $hostname - $IPV6"
}



下面官方更新信息

Use the following snippet in your ddclient.conf of ddclient:protocol=dyndns2server=dynv6.comlogin=nonepassword='edZkL1ZVv8fidonfA1Sxd-XyqSx-xH'mkadmin.dns.armyAdditionally you also need to specifiy the interface to use, like use=if, if=eth0Fritz!OS (German)Enable IPv6Go to Internet → Zugangsdaten → IPv6 Make sure that IPv6 support is enabled. If your provider does not support native IPv6 yet, then enable tunneled IPv6 with 6to4.Set up dynv6Go to Internet → Freigaben → Dynamic DNS then enable the Option Dynamic DNS benutzen select the provider Benutzerdefiniert and copy the following values into the form:Update-URLhttp://dynv6.com/api/update?hostname=<domain>&token=<username>&ipv4=<ipaddr> http://dynv6.com/api/update?host ... lt;ip6lanprefix>
(combined with whitespace to update IPv4 and IPv6 addresses simultaneously)Domainnamemkadmin.dns.army
BenutzernameedZkL1ZVv8fidonfA1Sxd-XyqSx-xH
Kennwortnone


kaisenchen 发表于 2026-1-19 20:10:27

ROS7用这个脚本就可以了
/tool fetch url=("https://用户名:密码@nic.changeip.com/nic/update?system=dyndns&hostname=域名&myip=IP地址");

ROS6及以下版本用这个脚本:
/tool dns-update name=域名 address=IP地址 key-name=用户名 key=密码;

chenchsha 发表于 昨天 22:13

# Define User Variables
:global ddnspass "**********"
:global ddnshost "域名"
:global ddnsinterface "pppoe-out1"

# Define Global Variables
:global ddnsip
:global ddnslastip
:if ([ :typeof $ddnslastip ] = nil ) do={ :global ddnslastip "0" }


# Define Local Variables
:local int

# Loop thru interfaces and look for ones containing
# default gateways without routing-marks
:if ([ :typeof $ddnsinterface ] != "str" ) do={
:foreach int in=[ /ipv6 address find global ] do={
    :local testip [ /ipv6 address get $int address ]
    :if ($testip in "fe80::/10" || $testip in "fc00::/7") do={
    } else={
      :global ddnsip $testip
    }
}
} else={
:if ([ :typeof $ddnspool ] != "str" ) do={
    # Grab the current Global IP address on that interface.
    :foreach int in=[ /ipv6 address find interface=$ddnsinterface global ] do={
      :local testip [ /ipv6 address get $int address ]
      :if ($testip in "fe80::/10" || $testip in "fc00::/7") do={
      } else={
      :global ddnsip $testip
      }
    }
} else={
    # Grab the current Global IP address on that interface from spec ip pool.
    :global ddnsip [ /ipv6 address get [ /ipv6 address find interface=$ddnsinterfacefrom-pool=$ddnspool ] address ]
}
}

# Did we get an IP address to compare?
:if ([ :typeof $ddnsip ] = nil ) do={
   :log info ("DynDNS: No ip address present on please check.")
} else={
:log info ("DynDNS: check IPv6 UPDATE " . $ddnsip)
:if ($ddnsip != $ddnslastip) do={
    :log info "DynDNS: Sending IPv6 UPDATE!"
    :local str "api/update\?hostname=$ddnshost&ipv6=$ddnsip&token=$ddnspass"
    /tool fetch address="dynv6.com" host="dynv6.com" src-path="$str" mode=https dst-path=("/dynv6.".$ddnshost)
    :delay 1
    :local str ;
    /file remove $str
    :global ddnslastip $ddnsip
}
}

页: [1]
查看完整版本: dynv6 IPV6 DDNS不成功