This commit is contained in:
jeka
2023-12-19 18:43:26 +05:00
parent 99c6061192
commit f2246e732c
3 changed files with 19 additions and 16 deletions

View File

@@ -60,8 +60,7 @@ PREINSTALLED_PACKAGES+=" luci"
# you exclude packages with this to shrink the image for
# routers with smaller flash storage.
#SAVE_SPACE_PACKAGES=" -ppp -ppp-mod-pppoe -ip6tables -odhcp6c -kmod-ipv6 -kmod-ip6tables -ath10k"
SAVE_SPACE_PACKAGES=" -ppp -ppp-mod-pppoe -ip6tables -odhcp6c -kmod-ipv6 -kmod-ip6tables"
#SAVE_SPACE_PACKAGES=""
SAVE_SPACE_PACKAGES=""
PREINSTALLED_PACKAGES+=${SAVE_SPACE_PACKAGES}

View File

@@ -8,6 +8,7 @@ WIFI_2G_PASSWORD="fuckingwep"
WIFI_5G_PASSWORD="fuckingwep"
root_password="AsD7fg"
lan_ip_address="192.168.77.1"
wan_mac_address="98:DA:C4:20:8D:02"
hostname="gw-elmash"
# dhcp server 1 disable, 0 enable
dhcpsrv="0"
@@ -23,6 +24,7 @@ fi
# More options: https://openwrt.org/docs/guide-user/base-system/basic-networking
if [ -n "$lan_ip_address" ]; then
uci set network.lan.ipaddr="$lan_ip_address"
uci set network.@device[1].macaddr="$wan_mac_address"
uci commit network
fi
@@ -64,8 +66,8 @@ cat << EOI > /etc/dropbear/authorized_keys
${SSHPUB}
EOI
chmod 600 /etc/dropbear/authorized_keys
uci set dropbear.@dropbear[0].PasswordAuth="0"
uci set dropbear.@dropbear[0].RootPasswordAuth="0"
uci set dropbear.@dropbear[0].PasswordAuth="1"
uci set dropbear.@dropbear[0].RootPasswordAuth="1"
uci set dropbear.@dropbear[0].GatewayPorts='on'
uci commit dropbear
/etc/init.d/dropbear restart
@@ -80,27 +82,27 @@ uci commit uhttpd
uci set dhcp.lan.ignore="$dhcpsrv"
uci set dhcp.lan.start='50'
uci set dhcp.lan.limit='100'
uci add host
uci add dhcp host
uci set dhcp.@host[-1].name='jeka-office'
uci set dhcp.@host[-1].mac='4c:cc:6a:01:5d:30'
uci set dhcp.@host[-1].ip='192.168.77.35'
uci add host
uci add dhcp host
uci set dhcp.@host[-1].name='fs1370dn'
uci set dhcp.@host[-1].mac='00:C0:EE:9E:01:55'
uci set dhcp.@host[-1].ip='192.168.77.33'
uci add host
uci add dhcp host
uci set dhcp.@host[-1].name='kyoceraigor'
uci set dhcp.@host[-1].mac='00:17:C8:21:A7:F2'
uci set dhcp.@host[-1].ip='192.168.77.30'
uci add host
uci add dhcp host
uci set dhcp.@host[-1].name='kyocerascanner'
uci set dhcp.@host[-1].mac='00:C0:EE:BB:85:2C'
uci set dhcp.@host[-1].ip='192.168.77.31'
uci add host
uci add dhcp host
uci set dhcp.@host[-1].name='natasha-office'
uci set dhcp.@host[-1].mac='50:46:5D:09:D0:69'
uci set dhcp.@host[-1].ip='192.168.77.36'
uci add host
uci add dhcp host
uci set dhcp.@host[-1].name='klipper'
uci set dhcp.@host[-1].mac='B8:27:EB:B9:82:6D'
uci set dhcp.@host[-1].ip='192.168.77.44'

View File

@@ -6,6 +6,7 @@ wlan_name="fta-bgn"
wlan_password="fuckingwep"
root_password="AsD7fg"
lan_ip_address="192.168.77.1"
wan_mac_address="98:DA:C4:20:8D:02"
hostname="gw-elmash"
# dhcp server 1 disable, 0 enable
dhcpsrv="0"
@@ -21,6 +22,7 @@ fi
# More options: https://openwrt.org/docs/guide-user/base-system/basic-networking
if [ -n "$lan_ip_address" ]; then
uci set network.lan.ipaddr="$lan_ip_address"
uci set network.@device[1].macaddr="$wan_mac_address"
uci commit network
fi
@@ -72,27 +74,27 @@ uci commit uhttpd
uci set dhcp.lan.ignore="$dhcpsrv"
uci set dhcp.lan.start='50'
uci set dhcp.lan.limit='100'
uci add host
uci add dhcp host
uci set dhcp.@host[-1].name='jeka-office'
uci set dhcp.@host[-1].mac='4c:cc:6a:01:5d:30'
uci set dhcp.@host[-1].ip='192.168.77.35'
uci add host
uci add dhcp host
uci set dhcp.@host[-1].name='fs1370dn'
uci set dhcp.@host[-1].mac='00:C0:EE:9E:01:55'
uci set dhcp.@host[-1].ip='192.168.77.33'
uci add host
uci add dhcp host
uci set dhcp.@host[-1].name='kyoceraigor'
uci set dhcp.@host[-1].mac='00:17:C8:21:A7:F2'
uci set dhcp.@host[-1].ip='192.168.77.30'
uci add host
uci add dhcp host
uci set dhcp.@host[-1].name='kyocerascanner'
uci set dhcp.@host[-1].mac='00:C0:EE:BB:85:2C'
uci set dhcp.@host[-1].ip='192.168.77.31'
uci add host
uci add dhcp host
uci set dhcp.@host[-1].name='natasha-office'
uci set dhcp.@host[-1].mac='50:46:5D:09:D0:69'
uci set dhcp.@host[-1].ip='192.168.77.36'
uci add host
uci add dhcp host
uci set dhcp.@host[-1].name='klipper'
uci set dhcp.@host[-1].mac='B8:27:EB:B9:82:6D'
uci set dhcp.@host[-1].ip='192.168.77.44'