OpenWrt定制版修改步骤

官方 OpenWrt 下载

玩客云刷机openwrt 详细说明 https://openwrt.ai/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
构建Openwrt固件参数信息
10.20.0.200
密码:545818
系统初始化shell脚本
https://opt.545818.xyz/openwrt.sh

kwrt-08.15.2025-amlogic-meson8b-thunder-onecloud-ext4-emmc_burn.img
(此文件web服务是uhttp)
kwrt-09.03.2025-amlogic-meson8b-thunder-onecloud-ext4-emmc_burn.img
(此文件web服务是nginx)

2,修改 /etc/config/fstab,添加 overlay 配置,比如:
mount | grep " / "
mount -o remount,rw /

config 'mount'
option target '/overlay'
option uuid 'ff313567-e9f1-5a5d-9895-3ba130b4a864'
option enabled '1'


3,关闭重定向到 HTTPS
uci set uhttpd.main.redirect_https='0'
uci commit uhttpd
/etc/init.d/uhttpd restart

4,连接ssh接口修改
# 假设使用 dropbear(OpenWrt 默认 SSH)
uci set dropbear.@dropbear[0].Interface='0.0.0.0' # IPv4
uci set dropbear.@dropbear[0].Interface='::' # IPv6,如果需要
uci commit dropbear
/etc/init.d/dropbear restart

uci del dropbear.main.enable
uci del dropbear.main.Interface
uci del dropbear.main.RootPasswordAuth

方法 2:编辑 /etc/config/dropbear,找到:
config dropbear
option Interface 'lan'
改为:
config dropbear
option Interface '0.0.0.0'
然后重启:/etc/init.d/dropbear restart

方法 3:临时命令(仅当次有效)
dropbear -p 0.0.0.0:22


5防火墙,入站数据,出站数据,和转发数据全部为接收
uci set firewall.@defaults[0].input='ACCEPT'
uci set firewall.@defaults[0].output='ACCEPT'
uci set firewall.@defaults[0].forward='ACCEPT'
uci commit firewall
/etc/init.d/firewall restart

uci set firewall.@zone[0].name='lan'
uci set firewall.@zone[0].input='ACCEPT'
uci set firewall.@zone[0].output='ACCEPT'
uci set firewall.@zone[0].forward='ACCEPT'
uci commit firewall
/etc/init.d/firewall restart

uci set firewall.@zone[1].name='wan'
uci set firewall.@zone[1].input='ACCEPT'
uci set firewall.@zone[1].output='ACCEPT'
uci set firewall.@zone[1].forward='ACCEPT'
uci commit firewall
/etc/init.d/firewall restart

创建ubuntu用户并开起ftp服务
opkg update
opkg install shadow-useradd shadow-usermod shadow-passwd

useradd -d /mnt/mmcblk0p1 -s /bin/false -M ubuntu
passwd ubuntu
chown -R ubuntu:ubuntu /mnt/mmcblk0p1
chmod -R 777 /mnt/mmcblk0p1

然后配置 /etc/vsftpd.conf:
listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_root=/mnt/mmcbsd
chroot_local_user=YES

/etc/init.d/vsftpd enable
/etc/init.d/vsftpd start