From: Dmitry Kovalenko <waaayfar3r@gmail.com>
To: wireguard@lists.zx2c4.com
Subject: Issue with Apple clients when routing all traffic through Wireguard
Date: Fri, 30 Aug 2019 14:34:55 +0300 [thread overview]
Message-ID: <CALYxMCvCKwbuCuq1pAiAnW0t_FCSEvPj7q6n609HmVUjT_59Tg@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1384 bytes --]
Hi
I have been using wireguard for a while now and discovered an issue with
routes created by macOS and iOS GUI clients. The issue is that wireguard
does not create a route to the endpoint via a default route. So when you
specify AllowedIPs = 0.0.0.0/0 (excluding private IPs does not change
anything) on a client, everything just stops working because 0.0.0.0/0 is
now reachable only through wireguard tunnel, which is obviously not
reachable as there is no route to it through normal internet connection.
Pretty much, the routes look like this:
*default via 10.80.0.1 dev wg0* - default route through wg
*default via 10.0.0.1 dev eth0* - old default route through ethernet
*10.0.0.0/24 <http://10.0.0.0/24> dev eth0*
When they have to look like this:
*default via 10.80.0.1 dev wg0 *- default route through wg
*default via 10.0.0.1 dev eth0* - old default route through ethernet
*1.2.3.4/32 <http://1.2.3.4/32> via 10.0.0.1 dev eth0* - specific route to
wireguard endpoint (1.2.3.4 here) through ethernet *which is missing*
*10.0.0.0/24 <http://10.0.0.0/24> dev eth0*
Right now the only workaround is manually calculating AllowedIPs CIDRs
excluding the endpoint address. I assume this is not by design and should
be fixed by either creating a route to wg endpoint through default gateway
or excluding endpoint IP from AllowedIPs without having to do it manually
in the config.
[-- Attachment #1.2: Type: text/html, Size: 1729 bytes --]
[-- Attachment #2: Type: text/plain, Size: 148 bytes --]
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard
reply other threads:[~2019-09-06 19:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly 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=CALYxMCvCKwbuCuq1pAiAnW0t_FCSEvPj7q6n609HmVUjT_59Tg@mail.gmail.com \
--to=waaayfar3r@gmail.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).