DDNS(Dynamic Domain Name Server,动态域名服务)是将用户的动态IP地址映射到一个固定的域名解析服务上,用户每次连接网络的时候客户端程序就会通过信息传递把该主机的动态IP地址传送给位于服务商主机上的服务器程序,服务器程序负责提供DNS服务并实现动态域名解析。
openwrt ddns Settings
https://openwrt.org/docs/guide-user/base-system/ddns
https://github.com/openwrt/packages/blob/master/net/ddns-scripts/samples/ddns.config_sample
The file /etc/config/ddns holds the configuration for ddns-scripts package.
/etc/init.d/someprogram restart 软件重启
高级里面 IP 来源设置
the ip_source could be set to “network”, “web”, “interface” or “script”
-  当 ip_source 设为 “network”(默认值), 需要设置 ip_network 的值, 
- default: “wan” using IPv4
 - default: “wan6” using IPv6
 
 - 当 ip_source 设为”web”,  需要 设置 ip_url 选项,如果你在防火墙或者nat 环境内,所有本地网络或接口都没有外部IP,这是最好的选择
- default: “http://checkip.dyndns.com” using IPv4
 - default: “http://checkipv6.dyndns.com” using IPv6
 
 - 当 ip_source 设为”interface”, 需要 设置 ip_interface 选项, uses one of the locally installed physical interfaces
- option ip_source “interface”
 - option ip_interface “eth1”
 
 - 当 ip_source 设为 “script”, 需要设置 ip_script 的值,自己写脚本检测local ip
- put full path into ip_script option
 
 
config service "myddns_ipv4"
	option service_name	"example.org"
	option domain		"yourhost.example.org"
	option username		"your_username"
	option password		"your_password"
	option interface	"wan"
	option ip_source	"network"
	option ip_network	"wan"
config service "myddns_ipv6"
	option use_ipv6		"1"
	option service_name	"example.org"
	option domain		"yourhost.example.org"
	option username		"your_username"
	option password		"your_password"
	option interface	"wan6"
	option ip_source	"network"
	option ip_network	"wan6"
其他就是设置防火墙