WireGuard Archive on lore.kernel.org
 help / color / Atom feed
From: Kunal Shah <kunalv.shah@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: WireGuard mailing list <WireGuard@lists.zx2c4.com>
Subject: Re: wireguard looses internet connection intermittently.
Date: Sun, 9 Feb 2020 10:55:27 +0530
Message-ID: <CAMK_KHjEwTP9v=8rB+gNRSsrUNmsUj5QNywv3L85523Vw4DG4A@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9ocPawJ4amTG4JjcJga1EYKZUnEMoDvNSoJYvFqJbT3=g@mail.gmail.com>

[-- Attachment #1.1: Type: text/plain, Size: 1090 bytes --]

Hi Jason,

Thanks for your response. After the changes you suggested, It still gives
me the same problem. Now my GCP server wireguard configuration looks like
this.

[Interface]
Address = 192.168.1.1
SaveConfig = true
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j
ACCEPT; iptables -t nat -A POSTROUTING -o ens4 -j MASQUERADEi;iptables -t
mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -j TCPMSS
--clamp-mss-to-pmtu
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i
-j ACCEPT; iptables -t nat -D POSTROUTING -o ens4 -j MASQUERADE
ListenPort = 51840
PrivateKey = <private key>
MTU=1380

[Peer]
PublicKey = <public key>
AllowedIPs = 192.168.1.2/32

On Sun, 9 Feb 2020 at 03:06, Jason A. Donenfeld <Jason@zx2c4.com> wrote:

> GCP uses an MTU of 1460 because Google's network does weird things.
> That means the MTU for WireGuard should be 1380. On the GCP box, try
> adding `MTU=1380` to your config and add this line to PostUp: `
> ; iptables -t mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -j
> TCPMSS --clamp-mss-to-pmtu`
>

[-- Attachment #1.2: Type: text/html, Size: 1852 bytes --]

<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Hi Jason,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks for your response. After the changes you suggested, It still gives me the same problem. Now my GCP server wireguard configuration looks like this.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">[Interface]<br>Address = 192.168.1.1<br>SaveConfig = true<br>PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o ens4 -j MASQUERADEi;iptables -t mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu<br>PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o ens4 -j MASQUERADE<br>ListenPort = 51840<br>PrivateKey = &lt;private key&gt;<br>MTU=1380<br><br>[Peer]<br>PublicKey = &lt;public key&gt;<br>AllowedIPs = <a href="http://192.168.1.2/32">192.168.1.2/32</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 9 Feb 2020 at 03:06, Jason A. Donenfeld &lt;<a href="mailto:Jason@zx2c4.com">Jason@zx2c4.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">GCP uses an MTU of 1460 because Google&#39;s network does weird things.<br>
That means the MTU for WireGuard should be 1380. On the GCP box, try<br>
adding `MTU=1380` to your config and add this line to PostUp: `<br>
; iptables -t mangle -A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -j<br>
TCPMSS --clamp-mss-to-pmtu`<br>
</blockquote></div></div>

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 14:52 Kunal Shah
2020-02-08 21:36 ` Jason A. Donenfeld
2020-02-09  5:25   ` Kunal Shah [this message]
2020-02-09  6:47     ` Kunal Shah

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMK_KHjEwTP9v=8rB+gNRSsrUNmsUj5QNywv3L85523Vw4DG4A@mail.gmail.com' \
    --to=kunalv.shah@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=WireGuard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git