I had setup a Wireguard server on my Win 10 PC to access my home network by following this youtube tutorial.
Server config
[Interface]
PrivateKey = server-private
ListenPort = 51820
Address = 192.168.200.1/24
[Peer]
PublicKey = client-public
AllowedIPs = 192.168.200.2/32
I tried connecting to the server via Android Wireguard client
Client config
[Interface]
PrivateKey = client-private
Address = 192.168.200.2/24
DNS = 8.8.8.8, 1.1.1.1
[Peer]
PublicKey = server-public
AllowedIPs = 0.0.0.0/0
Endpoint = server.public.ip:51820
I had enabled port-forwarding
on the router on port 51820
to my Win 10 PC internal static ip port 51820
I had also connected my home wifi adapter to the wireguard interface adapter (Wireguard_Server)
by right clicking on wifi adapter --> Properties --> Sharing --> Check both the check boxes to allow my Wireguard_Server
home networking connection.
The client was able to connect to my Server and successfully access home network from public internet and also able to browse Internet via my home network.
The problem started when my home PC got restarted. I was able to establish wireguard connection from client to Server but I can't access any other resource on my home network nor connect to Internet.
How to fix this issue?
Technically, the devices connected in WireGuard interfaces are peers. But Server-Client is easy to understand for me and I went with that