feat: 默认子网改为 192.168.77.0/24,安装脚本授权 CAP_NET_ADMIN 与 iptables 配置
- 默认 VPN 子网由 192.168.3.0/24 改为 192.168.77.0/24(db seed、前端表单默认值与 placeholder 同步) - install_linux.sh 顶部增加 VPN_SUBNET 可配置变量 - systemd unit 增加 AmbientCapabilities/CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW,服务以 lmvpn 用户运行即可创建 TUN,无需 root - 脚本自动开启 net.ipv4.ip_forward 并持久化到 /etc/sysctl.d/99-lmvpn.conf - 脚本自动检测出口网卡,幂等配置 iptables NAT MASQUERADE 与 FORWARD 放行规则 - 优先 netfilter-persistent 持久化,回退 iptables-save 写 /etc/iptables/rules.v4
This commit is contained in:
+1
-1
@@ -110,7 +110,7 @@ func seedDefaultVpnSettings() error {
|
||||
s = model.VpnSetting{
|
||||
ID: model.VpnSettingSingletonID,
|
||||
Enabled: false,
|
||||
Subnet: "192.168.3.0/24",
|
||||
Subnet: "192.168.77.0/24",
|
||||
MTU: 1420,
|
||||
InterfaceName: "",
|
||||
DoLocalIPConfig: true,
|
||||
|
||||
Reference in New Issue
Block a user