Development discussion of WireGuard
 help / color / mirror / Atom feed
From: ajs124 <wireguard@ajs124.de>
To: wireguard@lists.zx2c4.com
Subject: Re: How ca I use two peers with 0.0.0.0?
Date: Fri, 5 Apr 2019 19:48:05 +0200	[thread overview]
Message-ID: <20190405194805.7fa9fa09@desk> (raw)
In-Reply-To: <1554113120.148180037@f500.i.mail.ru>

Hey!

There's multiple ways to achieve this, each with its own set of drawbacks.
Firstly though, the reason why this is impossible the way you tried it, can be seen in section two (Cryptokey Routing) of the paper[1].

Now onto how you can do this anyhow:
1. Multiple wireguard interfaces
	The problem being that you need more ports, because you can't listen twice on the same ip on the same port. (Well, you kind of can, but let's just say you can't).
2. Tunnel over wireguard, e.g. IPIP, GRE, VXLAN, etc
	The main drawback is that every tunneling layer comes with more overhead and it's just not a pretty solution, but it should work.

I hope this helps you in solving your problem.

Best Regards
ajs124


[1]: https://www.wireguard.com/papers/wireguard.pdf

On Mon, 01 Apr 2019 13:05:20 +0300
Дмитрий Марков <dmitri__13@mail.ru> wrote:

> Hello!
> 
> Recently I tried to install wireguard. 
> 
> I have 4 computers. 2 of them have public ip. 2 of them behind NAT.
> 
> I want to use 2 public PC as endpoits, but I don't understand how to set up 0.0.0.0 for both of them on client side.
> 
> So this my configuration on clientside behind NAT
> [Interface]
> ListenPort = 51820
> PrivateKey = KEY
> [Peer]
> PublicKey = KEY1
> AllowedIPs = 0.0.0.0/0
> Endpoint = X.X.X.X:51820
> [Peer]
> PublicKey = KEY2
> AllowedIPs = 0.0.0.0/0
> Endpoint = X.X.X.X:51820
> Wireguard don't allow me to use 0.0.0.0 on both of them. How can I use two peers at this situation?
> 
> 
> -- 
> With Best Regards,
> Dmitry Markov
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

      reply	other threads:[~2019-04-05 17:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 10:05 Дмитрий Марков
2019-04-05 17:48 ` ajs124 [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=20190405194805.7fa9fa09@desk \
    --to=wireguard@ajs124.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).