From: "KeXianbin(http://diyism.com)" <kexianbin@diyism.com>
To: Jason@zx2c4.com
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: [Question or Feature Request] Any wg1.conf option to limit peer IP as 1-to-1?
Date: Mon, 17 Dec 2018 16:10:27 +0800 [thread overview]
Message-ID: <CAKVinOW_6qGYFT52LurdowOuaMD_fL=+WbTfSqr2qSspCkLoRA@mail.gmail.com> (raw)
In-Reply-To: <CAKVinOXBxdFrTAiMaDmdE63iYO-rjBSAmBj5mb3QZ52zkmzoRQ@mail.gmail.com>
It seems that "AllowedIPs" have nothing to do with refusing unwantted peer's IP.
It only specifes the outgoing target IPs,
For example, I sometimes set "AllowedIPs=216.58.0.0/18" to enable me
to visit https://www.google.com through the internet of the peer
"10.1.0.3".
On Mon, Dec 17, 2018 at 3:53 PM KeXianbin(http://diyism.com)
<kexianbin@diyism.com> wrote:
>
> On my machine(10.1.0.1), does the option "AllowedIPs = 10.1.0.3/32" in
> wg1.conf take effects in both input and ouput directions?
> It seems that "AllowedIPs = 10.1.0.3/32" only added ip route rule
> "10.1.0.3 dev wg1 scope link" on my side,
> can it prevent the peer to send packets to my 10.1.0.1:80 from 10.1.0.4?
> On Mon, Dec 17, 2018 at 3:40 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> >
> > On Mon, Dec 17, 2018 at 2:42 AM KeXianbin(http://diyism.com)
> > <kexianbin@diyism.com> wrote:
> > > AllowedIPs = 10.1.0.3/32
> > > [...]
> > > If I want to limit the peer to a fixed IP 10.1.0.3, any wg1.conf
> > > OPTION to config it?
> > >
> > > Currently, the peer can set any IP, for example 10.1.0.4, and can
> > > send packets to my http://10.1.0.1:80 from 10.1.0.4.
> >
> > Setting that peer's allowedips to 10.1.0.3/32 should accomplish
> > exactly what you want; that peer is _only_ allowed to send packets as
> > that IP. If the peer attempts to send packets as 10.1.0.4, WireGuard
> > should reject those packets. If it doesn't, that sounds like a major
> > bug.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard
next prev parent reply other threads:[~2018-12-17 8:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-17 1:42 [Question or Feature Request] Any wg1.conf option to limit peer IP as 1-to-1? KeXianbin(http://diyism.com)
2018-12-17 7:39 ` Jason A. Donenfeld
2018-12-17 7:53 ` KeXianbin(http://diyism.com)
2018-12-17 8:10 ` KeXianbin(http://diyism.com) [this message]
2018-12-17 8:49 ` KeXianbin(http://diyism.com)
2018-12-17 8:54 ` Jason A. Donenfeld
2018-12-17 9:02 ` KeXianbin(http://diyism.com)
2018-12-17 8:50 ` Jason A. Donenfeld
2018-12-17 7:44 ` Tim Weippert
2018-12-17 7:50 ` Jason A. Donenfeld
2018-12-17 7:54 ` Tim Weippert
2018-12-17 8:00 ` KeXianbin(http://diyism.com)
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='CAKVinOW_6qGYFT52LurdowOuaMD_fL=+WbTfSqr2qSspCkLoRA@mail.gmail.com' \
--to=kexianbin@diyism.com \
--cc=Jason@zx2c4.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).