Hello
3 locations.
1 - WG "server" with real ip, router Model:Beeline SmartBox GIGA Architecture:MediaTek MT7621 ver:1 eco:3
Firmware Version:OpenWrt SNAPSHOT r16435-f2c8c62d98
2 - WG "client" with no real ip, mobile link via modem. TP-Link TL-WR1043N/ND v1 Architecture Atheros AR9132 rev 2 Firmware Version OpenWrt 18.06.9 r8077-7cbbab7246 / LuCI openwrt-18.06 branch (git-20.319.49209-ab22243)
3 - another WG "client with no real ip, mobile link via modem. Keenetic KN-1210 with latest stock firmware.
I have problem when client #2 drops mobile connection (not very stable) and tries to reestablish WG tunnel to server. It seems that server just ignores its packets, while client #3 doesn't suffer from this issue.
"server" log shows just client #2 attempts to initiate tunnel with no response:
root@server-router:~# tcpdump -n -i any port 50812
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked v1), capture size 262144 bytes
20:45:31.456585 IP 188.170.xx.xxx.54748 > server_real_ip.50812: UDP, length 148
20:45:37.216781 IP 188.170.xx.xxx.54748 > server_real_ip.50812: UDP, length 148
20:45:42.976432 IP 188.170.xx.xxx.54748 > server_real_ip.50812: UDP, length 148
20:45:45.929195 IP 176.59.x.xxx.48950 > server_real_ip.50812: UDP, length 32
20:45:48.728613 IP 188.170.xx.xxx.54748 > server_real_ip.50812: UDP, length 148
20:45:53.848533 IP 188.170.xx.xxx.54748 > server_real_ip.50812: UDP, length 148
20:45:59.609683 IP 188.170.xx.xxx.54748 > server_real_ip.50812: UDP, length 148
20:46:05.361391 IP 188.170.xx.xxx.54748 > server_real_ip.50812: UDP, length 148
20:46:11.123037 IP 188.170.xx.xxx.54748 > server_real_ip.50812: UDP, length 148
20:46:12.570872 IP 176.59.x.xxx.48950 > server_real_ip.50812: UDP, length 32
^C
10 packets captured
10 packets received by filter
In log above client #2 with address 188.170.xx.xxx tries to intiate tunnel while client #3 with address 176.59.x.xxx just performing re-handshake.
Only reboot of server rooter helps.
Here are my configs, working state. When server doesn't reply they only diifers with no bytes sent/received accordingly:
Server:
interface: wg0
public key: q959...
private key: (hidden)
listening port: 50812
peer: nLr7...
preshared key: (hidden)
endpoint: 188.170.xx.xxx:42889
allowed ips: 172.22.0.33/32, 192.168.33.0/24, 192.168.8.0/24
latest handshake: 19 seconds ago
transfer: 24.40 MiB received, 144.60 MiB sent
peer: CguL...
preshared key: (hidden)
endpoint: 176.59.x.xxx:48950
allowed ips: 172.22.0.2/32, 192.168.0.0/24
latest handshake: 46 seconds ago
transfer: 2.40 MiB received, 177.13 KiB sent
Client #2
root@client2-router:~# wg
interface: wgclient
public key: nLr7...
private key: (hidden)
listening port: 51520
peer: q959...
preshared key: (hidden)
endpoint: server_real_ip:50812
allowed ips: 0.0.0.0/0
latest handshake: 1 minute, 52 seconds ago
transfer: 144.54 MiB received, 24.09 MiB sent
persistent keepalive: every 25 seconds
Any suugestions would be very appreciated.