DDNS

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”

  1. 当 ip_source 设为 “network”(默认值), 需要设置 ip_network 的值,
    1. default: “wan” using IPv4
    2. default: “wan6” using IPv6
  2. 当 ip_source 设为”web”, 需要 设置 ip_url 选项,如果你在防火墙或者nat 环境内,所有本地网络或接口都没有外部IP,这是最好的选择
    1. default: “http://checkip.dyndns.com” using IPv4
    2. default: “http://checkipv6.dyndns.com” using IPv6
  3. 当 ip_source 设为”interface”, 需要 设置 ip_interface 选项, uses one of the locally installed physical interfaces
    1. option ip_source “interface”
    2. option ip_interface “eth1”
  4. 当 ip_source 设为 “script”, 需要设置 ip_script 的值,自己写脚本检测local ip
    1. 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"

其他就是设置防火墙

Leave a Reply

Your email address will not be published. Required fields are marked *