An ~android~ client runs WireGuard for Android™ or work-alike.
- ~./inst client debian NAME USER PUBKEY~ \\
- A ~debian~ client runs a Debian/Linux desktop with Network Manager
+ A ~debian~ client runs a Debian/Linux desktop with NetworkManager
(though ~wg-quick~ is currently used).
- ~./inst client campus NAME PUBKEY~ \\
in their private keys and install the resulting files in
e.g. =/etc/wireguard/wg0.conf= and =wg1.conf=. To connect, members
run a command like ~systemctl start wg-quick@wg0~. (There may be
-better support in Network Manager soon.)
+better support in NetworkManager soon.)
#+CAPTION: [[file:inst][=inst=]]
#+BEGIN_SRC perl :tangle inst :noweb no-export
hostnum_to_ipaddr_cidr (1, $campus_wg_net_cidr),
$campus_wg_port, "\n");
+ umask 033;
write_wg_client ("public.conf",
hostnum_to_ipaddr ($hostnum, $public_wg_net_cidr),
$type,
$gate_wg_pubkey,
"$gate_wild_addr:$campus_wg_port",
hostnum_to_ipaddr (1, $campus_wg_net_cidr));
+
+ exit;
}
sub write_wg_server ($$$$$) {
close $O or die "Could not close $file.tmp: $!\n";
rename ("$file.tmp", $file)
or die "Could not rename $file.tmp: $!\n";
-
- exit;
}
sub hostnum_to_ipaddr ($$)
hostnum_to_ipaddr_cidr (1, $campus_wg_net_cidr),
$campus_wg_port, "\n");
+ umask 033;
write_wg_client ("public.conf",
hostnum_to_ipaddr ($hostnum, $public_wg_net_cidr),
$type,
$gate_wg_pubkey,
"$gate_wild_addr:$campus_wg_port",
hostnum_to_ipaddr (1, $campus_wg_net_cidr));
+
+ exit;
}
sub write_wg_server ($$$$$) {
close $O or die "Could not close $file.tmp: $!\n";
rename ("$file.tmp", $file)
or die "Could not rename $file.tmp: $!\n";
-
- exit;
}
sub hostnum_to_ipaddr ($$)