From e84d6ead688889c7463d06e45135d3bd82b8e37f Mon Sep 17 00:00:00 2001 From: kenzok8 Date: Mon, 4 Oct 2021 16:43:02 +0800 Subject: [PATCH] int --- diy/default-settings | 9 +++++++++ diy/zzz-default-settings | 11 ++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/diy/default-settings b/diy/default-settings index 7fe646905..67302f8bb 100755 --- a/diy/default-settings +++ b/diy/default-settings @@ -45,6 +45,15 @@ echo '[ -n "$(command -v ip6tables)" ] && ip6tables -t nat -A PREROUTING -p tcp sed -i '/option disabled/d' /etc/config/wireless sed -i '/set wireless.radio${devidx}.disabled/d' /lib/wifi/mac80211.sh +uci set network.lan.ipaddr='192.168.1.252' # 默认IP地址 +uci set network.lan.proto='static' # 静态IP +uci set network.lan.type='bridge' # 接口类型:桥接 +uci set network.lan.ifname='eth0' # 网络端口:默认 eth0,第一个网口 +uci set network.lan.netmask='255.255.255.0' # 子网掩码 +uci set network.lan.gateway='192.168.1.251' # 默认网关地址(主路由IP) +uci set network.lan.dns='192.168.1.251 223.5.5.5 119.29.29.29' # 默认上游 DNS 地址 +uci commit network + date=`date +%m.%d` date1=`date +%h` sed -i '/DISTRIB_REVISION/d' /etc/openwrt_release diff --git a/diy/zzz-default-settings b/diy/zzz-default-settings index 363678a1a..4c2dbbd8d 100755 --- a/diy/zzz-default-settings +++ b/diy/zzz-default-settings @@ -32,9 +32,14 @@ sed -i "s/# //g" /etc/opkg/distfeeds.conf #uci commit dhcp #设置IP -#uci set network.lan.ipaddr='192.168.119.10' -#uci set network.lan.netmask='255.255.255.0' -#uci commit network +uci set network.lan.ipaddr='192.168.1.252' # 默认IP地址 +uci set network.lan.proto='static' # 静态IP +uci set network.lan.type='bridge' # 接口类型:桥接 +uci set network.lan.ifname='eth0' # 网络端口:默认 eth0,第一个网口 +uci set network.lan.netmask='255.255.255.0' # 子网掩码 +uci set network.lan.gateway='192.168.1.251' # 默认网关地址(主路由IP) +uci set network.lan.dns='192.168.1.251 223.5.5.5 119.29.29.29' # 默认上游 DNS 地址 +uci commit network #DNS重定向 sed -i '/REDIRECT --to-ports 53/d' /etc/firewall.user