From: Jonas Kalderstam <jonas@cowboyprogrammer.org>
To: wireguard@lists.zx2c4.com
Subject: Re: Newbie - WireGuard per systemd on Debian Buster
Date: Thu, 07 May 2020 12:43:18 +0200 [thread overview]
Message-ID: <87o8r0xby1.fsf@rodimus.kalderstam.se> (raw)
In-Reply-To: <cf665c35-adf9-6f74-b360-1c3cfd723963@hanswkraus.com>
[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]
I've been running wireguard with systemd in Debian for some time
now.
On 2020-04-16 木 18:23, Hans Kraus <hans@hanswkraus.com> wrote:
> /etc/systemd/network/wg0.netdev
> ---------------------------------------------
> [NetDev]
> Name=wg0
> Kind=wireguard
> Description=Wireguard kraush
>
> [WireGuard]
> PrivateKey=<private key server>
> ListenPort=#####
>
> [WireGuardPeer]
> PublicKey=<public key client>
> AllowedIPs=<free range>.0/24
> ---------------------------------------------
The only thing I can think of here is that your AllowedIPs ends
with a
zero - on the server you have to specify the exact IP
address. It's on
the client side where you let the AllowedIPs be a wildcard.
Examples:
server-side:
---
[WireGuardPeer]
# Client1 address
AllowedIPs=192.168.2.5
[WireGuardPeer]
# Client2 address
AllowedIPs=192.168.2.6
---
client-side:
---
[WireGuardPeer]
# Entire wireguard range
AllowedIPs=192.168.2.0/24
---
> /etc/systemd/network/wg0.network
> ---------------------------------------------
> [Match]
> Name=wg0
>
> [Network]
> Address=<free range>.1/24
> ---------------------------------------------
You might want to consider adding
IPForward=yes
for the server's .network file, and
FwMark=1234
to client's .netdev file, to be sure you can do proper road
warrioring
down the line.
I'm also a bit paranoid and have added the following to my client
.network files:
client.network:
---
[Route]
Address=192.168.2.0/24
---
Hopefully the peer address fix solves your issues.
--
Jonas Kalderstam
PGP key: 987C54AB0D4451ED
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
prev parent reply other threads:[~2020-05-11 6:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 16:23 Hans Kraus
2020-05-04 13:33 ` Alex Xu (Hello71)
2020-05-05 7:28 ` Félix Baylac
2020-05-04 14:50 ` inrin
2020-05-07 10:43 ` Jonas Kalderstam [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=87o8r0xby1.fsf@rodimus.kalderstam.se \
--to=jonas@cowboyprogrammer.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).