Pi-Hole-on-Google-Compute-Engine-Free-Tier-with-Full-Tunnel-and-Split-Tunnel-Wireguard-VPN-Configs icon indicating copy to clipboard operation
Pi-Hole-on-Google-Compute-Engine-Free-Tier-with-Full-Tunnel-and-Split-Tunnel-Wireguard-VPN-Configs copied to clipboard

mtu set too high

Open hyber-code opened this issue 4 years ago • 2 comments

ISSUE

some times the wireguard client sets mtu=8920 which is too high and as a result some devices does not load sites and other data properly,

i manually changed the mtu by going to following directory

cd /sys/class/net/wg0
nano mtu
and changing the value to 1380

can this be made the default value ?

it took me hours the catch the issue on one of my networks.

hyber-code avatar Oct 19 '20 06:10 hyber-code

it has something to do with following lines in your script

# Read MTU value
	if [ -f "/sys/class/net/${SERVER_WG_NIC}/mtu" ]; then
		CLIENT_MTU="MTU = $(cat /sys/class/net/${SERVER_WG_NIC}/mtu)"

hyber-code avatar Oct 19 '20 06:10 hyber-code

I will look into this... for google compute engine it may make sense to set the MTU on the interface as well:

 sudo ip link set dev wg0 mtu 1360

What is the best way to read and set the correct MTU value on the server, and config files? Do you have any thoughts around this?

rajannpatel avatar Oct 20 '20 14:10 rajannpatel