wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
From: Tim Weippert <weiti@weiti.org>
To: 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 08:44:23 +0100	[thread overview]
Message-ID: <20181217074423.GA18720@arch01.localdomain> (raw)
In-Reply-To: <CAKVinOVZ1nVJh8LvqGme5C27+R=AFBOxPKS22ckO7TEHsbc4-A@mail.gmail.com>

Hi, 

On Mon, Dec 17, 2018 at 09:42:17AM +0800, KeXianbin(http://diyism.com) wrote:
> For example, my wg1.conf now:
> 
> [Interface]
> PrivateKey = uMoD1TRi+tRkEVF/B5VrXQwHMN3xC1eLVXNbLkkkkkk=
> Address = 10.1.0.1/32
> ListenPort = 21404
> MTU=1300
> PostUp = ip route add 10.1.0.0/24 dev wg1
> PostDown = ip route del 10.1.0.0/24

Why you add a routing to a /24 if you only want 1:1 links?
I think with this entry the routing decision isn't made by
wireguards "AllowedIPs" statement, it is accomplished by normal 
routing lookups and get send through the tunnel.

Is there a reason for the /24 routing?

> [Peer]
> PublicKey = Zd5jssxd4zj/4d6ZpOtClyD/8V2eGR7jpHM3jpppppp=
> EndPoint = 162.243.2.2:21403
> AllowedIPs = 10.1.0.3/32

This should normally do what you expected, but i think as stated above
the /24 routing is "disabling" the correct behaviour.

regards, 
tim
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

  parent reply	other threads:[~2018-12-17  7:44 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)
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 [this message]
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=20181217074423.GA18720@arch01.localdomain \
    --to=weiti@weiti.org \
    --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).