Working PiVPN/Wireguard now is dead, help!

I use PiVPN with Wireguard on my Raspberry Pi Zero 2 W. Until the day before yesterday everything works like a charm but now if I connect to my VPN outside from the LAN I can’t navigate even if I try to visit 1.1.1.1.
I also use Pi-hole with Unbound that acts like DHCP and DNS server.
Installed Dietpi version 8.2.2, what’s happened?

are you sure your DDNS is up-to-date, pointing to your external IP address correctly?`

Do you see an actual handshake for your client? If I’m not mistaken, PiVPN is offer a command to view this.

I’ve static public IP address and I can connect correctly to VPN, but I can’t surf the web when connected or I can’t ping devices in LAN (the Pi too).

I don’t know how to check this…

pivpn -d could show some helpful info

Pay attention before posting:

=============================================
:::: WARNING: This script should have automatically masked sensitive       ::::
:::: information, however, still make sure that PrivateKey, PublicKey      ::::
:::: and PresharedKey are masked before reporting an issue. An example key ::::
:::: that you should NOT see in this log looks like this:                  ::::
:::: YIAoJVsdIeyvXfGGDDadHh6AxsMRymZTnnzZoAb9cxRe                          ::::
=============================================

And you can also check the log of your VPN client, maybe there is some hint in there.

At https://docs.pivpn.io/faq/ are also some useful tips for troubleshooting connection issues, but this can be a bit overwhelming for unexperienced users.

Unfortunately the WireGuard Client app will always show connected, even if it isn’t correct. Best is to have a look into your Client app. At least on my Android mobile phone, I could open/save the application loge file. Usually there you should be able to see if the VPN tunnel could be established or not. Unfortunately the WireGuard server did not offer such logs.

This is the output of pivpn -d:

::: Generating Debug Output
::::		PiVPN debug		 ::::
=============================================
::::		Latest commit		 ::::
Branch: master
Commit: f80b0a7962d91862132c0a4abd65c1e67bd37bd7
Author: 4s3ti
Date: Fri Dec 3 21:41:13 2021 +0100
Summary: Update Changelog
=============================================
::::	    Installation settings    	 ::::
PLAT=Debian
OSCN=bullseye
USING_UFW=0
IPv4dev=wlan0
install_user=dietpi
install_home=/home/dietpi
VPN=wireguard
pivpnPORT=51xxx
pivpnDNS1=10.6.0.1
pivpnDNS2=
pivpnHOST=REDACTED
INPUT_CHAIN_EDITED=0
FORWARD_CHAIN_EDITED=0
pivpnPROTO=udp
pivpnMTU=1420
pivpnDEV=wg0
pivpnNET=10.6.0.0
subnetClass=24
ALLOWED_IPS="0.0.0.0/0, ::0/0"
UNATTUPG=0
INSTALLED_PACKAGES=(wireguard-tools qrencode)
=============================================
::::  Server configuration shown below   ::::
[Interface]
PrivateKey = server_priv
Address = 10.6.0.1/24
MTU = 1420
ListenPort = 51xxx
### begin Find-X2-Pro-di-Ivan ###
[Peer]
PublicKey = Find-X2-Pro-di-Ivan_pub
PresharedKey = Find-X2-Pro-di-Ivan_psk
AllowedIPs = 10.6.0.2/32
### end Find-X2-Pro-di-Ivan ###
### begin MBA-di-Ivan ###
[Peer]
PublicKey = MBA-di-Ivan_pub
PresharedKey = MBA-di-Ivan_psk
AllowedIPs = 10.6.0.3/32
### end MBA-di-Ivan ###
### begin iMac-di-Ivan ###
[Peer]
PublicKey = iMac-di-Ivan_pub
PresharedKey = iMac-di-Ivan_psk
AllowedIPs = 10.6.0.4/32
### end iMac-di-Ivan ###
### begin xps-9570 ###
[Peer]
PublicKey = xps-9570_pub
PresharedKey = xps-9570_psk
AllowedIPs = 10.6.0.6/32
### end xps-9570 ###
### begin black-bite ###
[Peer]
PublicKey = black-bite_pub
PresharedKey = black-bite_psk
AllowedIPs = 10.6.0.5/32
### end black-bite ###
=============================================
::::  Client configuration shown below   ::::
[Interface]
PrivateKey = Find-X2-Pro-di-Ivan_priv
Address = 10.6.0.2/24
DNS = 10.6.0.1

[Peer]
PublicKey = server_pub
PresharedKey = Find-X2-Pro-di-Ivan_psk
Endpoint = REDACTED:51xxx
AllowedIPs = 0.0.0.0/0, ::0/0
=============================================
:::: 	Recursive list of files in	 ::::
::::[4m/etc/wireguard shown below	 ::::
/etc/wireguard:
configs
keys
wg0.conf

/etc/wireguard/configs:
black-bite.conf
clients.txt
Find-X2-Pro-di-Ivan.conf
iMac-di-Ivan.conf
MBA-di-Ivan.conf
xps-9570.conf

/etc/wireguard/keys:
black-bite_priv
black-bite_psk
black-bite_pub
Find-X2-Pro-di-Ivan_priv
Find-X2-Pro-di-Ivan_psk
Find-X2-Pro-di-Ivan_pub
iMac-di-Ivan_priv
iMac-di-Ivan_psk
iMac-di-Ivan_pub
MBA-di-Ivan_priv
MBA-di-Ivan_psk
MBA-di-Ivan_pub
server_priv
server_pub
xps-9570_priv
xps-9570_psk
xps-9570_pub
=============================================
::::		Self check		 ::::
:: [OK] IP forwarding is enabled
:: [OK] Iptables MASQUERADE rule set
:: [OK] WireGuard is running
:: [OK] WireGuard is enabled (it will automatically start on reboot)
:: [OK] WireGuard is listening on port 51xxx/udp
=============================================
:::: Having trouble connecting? Take a look at the FAQ:
:::: https://docs.pivpn.io/faq
=============================================
:::: WARNING: This script should have automatically masked sensitive       ::::
:::: information, however, still make sure that PrivateKey, PublicKey      ::::
:::: and PresharedKey are masked before reporting an issue. An example key ::::
:::: that you should NOT see in this log looks like this:                  ::::
:::: YIAoJVsdIeyvXfGGDDadHh6AxsMRymZTnnzZoAb9cxRe                          ::::
=============================================
::::		Debug complete		 ::::
:::
::: Debug output completed above.
::: Copy saved to /tmp/debug.log
:::

If I connect to VPN from inside my LAN everything works.

This is log file of Android app:

--------- beginning of events
03-17 16:37:41.007  5161  5161 I wm_on_create_called: [218546682,com.wireguard.android.activity.TunnelToggleActivity,performCreate]
03-17 16:37:41.014  5161  5161 I wm_on_start_called: [218546682,com.wireguard.android.activity.TunnelToggleActivity,handleStartActivity]
03-17 16:37:41.024  5161  5161 I wm_on_resume_called: [218546682,com.wireguard.android.activity.TunnelToggleActivity,RESUME_ACTIVITY]
03-17 16:37:41.038  5161  5161 I wm_on_top_resumed_gained_called: [218546682,com.wireguard.android.activity.TunnelToggleActivity,topStateChangedWhenResumed]
03-17 16:37:41.038  5161  5161 I wm_on_restart_called: [140809424,com.wireguard.android.activity.MainActivity,performRestartActivity]
03-17 16:37:41.039  5161  5161 I wm_on_start_called: [140809424,com.wireguard.android.activity.MainActivity,handleStartActivity]
03-17 16:37:41.249  5161  5161 I wm_on_top_resumed_lost_called: [218546682,com.wireguard.android.activity.TunnelToggleActivity,topStateChangedWhenResumed]
03-17 16:37:41.253  5161  5161 I wm_on_paused_called: [218546682,com.wireguard.android.activity.TunnelToggleActivity,performPause]
03-17 16:37:41.262  5161  5161 I wm_on_resume_called: [140809424,com.wireguard.android.activity.MainActivity,LIFECYCLER_RESUME_ACTIVITY]
03-17 16:37:41.263  5161  5161 I wm_on_paused_called: [140809424,com.wireguard.android.activity.MainActivity,performPause]
03-17 16:37:41.263  5161  5161 I wm_on_stop_called: [140809424,com.wireguard.android.activity.MainActivity,LIFECYCLER_STOP_ACTIVITY]
03-17 16:37:41.265  5161  5161 I wm_on_destroy_called: [140809424,com.wireguard.android.activity.MainActivity,performDestroy]
03-17 16:37:41.327  5161  5161 I wm_on_stop_called: [218546682,com.wireguard.android.activity.TunnelToggleActivity,LIFECYCLER_STOP_ACTIVITY]
03-17 16:37:41.327  5161  5161 I wm_on_destroy_called: [218546682,com.wireguard.android.activity.TunnelToggleActivity,performDestroy]
03-17 16:37:51.273  5161  5161 I wm_on_create_called: [240327579,com.wireguard.android.activity.MainActivity,performCreate]
03-17 16:37:51.278  5161  5161 I wm_on_start_called: [240327579,com.wireguard.android.activity.MainActivity,handleStartActivity]
03-17 16:37:51.279  5161  5161 I wm_on_resume_called: [240327579,com.wireguard.android.activity.MainActivity,RESUME_ACTIVITY]
03-17 16:37:51.286  5161  5161 I wm_on_top_resumed_gained_called: [240327579,com.wireguard.android.activity.MainActivity,topStateChangedWhenResumed]
03-17 16:37:54.828  5161  5161 I menu_item_selected: [0,Impostazioni]
03-17 16:37:54.848  5161  5161 I wm_on_top_resumed_lost_called: [240327579,com.wireguard.android.activity.MainActivity,topStateChangedWhenResumed]
03-17 16:37:54.848  5161  5161 I wm_on_paused_called: [240327579,com.wireguard.android.activity.MainActivity,performPause]
03-17 16:37:54.862  5161  5161 I wm_on_create_called: [227398048,com.wireguard.android.activity.SettingsActivity,performCreate]
03-17 16:37:54.875  5161  5161 I wm_on_start_called: [227398048,com.wireguard.android.activity.SettingsActivity,handleStartActivity]
03-17 16:37:54.876  5161  5161 I wm_on_resume_called: [227398048,com.wireguard.android.activity.SettingsActivity,RESUME_ACTIVITY]
03-17 16:37:54.882  5161  5161 I wm_on_top_resumed_gained_called: [227398048,com.wireguard.android.activity.SettingsActivity,topStateChangedWhenResumed]
03-17 16:37:55.210  5161  5161 I wm_on_stop_called: [240327579,com.wireguard.android.activity.MainActivity,STOP_ACTIVITY_ITEM]
03-17 16:37:56.735  5161  5161 I wm_on_top_resumed_lost_called: [227398048,com.wireguard.android.activity.SettingsActivity,topStateChangedWhenResumed]
03-17 16:37:56.737  5161  5161 I wm_on_paused_called: [227398048,com.wireguard.android.activity.SettingsActivity,performPause]
03-17 16:37:56.752  5161  5161 I wm_on_create_called: [46008624,com.wireguard.android.activity.LogViewerActivity,performCreate]
03-17 16:37:56.753  5161  5161 I wm_on_start_called: [46008624,com.wireguard.android.activity.LogViewerActivity,handleStartActivity]
03-17 16:37:56.753  5161  5161 I wm_on_resume_called: [46008624,com.wireguard.android.activity.LogViewerActivity,RESUME_ACTIVITY]
03-17 16:37:56.757  5161  5161 I wm_on_top_resumed_gained_called: [46008624,com.wireguard.android.activity.LogViewerActivity,topStateChangedWhenResumed]
03-17 16:37:57.089  5161  5161 I wm_on_stop_called: [227398048,com.wireguard.android.activity.SettingsActivity,STOP_ACTIVITY_ITEM]
03-17 16:38:21.536  5161  5161 I wm_on_top_resumed_lost_called: [46008624,com.wireguard.android.activity.LogViewerActivity,topStateChangedWhenResumed]
03-17 16:38:21.538  5161  5161 I wm_on_paused_called: [46008624,com.wireguard.android.activity.LogViewerActivity,performPause]
03-17 16:38:21.591  5161  5161 I wm_on_restart_called: [227398048,com.wireguard.android.activity.SettingsActivity,performRestartActivity]
03-17 16:38:21.591  5161  5161 I wm_on_start_called: [227398048,com.wireguard.android.activity.SettingsActivity,handleStartActivity]
03-17 16:38:21.592  5161  5161 I wm_on_resume_called: [227398048,com.wireguard.android.activity.SettingsActivity,RESUME_ACTIVITY]
03-17 16:38:21.592  5161  5161 I wm_on_top_resumed_gained_called: [227398048,com.wireguard.android.activity.SettingsActivity,topWhenResuming]
03-17 16:38:21.855  5161  5161 I wm_on_stop_called: [46008624,com.wireguard.android.activity.LogViewerActivity,LIFECYCLER_STOP_ACTIVITY]
03-17 16:38:21.856  5161  5161 I wm_on_destroy_called: [46008624,com.wireguard.android.activity.LogViewerActivity,performDestroy]
03-17 16:38:23.412  5161  5161 I wm_on_top_resumed_lost_called: [227398048,com.wireguard.android.activity.SettingsActivity,topStateChangedWhenResumed]
03-17 16:38:23.413  5161  5161 I wm_on_paused_called: [227398048,com.wireguard.android.activity.SettingsActivity,performPause]
03-17 16:38:23.440  5161  5161 I wm_on_restart_called: [240327579,com.wireguard.android.activity.MainActivity,performRestartActivity]
03-17 16:38:23.440  5161  5161 I wm_on_start_called: [240327579,com.wireguard.android.activity.MainActivity,handleStartActivity]
03-17 16:38:23.441  5161  5161 I wm_on_resume_called: [240327579,com.wireguard.android.activity.MainActivity,RESUME_ACTIVITY]
03-17 16:38:23.442  5161  5161 I wm_on_top_resumed_gained_called: [240327579,com.wireguard.android.activity.MainActivity,topWhenResuming]
03-17 16:38:23.686  5161  5161 I wm_on_stop_called: [227398048,com.wireguard.android.activity.SettingsActivity,LIFECYCLER_STOP_ACTIVITY]
03-17 16:38:23.688  5161  5161 I wm_on_destroy_called: [227398048,com.wireguard.android.activity.SettingsActivity,performDestroy]
03-17 16:38:30.185  5161  5161 I menu_item_selected: [0,Impostazioni]
03-17 16:38:30.209  5161  5161 I wm_on_top_resumed_lost_called: [240327579,com.wireguard.android.activity.MainActivity,topStateChangedWhenResumed]
03-17 16:38:30.210  5161  5161 I wm_on_paused_called: [240327579,com.wireguard.android.activity.MainActivity,performPause]
03-17 16:38:30.218  5161  5161 I wm_on_create_called: [172343366,com.wireguard.android.activity.SettingsActivity,performCreate]
03-17 16:38:30.225  5161  5161 I wm_on_start_called: [172343366,com.wireguard.android.activity.SettingsActivity,handleStartActivity]
03-17 16:38:30.226  5161  5161 I wm_on_resume_called: [172343366,com.wireguard.android.activity.SettingsActivity,RESUME_ACTIVITY]
03-17 16:38:30.232  5161  5161 I wm_on_top_resumed_gained_called: [172343366,com.wireguard.android.activity.SettingsActivity,topStateChangedWhenResumed]
03-17 16:38:30.537  5161  5161 I wm_on_stop_called: [240327579,com.wireguard.android.activity.MainActivity,STOP_ACTIVITY_ITEM]
03-17 16:38:31.614  5161  5161 I wm_on_top_resumed_lost_called: [172343366,com.wireguard.android.activity.SettingsActivity,topStateChangedWhenResumed]
03-17 16:38:31.615  5161  5161 I wm_on_paused_called: [172343366,com.wireguard.android.activity.SettingsActivity,performPause]
03-17 16:38:31.633  5161  5161 I wm_on_create_called: [179371109,com.wireguard.android.activity.LogViewerActivity,performCreate]
03-17 16:38:31.633  5161  5161 I wm_on_start_called: [179371109,com.wireguard.android.activity.LogViewerActivity,handleStartActivity]
03-17 16:38:31.633  5161  5161 I wm_on_resume_called: [179371109,com.wireguard.android.activity.LogViewerActivity,RESUME_ACTIVITY]
03-17 16:38:31.638  5161  5161 I wm_on_top_resumed_gained_called: [179371109,com.wireguard.android.activity.LogViewerActivity,topStateChangedWhenResumed]
03-17 16:38:31.989  5161  5161 I wm_on_stop_called: [172343366,com.wireguard.android.activity.SettingsActivity,STOP_ACTIVITY_ITEM]
03-17 16:38:34.744  5161  5161 I menu_item_selected: [0,Esporta file di log]
03-17 16:38:46.822  5161  5161 I wm_on_top_resumed_lost_called: [179371109,com.wireguard.android.activity.LogViewerActivity,topStateChangedWhenResumed]
03-17 16:38:46.823  5161  5161 I wm_on_paused_called: [179371109,com.wireguard.android.activity.LogViewerActivity,performPause]
03-17 16:38:46.839  5161  5161 I wm_on_restart_called: [172343366,com.wireguard.android.activity.SettingsActivity,performRestartActivity]
03-17 16:38:46.839  5161  5161 I wm_on_start_called: [172343366,com.wireguard.android.activity.SettingsActivity,handleStartActivity]
03-17 16:38:46.840  5161  5161 I wm_on_resume_called: [172343366,com.wireguard.android.activity.SettingsActivity,RESUME_ACTIVITY]
03-17 16:38:46.840  5161  5161 I wm_on_top_resumed_gained_called: [172343366,com.wireguard.android.activity.SettingsActivity,topWhenResuming]
03-17 16:38:47.099  5161  5161 I wm_on_stop_called: [179371109,com.wireguard.android.activity.LogViewerActivity,LIFECYCLER_STOP_ACTIVITY]
03-17 16:38:47.100  5161  5161 I wm_on_destroy_called: [179371109,com.wireguard.android.activity.LogViewerActivity,performDestroy]
03-17 16:38:48.113  5161  5161 I wm_on_top_resumed_lost_called: [172343366,com.wireguard.android.activity.SettingsActivity,topStateChangedWhenResumed]
03-17 16:38:48.114  5161  5161 I wm_on_paused_called: [172343366,com.wireguard.android.activity.SettingsActivity,performPause]
03-17 16:38:48.134  5161  5161 I wm_on_restart_called: [240327579,com.wireguard.android.activity.MainActivity,performRestartActivity]
03-17 16:38:48.134  5161  5161 I wm_on_start_called: [240327579,com.wireguard.android.activity.MainActivity,handleStartActivity]
03-17 16:38:48.134  5161  5161 I wm_on_resume_called: [240327579,com.wireguard.android.activity.MainActivity,RESUME_ACTIVITY]
03-17 16:38:48.134  5161  5161 I wm_on_top_resumed_gained_called: [240327579,com.wireguard.android.activity.MainActivity,topWhenResuming]
03-17 16:38:48.383  5161  5161 I wm_on_stop_called: [172343366,com.wireguard.android.activity.SettingsActivity,LIFECYCLER_STOP_ACTIVITY]
03-17 16:38:48.387  5161  5161 I wm_on_destroy_called: [172343366,com.wireguard.android.activity.SettingsActivity,performDestroy]
03-17 16:38:54.878  5161  5161 I wm_on_top_resumed_lost_called: [240327579,com.wireguard.android.activity.MainActivity,topStateChangedWhenResumed]
03-17 16:38:54.900  5161  5161 I wm_on_paused_called: [240327579,com.wireguard.android.activity.MainActivity,performPause]
03-17 16:38:54.939  5161  5161 I wm_on_stop_called: [240327579,com.wireguard.android.activity.MainActivity,STOP_ACTIVITY_ITEM]
03-17 16:40:41.081  5161  5161 I wm_on_create_called: [171013878,com.wireguard.android.activity.TunnelToggleActivity,performCreate]
03-17 16:40:41.086  5161  5161 I wm_on_start_called: [171013878,com.wireguard.android.activity.TunnelToggleActivity,handleStartActivity]
03-17 16:40:41.093  5161  5161 I wm_on_resume_called: [171013878,com.wireguard.android.activity.TunnelToggleActivity,RESUME_ACTIVITY]
03-17 16:40:41.110  5161  5161 I wm_on_top_resumed_gained_called: [171013878,com.wireguard.android.activity.TunnelToggleActivity,topStateChangedWhenResumed]
03-17 16:40:41.111  5161  5161 I wm_on_restart_called: [240327579,com.wireguard.android.activity.MainActivity,performRestartActivity]
03-17 16:40:41.111  5161  5161 I wm_on_start_called: [240327579,com.wireguard.android.activity.MainActivity,handleStartActivity]
--------- beginning of system
03-17 16:40:41.111  5161  5161 I Quality : Skipped: false 4
03-17 16:40:41.135  5161  5161 V OplusZoomWindowDecorViewHelper: setLastReportedMergedConfiguration mZoomDisplayHeight: 3168 getDecorView.162251974
03-17 16:40:41.145  5161  5161 I Quality : Skipped: false 3
03-17 16:40:41.188  5161  5161 I Quality : Skipped: true 3
03-17 16:40:41.308  5161  5161 I Quality : Skipped: false 8
03-17 16:40:41.310  5161  5161 I wm_on_top_resumed_lost_called: [171013878,com.wireguard.android.activity.TunnelToggleActivity,topStateChangedWhenResumed]
03-17 16:40:41.310  5161  5161 I wm_on_paused_called: [171013878,com.wireguard.android.activity.TunnelToggleActivity,performPause]
03-17 16:40:41.334  5161  5161 I wm_on_resume_called: [240327579,com.wireguard.android.activity.MainActivity,LIFECYCLER_RESUME_ACTIVITY]
03-17 16:40:41.335  5161  5161 I wm_on_paused_called: [240327579,com.wireguard.android.activity.MainActivity,performPause]
03-17 16:40:41.335  5161  5161 I wm_on_stop_called: [240327579,com.wireguard.android.activity.MainActivity,LIFECYCLER_STOP_ACTIVITY]
03-17 16:40:41.337  5161  5161 I wm_on_destroy_called: [240327579,com.wireguard.android.activity.MainActivity,performDestroy]
03-17 16:40:41.338  5161  5161 V OplusZoomWindowDecorViewHelper: removeZoomView
03-17 16:40:41.343  5161  5161 I Quality : Skipped: true 3
03-17 16:40:41.375  5161  5161 I wm_on_stop_called: [171013878,com.wireguard.android.activity.TunnelToggleActivity,LIFECYCLER_STOP_ACTIVITY]
03-17 16:40:41.375  5161  5161 I wm_on_destroy_called: [171013878,com.wireguard.android.activity.TunnelToggleActivity,performDestroy]
03-17 16:40:41.375  5161  5161 V OplusZoomWindowDecorViewHelper: removeZoomView
03-17 16:41:14.714  5161  5161 I Quality : Skipped: true 7
--------- beginning of main
03-17 16:43:01.583  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:01.583  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:01.583  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:01.588  5161  5161 I wm_on_create_called: [77025930,com.wireguard.android.activity.MainActivity,performCreate]
03-17 16:43:01.590  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:01.590  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:01.590  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:01.596  5161  5161 I wm_on_start_called: [77025930,com.wireguard.android.activity.MainActivity,handleStartActivity]
03-17 16:43:01.597  5161  5161 I wm_on_resume_called: [77025930,com.wireguard.android.activity.MainActivity,RESUME_ACTIVITY]
03-17 16:43:01.606  5161  5161 I wm_on_top_resumed_gained_called: [77025930,com.wireguard.android.activity.MainActivity,topStateChangedWhenResumed]
03-17 16:43:01.607  5161  5161 I Quality : Skipped: false 1
03-17 16:43:01.619  5161  5161 V OplusZoomWindowDecorViewHelper: setLastReportedMergedConfiguration mZoomDisplayHeight: 3168 getDecorView.92431286
03-17 16:43:01.648  5161  5161 I Quality : Skipped: false 4
03-17 16:43:01.650  5161  5188 D SurfaceComposerClient: VRR [FRTC] client handle [bufferId:18446744073709551615 framenumber:0] [ffffffff, ffffffff]
03-17 16:43:02.758  5161  5234 I WireGuard/GoBackend: Bringing tunnel trmon UP
03-17 16:43:02.761  5161  5234 D WireGuard/GoBackend: Requesting to start VpnService
03-17 16:43:02.832  5161  5234 D WireGuard/GoBackend: Go backend eb6302c
03-17 16:43:02.832  5161  5234 D WireGuard/GoBackend/trmon: Attaching to interface tun0
03-17 16:43:02.832  5161  5234 D WireGuard/GoBackend/trmon: UAPI: Updating private key
03-17 16:43:02.833  5161  5364 D WireGuard/GoBackend/trmon: Routine: decryption worker 2 - started
03-17 16:43:02.833  5161  5364 D WireGuard/GoBackend/trmon: Routine: encryption worker 1 - started
03-17 16:43:02.833  5161  5257 D WireGuard/GoBackend/trmon: Routine: handshake worker 3 - started
03-17 16:43:02.833  5161  5364 D WireGuard/GoBackend/trmon: Routine: decryption worker 1 - started
03-17 16:43:02.833  5161  5257 D WireGuard/GoBackend/trmon: Routine: handshake worker 2 - started
03-17 16:43:02.833  5161  5364 D WireGuard/GoBackend/trmon: Routine: handshake worker 1 - started
03-17 16:43:02.833  5161  5257 D WireGuard/GoBackend/trmon: Routine: encryption worker 3 - started
03-17 16:43:02.833  5161  5364 D WireGuard/GoBackend/trmon: Routine: encryption worker 2 - started
03-17 16:43:02.833  5161  5257 D WireGuard/GoBackend/trmon: Routine: decryption worker 3 - started
03-17 16:43:02.833  5161  5257 D WireGuard/GoBackend/trmon: Routine: encryption worker 4 - started
03-17 16:43:02.833  5161  5364 D WireGuard/GoBackend/trmon: Routine: decryption worker 4 - started
03-17 16:43:02.833  5161  5253 D WireGuard/GoBackend/trmon: Routine: handshake worker 4 - started
03-17 16:43:02.833  5161  5234 D WireGuard/GoBackend/trmon: UAPI: Removing all peers
03-17 16:43:02.833  5161  5364 D WireGuard/GoBackend/trmon: Routine: event worker - started
03-17 16:43:02.833  5161  5257 D WireGuard/GoBackend/trmon: Routine: TUN reader - started
03-17 16:43:02.834  5161  5234 D WireGuard/GoBackend/trmon: peer(ECx0…v/lc) - UAPI: Created
03-17 16:43:02.834  5161  5234 D WireGuard/GoBackend/trmon: peer(ECx0…v/lc) - UAPI: Adding allowedip
03-17 16:43:02.834  5161  5234 D WireGuard/GoBackend/trmon: peer(ECx0…v/lc) - UAPI: Adding allowedip
03-17 16:43:02.834  5161  5234 D WireGuard/GoBackend/trmon: peer(ECx0…v/lc) - UAPI: Updating endpoint
03-17 16:43:02.834  5161  5234 D WireGuard/GoBackend/trmon: peer(ECx0…v/lc) - UAPI: Updating preshared key
03-17 16:43:02.835  5161  5234 D WireGuard/GoBackend/trmon: UDP bind has been updated
03-17 16:43:02.836  5161  5234 D WireGuard/GoBackend/trmon: peer(ECx0…v/lc) - Starting
03-17 16:43:02.836  5161  5234 D WireGuard/GoBackend/trmon: Interface state was Down, requested Up, now Up
03-17 16:43:02.836  5161  5234 D WireGuard/GoBackend/trmon: Device started
03-17 16:43:02.836  5161  5364 D WireGuard/GoBackend/trmon: peer(ECx0…v/lc) - Routine: sequential sender - started
03-17 16:43:02.836  5161  5364 D WireGuard/GoBackend/trmon: Routine: receive incoming v4 - started
03-17 16:43:02.836  5161  5253 D WireGuard/GoBackend/trmon: Routine: receive incoming v6 - started
03-17 16:43:02.836  5161  5364 D WireGuard/GoBackend/trmon: peer(ECx0…v/lc) - Routine: sequential receiver - started
03-17 16:43:02.868  5161  5365 D WireGuard/GoBackend/trmon: peer(ECx0…v/lc) - Sending handshake initiation
03-17 16:43:02.880  5161  5365 D WireGuard/GoBackend/trmon: peer(ECx0…v/lc) - Received handshake response
03-17 16:43:03.802  5161  5161 I menu_item_selected: [0,Impostazioni]
03-17 16:43:03.816  5161  5161 I wm_on_top_resumed_lost_called: [77025930,com.wireguard.android.activity.MainActivity,topStateChangedWhenResumed]
03-17 16:43:03.817  5161  5161 I wm_on_paused_called: [77025930,com.wireguard.android.activity.MainActivity,performPause]
03-17 16:43:03.828  5161  5161 I wm_on_create_called: [234839051,com.wireguard.android.activity.SettingsActivity,performCreate]
03-17 16:43:03.831  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:03.831  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:03.831  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:03.838  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:03.838  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:03.838  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:03.839  5161  5161 I wm_on_start_called: [234839051,com.wireguard.android.activity.SettingsActivity,handleStartActivity]
03-17 16:43:03.839  5161  5161 I wm_on_resume_called: [234839051,com.wireguard.android.activity.SettingsActivity,RESUME_ACTIVITY]
03-17 16:43:03.844  5161  5161 I wm_on_top_resumed_gained_called: [234839051,com.wireguard.android.activity.SettingsActivity,topStateChangedWhenResumed]
03-17 16:43:03.845  5161  5161 I Quality : Skipped: false 1
03-17 16:43:03.852  5161  5161 V OplusZoomWindowDecorViewHelper: setLastReportedMergedConfiguration mZoomDisplayHeight: 3168 getDecorView.29442754
03-17 16:43:03.878  5161  5188 D SurfaceComposerClient: VRR [FRTC] client handle [bufferId:18446744073709551615 framenumber:0] [ffffffff, ffffffff]
03-17 16:43:04.162  5161  5296 D OpenGLRenderer: endAllActiveAnimators on 0xb400007a030d5200 (RippleDrawable) with handle 0xb400007ab0825d40
03-17 16:43:04.166  5161  5161 I wm_on_stop_called: [77025930,com.wireguard.android.activity.MainActivity,STOP_ACTIVITY_ITEM]
03-17 16:43:06.989  5161  5161 I wm_on_top_resumed_lost_called: [234839051,com.wireguard.android.activity.SettingsActivity,topStateChangedWhenResumed]
03-17 16:43:06.990  5161  5161 I wm_on_paused_called: [234839051,com.wireguard.android.activity.SettingsActivity,performPause]
03-17 16:43:06.999  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:06.999  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:06.999  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:07.003  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:07.003  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:07.003  5161  5161 I oplus.android.OplusFrameworkFactoryImpl: get feature:IOplusDynamicVsyncFeature
03-17 16:43:07.005  5161  5161 I wm_on_create_called: [258466013,com.wireguard.android.activity.LogViewerActivity,performCreate]
03-17 16:43:07.006  5161  5161 I wm_on_start_called: [258466013,com.wireguard.android.activity.LogViewerActivity,handleStartActivity]
03-17 16:43:07.006  5161  5161 I wm_on_resume_called: [258466013,com.wireguard.android.activity.LogViewerActivity,RESUME_ACTIVITY]
03-17 16:43:07.010  5161  5161 I wm_on_top_resumed_gained_called: [258466013,com.wireguard.android.activity.LogViewerActivity,topStateChangedWhenResumed]
03-17 16:43:07.010  5161  5161 I Quality : Skipped: false 1
03-17 16:43:07.015  5161  5161 V OplusZoomWindowDecorViewHelper: setLastReportedMergedConfiguration mZoomDisplayHeight: 3168 getDecorView.245055308
03-17 16:43:07.027  5161  5188 D SurfaceComposerClient: VRR [FRTC] client handle [bufferId:18446744073709551615 framenumber:0] [ffffffff, ffffffff]
03-17 16:43:07.300  5161  5296 D OpenGLRenderer: endAllActiveAnimators on 0xb400007aaf190400 (RippleDrawable) with handle 0xb400007ab0825d40
03-17 16:43:07.323  5161  5161 I wm_on_stop_called: [234839051,com.wireguard.android.activity.SettingsActivity,STOP_ACTIVITY_ITEM]
03-17 16:43:08.962  5161  5161 I menu_item_selected: [0,Esporta file di log]

Seems that there are mutual handshakes so the connection is established.

I believe there should be wg show or something like that showing the last handshake. Apart from that, wireguard is very quiet and won’t maintain any unnecessary communication, unless it is for nat traversing.

pivpn -c should show all connected clients.

This is the pivpn -c output:

root@trmon:~# pivpn -c
::: Connected Clients List :::
Name                     Remote IP               Virtual IP      Bytes Received      Bytes Sent      Last Seen
Find-X2-Pro-di-Ivan      93.xx.40.xx:38xxx      10.6.0.2        455KiB              5,4MiB          mar 17 2022 - 16:43:02
MBA-di-Ivan              (none)                  10.6.0.3        0B                  0B              (not yet)
iMac-di-Ivan             (none)                  10.6.0.4        0B                  0B              (not yet)
xps-9570                 (none)                  10.6.0.6        0B                  0B              (not yet)
black-bite               (none)                  10.6.0.5        0B                  0B              (not yet)
::: Disabled clients :::

for sake of testing, I connected my Android smartphone (Find-X2-Pro-di-Ivan) to VPN while it was connected to 5G… While connected to VPN it can’t navigate the web nor ping or connect to other devices in LAN.

  1. make sure the phone tunnels everything to the Pi.
  2. on the pi check for masquerade on eth interface, that ip_forwarding is enabled, and that nothing is blocking on the firewall.
  1. I’ve same problem on every device, not just for phone…
  2. How can I check all these things, please?
  1. Still, you need to verify that.
  2. iptables-save -c; cat /proc/sys/net/ipv4/ip_forward

Usually it should be possible to access the DietPi device running PiVPN via IP address 10.6.0.1. Even if IP forwarding is not correctly set.

Output:

# Generated by iptables-save v1.8.7 on Fri Mar 18 13:18:19 2022
*nat
:PREROUTING ACCEPT [208609:25395795]
:INPUT ACCEPT [208384:25361075]
:OUTPUT ACCEPT [100762:8289690]
:POSTROUTING ACCEPT [100762:8289690]
[112:31104] -A POSTROUTING -s 10.6.0.0/24 -o wlan0 -m comment --comment wireguard-nat-rule -j MASQUERADE
COMMIT
# Completed on Fri Mar 18 13:18:19 2022
1

That is correct and there are hits on the firewall with the packets being NATed. You could run a packet capture to see what can be the issue:
apt update; apt install tcpdump; tcpdump -i wlan0 -evn host 8.8.4.4
Then start a ping from a WG client, or try to access from browser the page http://8.8.4.4

better to test with https://1.1.1.1/ instead of 8.8.4.4.

Anyway try to reach the VPN server (on VPN server IP 10.6.0.1) first, before going to try something on internet.

If I try to ping 10.6.0.1 from inside the LAN, I can reach the VPN server but if I try from outside the LAN the server doesn’t respond to ping.

ok let’s try it the other way around.

  1. Switch your mobile phone to use mobile network
  2. Activate WireGuard inside the app on your mobile phone
  3. go to the PiVPN server
  4. try to ping your mobile phone 10.6.0.2

is it working this way?

Btw: do you have just PiVPN installed or any other VPN solution in addition?

Done, no ping from server to client…