openwrt-22.03_openConnect-server
转载注明来源: 本文链接 来自osnosn的博客,写于 2022-09-13.
openwrt-21.02
- 网上有很多文章,自行搜索。
openwrt-22.03
防火墙使用的是fw4,即nftables。
- 安装
opkg update opkg install ocserv luci-app-ocserv
去web页面配置。
- Server Settings -> Gerneal Settings
- 勾上 启用压缩
- 设置IPv4 ,建议和 lan不一样网段。
- 设置DNS server的IP。
- 添加 Routing table
- netmask,建议写数字。比如 255.255.255.0 写 24,0.0.0.0 写 0。这样不容易出错。
- 如果想让客户端全局使用这个连接,只设置一个 0/0的缺省路由,netmask 写 0,不要写 0.0.0.0
- User Settings
- 添加用户
设置防火墙,允许wan口访问ocserv端口
- 设置forward规则
- 防火墙-> Traffic Rules
允许TCP+UDP访问指定端口。
设置防火墙,允许openConnect客户端访问lan/wan
- 设置forward规则
- 防火墙-> Traffic Rules
- 添加
协议: Any
Source zone: Any zone(forward)
Source address: ocserv 的IP段,比如 192.168.100.0/24
Destination zone: WAN
Destination address: 留空
Action: accept
Restrict to address family: IPv4 only
- 添加
----end----
转载注明来源: 本文链接 https://www.cnblogs.com/osnosn/p/16923645.html
来自 osnosn的博客 https://www.cnblogs.com/osnosn/ .