Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Samuel Holland <samuel@sholland.org>
To: Gianluca Gabrielli <tuxmealux@protonmail.com>,
	WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Allowed IPs Toggling
Date: Thu, 15 Mar 2018 10:56:56 -0500	[thread overview]
Message-ID: <db7326ed-e0f5-c1ee-ea61-30ef6d6fa3b3@sholland.org> (raw)
In-Reply-To: <NRNcntoOUgLRhHI2D7GnuCHirY9j2pMH83ET-HFr4qoamFy7aIIkR_ZVcKa0wTTbQ-SfhLEr5zih04Hs-FwFaj4UenOksFs8XCMp8yKnZEk=@protonmail.com>

Hello,

On 03/15/18 10:31, Gianluca Gabrielli wrote:
> I was setting two peers on the server, but every time I re-add one of these 
> two the other one is shown with (none) on "allowed ips" field. Of course that
> blocks communications with that peer. If I try to re-add it, then the other
> peer loses its configuration, same problem.

Allowed IPs is like a routing table; you can't have two routes for the same set
of IPs, or WireGuard doesn't know which peer to send the traffic to. You want to
have non-overlapping Allowed IP ranges. This usually means that the range of
Allowed IPs is smaller than the host's subnet. For example:

Host A:
IP configuration for WireGuard interface: 192.168.123.1/24
Allowed IPs for Host B: 192.168.123.2/32

Host B:
IP configuration for WireGuard interface: 192.168.123.2/24
Allowed IPs for Host A: 192.168.123.1/32

The IP configuration tells the kernel which IP ranges are accessible via the
WireGuard interface. The Allowed IPs tell WireGuard, which _subset_ of those IPs
is associated with each peer.

> Cheers,
> Gianluca

Cheers,
Samuel

  reply	other threads:[~2018-03-15 15:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15 15:31 Gianluca Gabrielli
2018-03-15 15:56 ` Samuel Holland [this message]
2018-03-15 18:39   ` Steve Gilberd
2018-03-15 18:51     ` Samuel Holland
2018-03-15 18:55       ` Steve Gilberd
2018-03-16  2:12     ` Tim Sedlmeyer
2018-03-16 12:44       ` Gianluca Gabrielli

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=db7326ed-e0f5-c1ee-ea61-30ef6d6fa3b3@sholland.org \
    --to=samuel@sholland.org \
    --cc=tuxmealux@protonmail.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).