OPENWRT 文本(shell) 配置支持oray的花生壳DDNS
opkg update
opkg install ddns-scripts luci-app-ddns
用上面的命令下载ddns脚本,编辑配置文件
vi /etc/config/ddns
配置如下
config service "myddns" option enabled "1" option interface "wan" option use_syslog "0" option service_name "gicp.net"
#注意下面domain要换成你自己的domain option domain "user.gicp.net"
#username要更换为你自己的username option username "username"
#passwd换成你自己的passwd option password "passwd" option use_https "0" option force_interval "24" option force_unit "hours" option check_interval "10" option check_unit "minutes" option retry_interval "60" option retry_unit "seconds" #option ip_source "network" #option ip_network "wan" #option ip_source "interface" #option ip_interface "pppoe-wan" #option ip_source "script" #option ip_script "path to your scrip"
#使用网络来检测自己的公网IP option ip_source "web" option ip_url "http://ddns.oray.com/checkip"
#oray的ip地址更新格式 option update_url "http://[USERNAME]:[PASSWORD]@ddns.oray.com/ph/update?hostname=[DOMAIN]&myip=[IP]"
配置完成后,使能ddns
/etc/init.d/ddns start
配置开启启动
/etc/init.d/ddns enable
最后大功告成:
C:\Documents and Settings\Administrator>ping user.gicp.net
Pinging user.gicp.net [117.83.194.126] with 32 bytes of data:
Reply from 117.83.194.126: bytes=32 time=1ms TTL=64
Reply from 117.83.194.126: bytes=32 time<1ms TTL=64
Reply from 117.83.194.126: bytes=32 time<1ms TTL=64
Reply from 117.83.194.126: bytes=32 time=1ms TTL=64
Ping statistics for 117.83.194.126:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。