Thanks for all the advice.
I set up another sys-vpn with the IVPN App exatly via the guide IVPN App 4.2 setup guide.
But left out the DNS hardening Part. I tried to ping 9.9.9.9 and forum.qubes-os.org and had a connection. Therefore MTU Issue.
When setting the MTU value manually in the IVPN App the max. value is 1392, after that the connection breaks. I also used the script from @solene to avoid issues with wireguard.
I found this in a guide about Wireguard: Silvio's Blog - WireGuard and MTU/MSS: Prevent Packet Loss on Your Linux Router
MSS Clamping: Preventing Packet Loss
MSS clamping is crucial when routing between interfaces with different MTUs. It prevents your router from sending packets that are too large for the receiving interface.
Example:
- Physical Interface: MTU = 1500, MSS = 1460
- WireGuard Interface: MTU = 1420, MSS = 1360
Without clamping, packets between 1360 and 1460 bytes would be accepted by the router but dropped by the receiving device.
How to Implement MSS Clamping:
Using iptables
:
iptables -A FORWARD -o <device_name> -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1360
ip6tables -A FORWARD -o <device_name> -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1360
iptables -A OUTPUT -o <device_name> -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1360
ip6tables -A OUTPUT -o <device_name> -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1360
Using WireGuard Configuration:
[Interface]
...
PostUp = ip6tables -A FORWARD -o <device_name> -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1360 && ip6tables -A OUTPUT -o <device_name> -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1360 && iptables -A FORWARD -o <device_name> -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1360 && iptables -A OUTPUT -o <device_name> -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1360
PostDown = ip6tables -D FORWARD -o <device_name> -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1360 && ip6tables -D OUTPUT -o <device_name> -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1360 && iptables -D FORWARD -o <device_name> -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1360 && iptables -D OUTPUT -o <device_name> -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1360
Remember to replace with your WireGuard interface name.
By understanding and correctly configuring MTU and MSS, you can ensure your WireGuard VPN performs optimally and avoids packet loss, providing a smooth and reliable network experience.`
`
—But from my understandig the script would also just set the MTU value at 1360, knowing you have to convert it into nftables.
Is there a disadvantage from using a fixed MTU value?
I am not able to write scripts but is there a way to fix this issue?