From: Alessio Nossa <alessio.nossa+list@gmail.com>
To: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Bug restarting WireGuard using launchd on macOS
Date: Mon, 20 Jun 2022 22:51:54 +0200 [thread overview]
Message-ID: <CAMTfdYoJfHEWXBO2L5L4NrwutgjFo5egqmfQj0dCPz7=Kib80w@mail.gmail.com> (raw)
Hello,
I am running WireGuard (installed with wireguard-tools, using
HomeBrew) on macOS 12.4, launched using launchd. All works fine until
I try to restart it, always with launchd.
When WireGuard interface is restarted, it looks like it crashes/gets
deactivated immediately: if I run 'wg show' nothing is displayed, but
on the "server" peer I can see that the "Latest handshake" report the
time elapsed since last "com.example.wg.restartWg.plist" execution.
The launchd configurations, that I saved at "/Library/LaunchDaemons/"
are available at
https://gist.github.com/alessionossa/78f69b9451a130240e2057acbd4eb7f8
The log at "/tmp/com.example.wg.restartWg.err" of is
06/20/22 21:51:18
[+] Interface for wg1 is utun0
[#] rm -f /var/run/wireguard/utun0.sock
[#] rm -f /var/run/wireguard/wg1.name
--- Restarting... ---
[#] wireguard-go utun
[+] Interface for wg1 is utun0
[#] wg setconf utun0 /dev/fd/63
[#] ifconfig utun0 inet 10.181.0.5/32 10.181.0.5 alias
[#] ifconfig utun0 up
[#] route -q -n add -inet 10.181.0.3/32 -interface utun0
[#] route -q -n add -inet 10.181.0.254/32 -interface utun0
[#] route -q -n add -inet 10.181.0.11/32 -interface utun0
[+] Backgrounding route monitor
--- Restarted! ---
06/20/22 21:56:20
wg-quick: `wg1' is not a WireGuard interface
--- Restarting... ---
[#] wireguard-go utun
[+] Interface for wg1 is utun0
[#] wg setconf utun0 /dev/fd/63
[#] ifconfig utun0 inet 10.181.0.5/32 10.181.0.5 alias
[#] ifconfig utun0 up
[#] route -q -n add -inet 10.181.0.3/32 -interface utun0
[#] route -q -n add -inet 10.181.0.254/32 -interface utun0
[#] route -q -n add -inet 10.181.0.11/32 -interface utun0
[+] Backgrounding route monitor
If some more Information is needed to debug the issue, I am available.
Best regards,
Alessio Nossa
reply other threads:[~2022-06-20 20:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='CAMTfdYoJfHEWXBO2L5L4NrwutgjFo5egqmfQj0dCPz7=Kib80w@mail.gmail.com' \
--to=alessio.nossa+list@gmail.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).