Development discussion of WireGuard
 help / color / mirror / Atom feed
From: nicolas prochazka <prochazka.nicolas@gmail.com>
To: Arti Zirk <arti.zirk@gmail.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Question about origin of packet relative to peer
Date: Wed, 27 May 2020 21:41:53 +0200	[thread overview]
Message-ID: <CADdae-jU9+2EWte0n0tBBZLkBVkxQhfqM0zu0ffbf5zxwqEbHw@mail.gmail.com> (raw)
In-Reply-To: <f1d8a68465306d9f3def763eb7460701896acbda.camel@gmail.com>

Yes, I can mark the  wireguard packet  allowedips but i cannot attach
to the associated peer.In my configuration, ip from wireguard (
alllowedip) can come from different peer ( because i'm using different
mask for allowedips and multiple tunnel).
My issue is that a packet can be used by a peer and come back by an
other one ( the packet is routing by allowed-ips, not by it's peer
entry

Example :

On server side S1
Peer A (client peer)
allowedips 192.168.1.0/24

Peer B  ( an other "wireguard server"  S2  )
allowedIps 192.168.1.100/32

On client Side, allowedIp is set on s2 and if s2 down , set to s1
peer s1 ==> server S1
peer s2 ==> server S2 ==> server S1

Of course it does not work, packet routing does not work
client ==> S2 ==>  S1 (peer A)  ==>  then response route to peer (B)

Regards,
Nicolas




Le mer. 27 mai 2020 à 13:46, Arti Zirk <arti.zirk@gmail.com> a écrit :
>
> On K, 2020-05-27 at 11:01 +0200, nicolas prochazka wrote:
> > How can i know that a packet come from peer X ?
> You can check which peers allowed ips list covers the received packets
> source ip
>
> > Is is possible to mark packet not a level interface (wg0) but at peer
> > level ?
> Its probably possible to generate iptables rules from peer allowed ips
> list that marks packets with different ids
>

  reply	other threads:[~2020-05-27 19:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27  9:01 nicolas prochazka
2020-05-27 11:46 ` Arti Zirk
2020-05-27 19:41   ` nicolas prochazka [this message]
     [not found]     ` <CAJJxGdGqNc3hASvSmQ9VA_cYOS-fcH+nEooLE5eY2z4P=ubCeQ@mail.gmail.com>
     [not found]       ` <CAJJxGdGjKm9Qq-wqUwuVYQyHWc2qSzu=tcUY6VbFhnsvKp3AjA@mail.gmail.com>
2020-05-27 22:11         ` Fwd: " David Kerr

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=CADdae-jU9+2EWte0n0tBBZLkBVkxQhfqM0zu0ffbf5zxwqEbHw@mail.gmail.com \
    --to=prochazka.nicolas@gmail.com \
    --cc=arti.zirk@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).