美文网首页
可取代ksa的wireguard组网坑之防火墙引发的惨案。

可取代ksa的wireguard组网坑之防火墙引发的惨案。

作者: 吉凶以情迁 | 来源:发表于2024-11-27 14:08 被阅读0次

我这里的模式是让我外网电脑客户端连上 openwrt的wireguad,就能访问openwrt所有网段
刚开始发现只能ping通 openwrt 2.3和 wireguard分配的ip 8.2
首先防火墙必须开启,和window不一样,不是你关闭防火墙就代表默认允许流量端口啥的就是开的,linux是相反的,这是我经过验证发现的实际效果
/etc/init.d/firewall stop 之后我发现就无法ping通hub的主机。

937b3262885775b4437ac1ff7b9729b8.png

另外也要确保/etc/init.d/firewall restart不会报错才能代表防火墙是ok的。

root@OpenWrt:~# ip route show
default via 192.168.2.1 dev br-lan proto static src 192.168.2.3 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 
172.22.222.0/24 dev safeline-ce proto kernel scope link src 172.22.222.1 
192.168.1.0/24 dev WireGuard proto static scope link metric 1 
192.168.2.0/24 dev br-lan proto kernel scope link src 192.168.2.3 
192.168.2.0/24 dev WireGuard proto static scope link metric 1 
192.168.188.0/24 dev WireGuard proto static scope link metric 1 
192.168.188.2 dev WireGuard proto static scope link metric 1 
192.168.188.4 dev WireGuard proto static scope link metric 1 
192.168.188.5 dev WireGuard proto static scope link metric 1 
root@OpenWrt:~# 

window客户端查路由
route print

image.png

相关文章

网友评论

      本文标题:可取代ksa的wireguard组网坑之防火墙引发的惨案。

      本文链接:https://www.haomeiwen.com/subject/pjecsjtx.html