Development discussion of WireGuard
 help / color / mirror / Atom feed
* [iOS - macOS] Route all traffic through peer only for IPv6
@ 2020-01-27 16:43 Mario Costa
  0 siblings, 0 replies; 2+ messages in thread
From: Mario Costa @ 2020-01-27 16:43 UTC (permalink / raw)
  To: wireguard

Hi all.

I have a VPS with IPv6 connectivity that I use as WireGuard “server” for other peers. I successfully configured each peer with an IPv4 and an IPv6 address, but I don’t want to route all traffic through the server. I only want to route the WireGuard IPv4 subnet so that my peers can talk to the server, but I want the rest of the v4 Internet to go outside of the tunnel.

In addition to that, I’d like to add IPv6 connectivity to my peers, which usually don’t have. The problem is, when I add the IPv6 catchall ::/0 to the AllowedIPs section of my iOS and macOS peers the IPv6 traffic gets correctly routed, but I completely lose IPv4 connectivity.

The issue seems related to how the routing tables are changed when WG establishes the connection. With ::/0, a default gateway for IPv4 gets added (it says link#21, I don’t know what that means). If I add 0.0.0.0/0 too then everything works and I appear to have dual stack, but I only want IPv6 to be routed though the tunnel!

I think that if only ::/0 is configured, an IPv4 default gateway should not be added. By the way, a Debian peer with the same configuration seems to work correctly (IPv6 through the tunnel and IPv4 through my LAN’s gateway), but I’m using wg and not wg-quick. I don’t know if this issue is caused by the iOS/macOS apps or if wg-quick runs under those apps and causes the routing problem. Maybe later I will try wg-quick on Debian to see how it affects the routing tables, but the apps should work with these settings nonetheless.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [iOS - macOS] Route all traffic through peer only for IPv6
@ 2020-01-25 15:57 Mario Costa
  0 siblings, 0 replies; 2+ messages in thread
From: Mario Costa @ 2020-01-25 15:57 UTC (permalink / raw)
  To: wireguard

Hi all.

I have a VPS with IPv6 connectivity that I use as WireGuard “server” for other peers. I successfully configured each peer with an IPv4 and an IPv6 address, but I don’t want to route all traffic through the server. I only want to route the WireGuard IPv4 subnet so that my peers can talk to the server, but I want the rest of the v4 Internet to go outside of the tunnel.

In addition to that, I’d like to add IPv6 connectivity to my peers, which usually don’t have. The problem is, when I add the IPv6 catchall ::/0 to the AllowedIPs section of my iOS and macOS peers the IPv6 traffic gets correctly routed, but I completely lose IPv4 connectivity.

The issue seems related to how the routing tables are changed when WG establishes the connection. With ::/0, a default gateway for IPv4 gets added (it says link#21, I don’t know what that means). If I add 0.0.0.0/0 too then everything works and I appear to have dual stack, but I only want IPv6 to be routed though the tunnel!

I think that if only ::/0 is configured, an IPv4 default gateway should not be added. By the way, a Debian peer with the same configuration seems to work correctly (IPv6 through the tunnel and IPv4 through my LAN’s gateway), but I’m using wg and not wg-quick. I don’t know if this issue is caused by the iOS/macOS apps or if wg-quick runs under those apps and causes the routing problem. Maybe later I will try wg-quick on Debian to see how it affects the routing tables, but the apps should work with these settings nonetheless.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-30  1:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-27 16:43 [iOS - macOS] Route all traffic through peer only for IPv6 Mario Costa
  -- strict thread matches above, loose matches on Subject: below --
2020-01-25 15:57 Mario Costa

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).