Installed Wireguard on my router (Rpi), using this guide:
https://openwrt.org/docs/guide-user/services/vpn/wireguard/server
Set the mobile app with QR code and I cannot connect in.
I did the same for OpenVPN and following guide worked straight away, I can connect using port 1194.
One difference I see is that Wireguard uses its own interface while OpenVPN uses only tun0.
Ports for both services are opened the same way.
Ports are opened on my public IP:
$nmap -sU -p51820
PORT STATE SERVICE
51820/udp open|filtered unknown
This is my interfaces of boh VPNs:
6: vpn: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN qlen 1000
link/[65534]
inet 192.168.8.1/24 brd 192.168.8.255 scope global vpn
valid_lft forever preferred_lft forever
7: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 500
link/[65534]
inet 192.168.9.1/24 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::b79:f75d:a1b7:b5d3/64 scope link flags 800
valid_lft forever preferred_lft forever
This is the client configuration on the router:
[Interface]
PrivateKey = $$$$$$$$$$$$$$$$$
# Address not defined
# ListenPort not defined
DNS = 192.168.0.1
[Peer]
PublicKey = $$$$
PresharedKey = $$$$
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = $mypublicip:51820
# PersistentKeepAlive not defined
Client has Addresses set to 192.168.8.11/24
Nothing in the logs on the router. Device logs have only this:
05-25 13:49:35.822 4189 4189 I menu_item_selected: [0,Settings]
05-25 13:49:36.809 4189 4189 I binder_sample: [android.app.IActivityTaskManager,1,985,com.wireguard.android,100]
05-25 13:49:36.809 4189 4189 I Quality : SlowBinder: com.wireguard.android to android.app.IActivityTaskManager cost= 985 code= 1
05-25 13:49:36.811 4189 4189 I Quality : Skipped: true 58
05-25 13:49:36.812 4189 4189 I wm_on_top_resumed_lost_called: [37001856,com.wireguard.android.activity.MainActivity,topStateChangedWhenResumed]
05-25 13:49:36.879 4189 4189 I wm_on_paused_called: [37001856,com.wireguard.android.activity.MainActivity,performPause]
05-25 13:49:37.501 4189 4189 I binder_sample: [android.app.IActivityTaskManager,21,622,com.wireguard.android,100]
05-25 13:49:37.501 4189 4189 I Quality : SlowBinder: com.wireguard.android to android.app.IActivityTaskManager cost= 622 code= 21
05-25 13:49:37.504 4189 4189 I Quality : Skipped: false 41
05-25 13:49:37.736 4189 4189 I wm_on_create_called: [229653284,com.wireguard.android.activity.SettingsActivity,performCreate]
05-25 13:49:38.789 4189 4189 I wm_on_start_called: [229653284,com.wireguard.android.activity.SettingsActivity,handleStartActivity]
05-25 13:49:38.810 4189 4189 I wm_on_resume_called: [229653284,com.wireguard.android.activity.SettingsActivity,RESUME_ACTIVITY]
05-25 13:49:39.304 4189 4189 I Quality : Blocked msg = Package name: com.wireguard.android [ schedGroup: 5 schedPolicy: 0 ] process the message: { when=-1s956ms what=159 target=android.app.ActivityThread$H obj=ClientTransaction LaunchActivityItem,ResumeActivityItem } took 1743 ms
05-25 13:49:39.305 4189 4189 I wm_on_top_resumed_gained_called: [229653284,com.wireguard.android.activity.SettingsActivity,topStateChangedWhenResumed]
05-25 13:49:39.305 4189 4189 I Quality : Skipped: false 107
05-25 13:49:40.005 4189 4189 I Quality : Skipped: false 41
05-25 13:49:40.407 4189 4189 I Quality : Skipped: false 9
05-25 13:49:40.563 4189 4189 I wm_on_stop_called: [37001856,com.wireguard.android.activity.MainActivity,STOP_ACTIVITY_ITEM]
05-25 13:49:40.625 4189 4189 I Quality : Skipped: false 2
Anything else to check on?