From 900156b511187d9ce393a55475a8b205e3afeb13 Mon Sep 17 00:00:00 2001 From: Renken Date: Mon, 25 Dec 2023 22:55:06 +0100 Subject: config: shione: incomplete wireguard setup --- config/shione/wireguard/debian/changelog | 5 +++++ config/shione/wireguard/debian/compat | 1 + config/shione/wireguard/debian/control | 16 ++++++++++++++++ config/shione/wireguard/debian/copyright | 8 ++++++++ config/shione/wireguard/debian/files | 2 ++ config/shione/wireguard/debian/rules | 4 ++++ config/shione/wireguard/debian/source/format | 1 + config/shione/wireguard/debian/wireguard-config.install | 1 + .../shione/wireguard/files/etc/sysctl.d/wireguard.conf | 3 +++ config/shione/wireguard/generate_keys.sh | 9 +++++++++ 10 files changed, 50 insertions(+) create mode 100644 config/shione/wireguard/debian/changelog create mode 100644 config/shione/wireguard/debian/compat create mode 100644 config/shione/wireguard/debian/control create mode 100644 config/shione/wireguard/debian/copyright create mode 100644 config/shione/wireguard/debian/files create mode 100755 config/shione/wireguard/debian/rules create mode 100644 config/shione/wireguard/debian/source/format create mode 100644 config/shione/wireguard/debian/wireguard-config.install create mode 100644 config/shione/wireguard/files/etc/sysctl.d/wireguard.conf create mode 100755 config/shione/wireguard/generate_keys.sh (limited to 'config/shione/wireguard') diff --git a/config/shione/wireguard/debian/changelog b/config/shione/wireguard/debian/changelog new file mode 100644 index 0000000..534c970 --- /dev/null +++ b/config/shione/wireguard/debian/changelog @@ -0,0 +1,5 @@ +wireguard-config (1.0) unstable; urgency=low + + * Initial release. + + -- Renken Sun, 24 Dec 2023 23:46:00 +0100 diff --git a/config/shione/wireguard/debian/compat b/config/shione/wireguard/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/config/shione/wireguard/debian/compat @@ -0,0 +1 @@ +9 diff --git a/config/shione/wireguard/debian/control b/config/shione/wireguard/debian/control new file mode 100644 index 0000000..81d04ba --- /dev/null +++ b/config/shione/wireguard/debian/control @@ -0,0 +1,16 @@ +Source: wireguard-config +Section: tasks +Priority: optional +Maintainer: Renken +Rules-Requires-Root: no +Build-Depends: debhelper (>= 13.11~), config-package-dev (>= 4.15~) +Standards-Version: 4.1.0 + +Package: wireguard-config +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends}, wireguard, wireguard-tools +Provides: ${diverted-files} +Conflicts: ${diverted-files} +Description: Shione wireguard configuration. + Shione wireguard configuration. diff --git a/config/shione/wireguard/debian/copyright b/config/shione/wireguard/debian/copyright new file mode 100644 index 0000000..2fff8a7 --- /dev/null +++ b/config/shione/wireguard/debian/copyright @@ -0,0 +1,8 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://gitlab.com/renken/nichijou +Upstream-Contact: Renken + +Files: + * +Copyright: 2023, Renken +License: GPL-3 diff --git a/config/shione/wireguard/debian/files b/config/shione/wireguard/debian/files new file mode 100644 index 0000000..287ae41 --- /dev/null +++ b/config/shione/wireguard/debian/files @@ -0,0 +1,2 @@ +wireguard-config_1.0_all.deb tasks optional +wireguard-config_1.0_amd64.buildinfo tasks optional diff --git a/config/shione/wireguard/debian/rules b/config/shione/wireguard/debian/rules new file mode 100755 index 0000000..a089a9e --- /dev/null +++ b/config/shione/wireguard/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ --with config-package diff --git a/config/shione/wireguard/debian/source/format b/config/shione/wireguard/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/config/shione/wireguard/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/config/shione/wireguard/debian/wireguard-config.install b/config/shione/wireguard/debian/wireguard-config.install new file mode 100644 index 0000000..5b79850 --- /dev/null +++ b/config/shione/wireguard/debian/wireguard-config.install @@ -0,0 +1 @@ +files/* / diff --git a/config/shione/wireguard/files/etc/sysctl.d/wireguard.conf b/config/shione/wireguard/files/etc/sysctl.d/wireguard.conf new file mode 100644 index 0000000..d51aa3c --- /dev/null +++ b/config/shione/wireguard/files/etc/sysctl.d/wireguard.conf @@ -0,0 +1,3 @@ +# Configuration required for wireguard. +net.ipv4.ip_forward = 1 +net.ipv6.conf.all.forwarding = 1 diff --git a/config/shione/wireguard/generate_keys.sh b/config/shione/wireguard/generate_keys.sh new file mode 100755 index 0000000..4c564a4 --- /dev/null +++ b/config/shione/wireguard/generate_keys.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +set -eux + +cd -- files/etc/wireguard +(umask 077; wg genkey | tee shione.private.key | wg pubkey > shione.public.key) +# TODO: chmod 0600 all files under files/etc/wireguard. +# TODO: Update files/etc/wireguard/wg0.conf accordingly. +cd -- - -- cgit v1.2.3