tcpdump -i wg0 tcp port 80
tcpdump -i wg0 tcp port 80
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on wg0, link-type RAW (Raw IP), snapshot length 262144 bytes
Вот видите. Также должен пингаться и роутер (0.4 -> 0.2 сейчас, как я понял).
root@OpenWrt:~# ping 10.7.0.2
PING 10.7.0.2 (10.7.0.2): 56 data bytes
64 bytes from 10.7.0.2: seq=0 ttl=63 time=132.892 ms
64 bytes from 10.7.0.2: seq=1 ttl=63 time=140.974 ms
64 bytes from 10.7.0.2: seq=2 ttl=63 time=128.510 ms
Я бы причесал AllowedIPs и воспользовался бы tcpdump. Пока можно посмотреть tcpdump на роутере 0.1 при запросе curl с 0.2 на 0.4, протокол tcp, порт 80
Также можно пропингать с 0.2 смартфон 0.3, при этом на смартфоне должно стоять AllowedIPs 0.0.0.0/0, файрволла на смартфоне быть не должно.
root@OpenWrt:~# ping 10.7.0.3
PING 10.7.0.3 (10.7.0.3): 56 data bytes
64 bytes from 10.7.0.3: seq=0 ttl=63 time=130.525 ms
64 bytes from 10.7.0.3: seq=1 ttl=63 time=146.244 ms
64 bytes from 10.7.0.3: seq=2 ttl=63 time=135.313 ms
^C
--- 10.7.0.3 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 130.525/137.360/146.244 ms
traceroute to 10.7.0.4 (10.7.0.4), 30 hops max, 46 byte packets
1 10.7.0.1 (10.7.0.1) 66.576 ms 57.706 ms 66.993 ms
2 10.7.0.4 (10.7.0.4) 122.427 ms 107.681 ms 118.133 ms
curl 10.7.0.4
curl: (7) Failed to connect to 10.7.0.4 port 80 after 114 ms: Error
root@OpenWrt:~#
значит, зайдите на 0.2 и ping, traceroute, curl на 0.4,
root@OpenWrt:~# ping 10.7.0.2
PING 10.7.0.2 (10.7.0.2): 56 data bytes
64 bytes from 10.7.0.2: seq=0 ttl=64 time=0.567 ms
64 bytes from 10.7.0.2: seq=1 ttl=64 time=0.342 ms
64 bytes from 10.7.0.2: seq=2 ttl=64 time=0.344 ms
^C
--- 10.7.0.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.342/0.417/0.567 ms
root@OpenWrt:~# traceroute 10.7.0.2
traceroute to 10.7.0.2 (10.7.0.2), 30 hops max, 46 byte packets
1 10.7.0.2 (10.7.0.2) 0.048 ms 0.048 ms 0.048 ms
root@OpenWrt:~# curl 10.7.0.2
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/ DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, mu st-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Expires" content="Thu, 01 Jan 1970 00:00:00 GM T" />
<meta http-equiv="refresh" content="0; URL=cgi-bin/luci/" />
<style type="text/css">
body { background: white; font-family: arial, helvetica, sans-serif; }
a { color: black; }
@media (prefers-color-scheme: dark) {
body { background: black; }
a { color: white; }
}
</style>
</head>
<body>
<a href="cgi-bin/luci/">LuCI - Lua Configuration Interface</a>
</body>
</html>
root@OpenWrt:~#
Для дальнейшей диагностики надо использовать SSH. Заходите на 0.4 и делаете:
а) ping 0.2
б) curl/wget 0.2
[Interface]
Address = 10.7.0.1/24
PrivateKey = hide
ListenPort = 15346
# BEGIN_PEER Mikrotik
[Peer]
PublicKey = hide
PresharedKey = hide
AllowedIPs = 10.7.0.2/32
# END_PEER Mikrotik
# BEGIN_PEER smartphone
[Peer]
PublicKey = hide
PresharedKey = hide
AllowedIPs = 10.7.0.3/32
# END_PEER smartphone
# BEGIN_PEER Xiaomi
[Peer]
PublicKey = hide
PresharedKey = hide
AllowedIPs = 10.7.0.4/32
# END_PEER Xiaomi
Какие стоят AllowedIPs на участниках сети WG? Должны быть подходящие.
фаервол выключите на всех роутерах
и маршруты на каждом из роутеров добавьте до соседней сети через wg интерфейс
что-то я затупил, пару через пару минут выдам результаты