Commit Graph
5 Commits
Author SHA1 Message Date
kevin 05e0a6de62 fix: NAT 检测与安装脚本优先使用 nft,解决 iptables-nft 不兼容问题
- diag_linux: checkMasquerade 改为优先 nft list ruleset,iptables 执行失败时 fall through 到 nft 而非直接返回
- diag_linux: 区分"iptables-nft 与原生 nft 表不兼容"与"权限不足"两种失败场景
- install_linux.sh: NAT 工具优先级反转为 nft 优先,iptables 回退,解决 Debian 12+ 上 iptables-nft 包装器操作原生 nft nat 表报 incompatible 的问题
- install_linux.sh: nft 分支增加 /etc/nftables.conf include 配置与 systemctl enable nftables,确保重启后规则自动加载
2026-07-06 14:59:40 +08:00
kevin 691ae99451 fix: NAT 检测与安装脚本适配无 iptables 的系统
- diag_linux: 用 findExecutable 在 /usr/sbin /sbin 等常见路径查找 iptables/nft,弥补 systemd 服务 PATH 不含这些目录
- diag_linux: iptables 不存在时回退 nft list ruleset 检测 masquerade,两者均无时返回明确安装提示
- diag_linux: 区分"未安装"与"权限不足",MASQUERADE 检测说明更精确
- install_linux.sh: NAT 段加 NAT_TOOL 选择,优先 iptables 回退 nft,无则提示安装而非 set -e 退出
- install_linux.sh: 新增 nftables 配置分支(lmvpn_nat 表,postrouting masquerade + forward accept),持久化到 /etc/nftables.d/lmvpn.nft
2026-07-06 14:53:30 +08:00
kevin 6ccfb57c80 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
2026-07-06 14:42:58 +08:00
kevin 03470475aa up install 2026-07-03 10:30:02 +08:00
kevin ca9b1e751c 写了个安装脚本 2026-07-02 22:51:26 +08:00