Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add MTU option #173

Closed
wants to merge 1 commit into from
Closed

Conversation

alexandre-abrioux
Copy link

Hi! First of all I would like to thank you for maintaining this very cool project. It makes it so easy to set-up a VPN and has been working like a charm for us.

Context

If you're hosting your Wireguard server on Google Cloud platform you will encounter issues when accessing services protected by TLS or SSL, even more so if your internet service provider is using IPV6. This is due to the fact that GCP has a MTU allowance of 1460 bytes, which is too low for packets encrypted by Wireguard with its default MTU of 1420.

To solve this users have to manually edit their Wireguard configuration file and add the following line under the [Interface] section:

MTU = 1360

See several sources talking about this issue:

Changes

I tried to start a PR in order to add a new WG_WIREGUARD_MTU configuration to resolve this. However I have no experience at all in Go, so I'm just spitballing here in the changes I made. The gRPC code has been manually edited because I was not able to successfully run the command ./codegen.sh.

This PR was not tested. It looks complete but please consider this as a work in progress. If someone could take over to bring this feature to the finish line, it would be awesome!

Thanks!

PS: this would fix #112

@@ -85,6 +86,7 @@ func (cmd *servecmd) Run() {
logrus.Infof("starting wireguard server on 0.0.0.0:%d", conf.WireGuard.Port)

wgconfig := &wgembed.ConfigFile{
// TODO: add MTU config
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be done at a later time, what is more important is the client configuration generated by the admin-panel.

@@ -60,6 +60,7 @@ export class AddDevice extends React.Component<Props> {
PrivateKey = ${privateKey}
Address = ${device.address}
${info.dnsEnabled && `DNS = ${info.dnsAddress}`}
MTU = ${info.mtu}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main component that fixes the issue.

DasSkelett pushed a commit to DasSkelett/wg-access-server that referenced this pull request May 16, 2022
…n/website/material-ui/icons-4.11.3

Bump @material-ui/icons from 4.11.2 to 4.11.3 in /website
@awlx
Copy link

awlx commented May 25, 2023

Do you want to add your PR to the active fork? @alexandre-abrioux https://github.com/freifunkMUC/wg-access-server

@alexandre-abrioux
Copy link
Author

@awlx Sure! thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MTU configuration by environment
2 participants