wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
From: "Jacob S. Moroni" <mail@jakemoroni.com>
To: wireguard@lists.zx2c4.com
Subject: WireGuard iOS Client Issue
Date: Sat, 29 Dec 2018 19:15:19 -0500	[thread overview]
Message-ID: <1546128919.1294828.1620911976.12CFA382@webmail.messagingengine.com> (raw)

Hello,

I'm experiencing a small issue with the WireGuard iOS client (beta, from
the App Store), but I'm not really sure if the issue is with the WireGuard
client or iOS itself.

Sorry if this is verbose; it's kind of cumbersome to explain.

Basically, what I found is that if there's, for example, a website being
hosted on the same IP as the VPN server, any access to the site (on the
client) will fail while connected to the VPN. What's interesting is that it
always fails while using the "always on" mode, but _sometimes_ works if
using "on demand" mode.

I'm no iOS developer, but a cursory search leads me to believe that
the two ways of handling VPNs on iOS are fundamentally different.

For example, when using "on demand" mode, certain Apple services
will bypass the VPN, but this will not occur if using "always on" mode.

I have absolutely no idea how the routing works on iOS, but my best
guess is that maybe any accesses to the same IP as the VPN server
are handled explicitly outside of the tunnel and this is somehow breaking
things if you try to access the server by any means other than the VPN
client?

My setup:

- Linux server behind NAT with ports 80, 443, and UDP 51820 forwarded.
- WireGuard server running on Linux server.
- Web server also running on same Linux server.
- Hairpin route on the router to allow devices on the LAN to access
  the website via it's public IP.
- Masquerade rule and IP forwarding enabled on the Linux server to
  allow WireGuard clients to access the LAN and Internet.
- iPhone 8 (T-Mo) running the latest WireGuard client app from the App Store.
- "On Demand" option disabled.

What works:

- When VPN is disabled and the phone is on LTE, I can access the website
  via its public IP without issue.
- When VPN is disabled and the phone is on LAN, I can access the website
  via both its public and private LAN IP.
- I can connect to the VPN server without issue both from LTE and from
  LAN.
- When VPN is enabled, I can access any public IP through the VPN from
  both LAN and LTE (except the server's, sort of...).
- When VPN is enabled, I can access the website from the server's LAN IP.

The issue:

- When VPN is enabled, I can't access the website from the server's
  public IP.

My tests:

- I ran Wireshark on the server's wg0 interface while attempting to
  ping various IPs from the iPhone while it was connected to the VPN.
- I was able to ping _any_ IP from the iPhone without issue.
- I can see the ICMP messages on Wireshark for every IP that I
  ping _except_ for when I ping the server's public IP.

So, the fact that pinging any IP worked, and I can see them all
in Wireshark except for when I ping the server's IP leads me to
believe that those messages are being routed outside of the tunnel,
which itself seems kind of obvious, but doesn't explain why accesses
to the website don't work.

Thoughts?

As a side note, apart from this issue, the WireGuard iOS client has been
working very well. I'm using a mixture of T-Mobile LTE and WiFi, and I haven't
had any issues switching back and forth.

Also, WiFi calling works through the VPN, which might seem obvious, but was
impressive to me since WiFi calling barely works on a regular LAN WiFi connection...

Thanks,
-- 
  Jacob S. Moroni
  mail@jakemoroni.com
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

                 reply	other threads:[~2019-01-02 18:30 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=1546128919.1294828.1620911976.12CFA382@webmail.messagingengine.com \
    --to=mail@jakemoroni.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).