From b3ff328afc56bf449c022454f9a1243f167ce742 Mon Sep 17 00:00:00 2001 From: Jakub Lansky Date: Wed, 8 Jan 2025 08:33:55 +0100 Subject: [PATCH] Fix default MTU to 1420 as it has Wireguard kernel module set by default. --- README.md | 2 +- templates/global_settings.html | 2 +- util/config.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 74c446e..2f9da80 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ docker-compose up | `WGUI_ENDPOINT_ADDRESS` | The default endpoint address used in global settings where clients should connect to. The endpoint can contain a port as well, useful when you are listening internally on the `WGUI_SERVER_LISTEN_PORT` port, but you forward on another port (ex 9000). Ex: myvpn.dyndns.com:9000 | Resolved to your public ip address | | `WGUI_FAVICON_FILE_PATH` | The file path used as website favicon | Embedded WireGuard logo | | `WGUI_DNS` | The default DNS servers (comma-separated-list) used in the global settings | `1.1.1.1` | -| `WGUI_MTU` | The default MTU used in global settings | `1450` | +| `WGUI_MTU` | The default MTU used in global settings | `1420` | | `WGUI_PERSISTENT_KEEPALIVE` | The default persistent keepalive for WireGuard in global settings | `15` | | `WGUI_FIREWALL_MARK` | The default WireGuard firewall mark | `0xca6c` (51820) | | `WGUI_TABLE` | The default WireGuard table value settings | `auto` | diff --git a/templates/global_settings.html b/templates/global_settings.html index 73b3c93..f708443 100644 --- a/templates/global_settings.html +++ b/templates/global_settings.html @@ -97,7 +97,7 @@ Global Settings
2. DNS Servers
The DNS servers will be set to client config.
3. MTU
-
The MTU will be set to server and client config. By default it is 1450. You might want +
The MTU will be set to server and client config. By default it is 1420. You might want to adjust the MTU size if your connection (e.g PPPoE, 3G, satellite network, etc) has a low MTU.
Leave blank to omit this setting in the configs.
4. Persistent Keepalive
diff --git a/util/config.go b/util/config.go index 4af6bd2..722fa03 100644 --- a/util/config.go +++ b/util/config.go @@ -37,7 +37,7 @@ const ( DefaultServerAddress = "10.252.1.0/24" DefaultServerPort = 51820 DefaultDNS = "1.1.1.1" - DefaultMTU = 1450 + DefaultMTU = 1420 DefaultPersistentKeepalive = 15 DefaultFirewallMark = "0xca6c" // i.e. 51820 DefaultTable = "auto"