From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Matthias Urlichs <matthias.urlichs@noris.de>
Cc: "wireguard@lists.zx2c4.com" <wireguard@lists.zx2c4.com>
Subject: Re: Feature request: tag incoming packets
Date: Sat, 20 Feb 2021 15:33:23 +0100 [thread overview]
Message-ID: <CAHmME9pQYws_=qohpKGNeL_=aCmrJ6QWtJ+MyFLQrUqHWAscrQ@mail.gmail.com> (raw)
In-Reply-To: <cc0a6bc9-5450-c30b-b3e9-8bb248b8c07d@noris.de>
There is no need for this and WireGuard was designed to avoid needing
something like this. The AllowedIPs binding gives you a mapping
between source IP and peer public key.
So, if you have on wg0:
PublicKey = ABCD
AllowedIPs = 192.168.33.99/32
Then you can safely have a netfilter rule that says:
iptables -A INPUT -i wg0 -s 192.168.33.99/32 -j ACCEPT
You only need to match two things: the wireguard interface and the
source IP. The strong binding to the public key is the primary
security property that WireGuard gives you via cryptokey routing.
prev parent reply other threads:[~2021-02-20 14:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.0.1612101211.63283.wireguard@lists.zx2c4.com>
2021-01-31 14:07 ` Matthias Urlichs
2021-02-20 14:33 ` Jason A. Donenfeld [this message]
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='CAHmME9pQYws_=qohpKGNeL_=aCmrJ6QWtJ+MyFLQrUqHWAscrQ@mail.gmail.com' \
--to=jason@zx2c4.com \
--cc=matthias.urlichs@noris.de \
--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).