Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Michael Brookes <mgsb81@gmail.com>
To: wireguard@lists.zx2c4.com
Subject: Explanation of multiple addresses in config
Date: Mon, 30 Dec 2019 10:16:32 +0000	[thread overview]
Message-ID: <CABfcST9Ovn7=2gmXhKYEmp4tA6w33KnV4f5KEXZtqz33nfVt3g@mail.gmail.com> (raw)

Hello

The manpage for wg-quick states one can use Address multiple times in
the Interface section of a config.  I've tried this but it yields
unexpected results.  Here is my config which I'm using on my Ubuntu
laptop:

[Interface]
PrivateKey = <key>
Address = 10.19.49.103/24
Address = 10.88.118.166/16

[Peer]
PublicKey = FgVLScjX29jwnXXbHStFpNKcFqbaiNK6LuSWFglrWCo=
AllowedIPs = 172.18.1.0/24, 10.19.49.0/24
Endpoint = endpoint1:51820
PersistentKeepalive = 10

[Peer]
PublicKey = itXrReVj+wuecrSs+VNnEEkpc7wHb8QhXQtMQUBrOj8=
AllowedIPs = 172.27.0.0/16,10.88.0.0/16
Endpoint = endpoint2:51820
PersistentKeepalive = 25

wg-quick up <config> gives me an interface with both addresses
assigned, 10.19.49.103 is listed first, 10.88.118.166 listed second in
the ip addr output.
Running tcpdump in parallel on both peer endpoints and my latop, I
ping an address in the ranges the second peer lists in its AllowedIPs,
for example 172.27.3.141.
tcpdump on the wireguard interfaces shows the following:

10.19.49.103 -> 172.27.3.141: : ICMP echo request

I can see the peer itXrReV... receiving the echo request but it's
coming from the first Address listed in the config and endpoint2 only
has 10.88/16 addresses in it's AllowedIPs.

Any insight into what's happening would be gratefully received, I've
tried asking a couple of times but not had any feedback, I suspect I
am fundamentally misunderstanding something here.

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

             reply	other threads:[~2020-01-09  6:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-30 10:16 Michael Brookes [this message]
     [not found] ` <CAPWNY8VCYCUy7B_6D-WbPFcAYVopO9D97Ykp_35MdKQUk_Z26Q@mail.gmail.com>
2020-01-10 11:22   ` Michael Brookes

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='CABfcST9Ovn7=2gmXhKYEmp4tA6w33KnV4f5KEXZtqz33nfVt3g@mail.gmail.com' \
    --to=mgsb81@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).