1 billlee 2021-03-15 01:46:43 +08:00 这个需要策略路由 AllowedIps 是 wireguard 的节点 IP 白名单,是要设置成外网 IP 或 wildcard 地址的。 |
2 trepwq 2021-03-15 07:48:20 +08:00 只让电脑走 wireguard 为什么不用电脑客户端呢 |
![]() | 3 xqdoo00o OP @billlee 尝试 openwrt 上设置了下策略路由 iptables -t mangle -A PREROUTING -s 192.168.1.145 -j MARK --set-mark 100 ip route add default via 10.0.1.1 dev wg0 table pc ip rule add fwmark 100 table pc 测试结果是电脑能上网,但是没有走 Wireguard,ip 还是电信 ip. |
![]() | 4 xqdoo00o OP 忘了在 openwrt 上设置 Allowed IPs = 0.0.0.0/0 了,还得把 Route Allowed IPs 关掉。 不用 iptables 也行 ip route add default via 10.0.1.1 dev wg0 table pc ip rule add from 192.168.1.145 table pc 现在已经可以了 |
5 l18581707928 2021-11-27 14:47:13 +08:00 你好我也想要实现这样得需求 请问你具体是怎么解决得呢? |