Thanks again for your help.
My VPS :
wg config
root@ubuntu:/home/me# cat /etc/wireguard/wg0.conf
[Interface]
PrivateKey = <hidden>
ListenPort = 51820
Address = 192.168.4.1/24
[Peer]
# homesrv
PublicKey = UkuLYOrCjs5CmNns0tt3NvOBJttdMPqKI7eC5trLOzY=
AllowedIPs = 192.168.4.2/32,192.168.1.0/24
[Peer]
# phone me
PublicKey = 0lI8kQ98J+KQm49lna5+gzA0yW//SMSRzaxr1KGlWFA=
AllowedIPs = 192.168.4.3/32
[Peer]
# laptop me
PublicKey = wXlnLUqGhTPWtTEwGOLZzUu8k/It+ttHAJFH0K1ESHM=
AllowedIPs = 192.168.4.4/32
[Peer]
# phone wife
PublicKey = lVGZRm0/Du/Qy3NGd46Qo7jCIOExJyK2nTYzLMf63Ro=
AllowedIPs = 192.168.4.5/32
[Peer]
# phone kid1
PublicKey = hwsDCt4PhSxPhQIfMWuJLjpgolhQ/yUSWxT0ooFGg2Q=
AllowedIPs = 192.168.4.6/32
Iptables
root@ubuntu:/home/me# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ip forward enabled
root@ubuntu:/home/me# cat /etc/sysctl.conf | grep net.ipv4
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1
#net.ipv4.tcp_syncookies=1
net.ipv4.ip_forward=1
#net.ipv4.conf.all.accept_redirects = 0
# net.ipv4.conf.all.secure_redirects = 1
#net.ipv4.conf.all.send_redirects = 0
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv4.conf.all.log_martians = 1
vps can ping homesrv on 192.168.4.2
root@ubuntu:/home/me# ping 192.168.4.2
PING 192.168.4.2 (192.168.4.2) 56(84) bytes of data.
64 bytes from 192.168.4.2: icmp_seq=1 ttl=64 time=83.6 ms
64 bytes from 192.168.4.2: icmp_seq=2 ttl=64 time=90.7 ms
64 bytes from 192.168.4.2: icmp_seq=3 ttl=64 time=98.1 ms
64 bytes from 192.168.4.2: icmp_seq=4 ttl=64 time=90.6 ms
64 bytes from 192.168.4.2: icmp_seq=5 ttl=64 time=87.2 ms
^C
--- 192.168.4.2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4007ms
rtt min/avg/max/mdev = 83.570/90.046/98.137/4.827 ms
and on 192.168.1.170
root@ubuntu:/home/me# ping 192.168.1.170
PING 192.168.1.170 (192.168.1.170) 56(84) bytes of data.
64 bytes from 192.168.1.170: icmp_seq=1 ttl=63 time=95.9 ms
64 bytes from 192.168.1.170: icmp_seq=2 ttl=63 time=103 ms
64 bytes from 192.168.1.170: icmp_seq=3 ttl=63 time=90.9 ms
64 bytes from 192.168.1.170: icmp_seq=4 ttl=63 time=81.7 ms
64 bytes from 192.168.1.170: icmp_seq=5 ttl=63 time=89.5 ms
^C
--- 192.168.1.170 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 81.661/92.116/102.693/6.982 ms
homesrv (NUC n100 haos) in container
# docker exec -it addon_a0d7b954_wireguard bash
wireguard config (edited via HA UI)
root@a0d7b954-wireguard:/$ cat /etc/wireguard/wg0.conf
[Interface]
Address = 192.168.4.2/24
DNS = 172.30.32.3
PrivateKey = <hidden>
ListenPort = 51820
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
PublicKey = ypNKXpemaKkV4WgDD6y/E/QerIP0r21UR9KHvUy+SUo=
AllowedIPs = 192.168.4.1/32,192.168.4.3/32,192.168.4.4/32,192.168.4.5/32
PersistentKeepalive = 25
Endpoint = <hidden>:51820
iptables
root@a0d7b954-wireguard:/$ iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
homesrv can ping vps
root@a0d7b954-wireguard:/$ ping 192.168.4.1
PING 192.168.4.1 (192.168.4.1): 56 data bytes
64 bytes from 192.168.4.1: seq=0 ttl=64 time=85.825 ms
64 bytes from 192.168.4.1: seq=1 ttl=64 time=86.516 ms
64 bytes from 192.168.4.1: seq=2 ttl=64 time=87.437 ms
64 bytes from 192.168.4.1: seq=3 ttl=64 time=86.911 ms
64 bytes from 192.168.4.1: seq=4 ttl=64 time=96.737 ms
^C
--- 192.168.4.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 85.825/88.685/96.737 ms
My phone config :
My phone can ping 192.168.4.1 and 192.168.1.170 :
Let me know if you need other info, and thanks again.