feat: rebranded from vpn-router to linux-manager.

This commit is contained in:
slawek committed 2026-11-22 09:51:07 +01:00
1 parent 8efe21bfa6
commit 85a1ffa21f
238 files changed
+5010 -3761

No files matched your search

+47
View File
@@ -1,3 +1,50 @@
linux-manager (0.41.0-1) unstable; urgency=medium
feature: the package is linux-manager, the Ubuntu Linux Manager, whose
router and VPN are components switched on in the configuration.
* The package, its paths, units, commands, Python modules, debconf
questions, LDAP base DN dc=linux-manager,dc=local, schema, database and
metric names are linux-manager instead of vpn-router; the Manager's unit
is linux-manager-ui.service, vpn-config-edit is
linux-manager-config-edit and vre is lme.
* The Manager is the Ubuntu Linux Manager, its first page Server.
* router.enabled and vpn.enabled, false by default, switch the router and
the VPN; the debconf questions linux-manager/router_enabled and
vpn_enabled set them, and only the questions of the components on are
asked.
* With the router off the server needs only interfaces.external, which is
also the internal side of the listen choices, and site_to_site must be
empty; with the VPN off p2s, openvpn and wireguard must be off.
* With the router off and the VPN on, the VPN pools are masqueraded out of
the external interface, so the clients reach local.cidrs through NAT.
* linux-manager-setup writes /etc/sysctl.d/99-linux-manager.conf while the
router or the VPN is on and removes it while both are off; the package
ships no sysctl file.
* The firewall is enabled once any service of the core is configured; the
IPsec rules are written only while site-to-site or IKEv2 is ready, and
MSS clamping while the router or the VPN is on; strongSwan is stopped
while neither needs it.
* The P2S CA is created while the VPN is on and the site-to-site CA while
the router is on; switching the VPN on issues the missing certificates
of the VPN users.
* While the VPN is off, a VPN user is created without a certificate, and
WireGuard peers and the VPN profiles are refused.
* The Manager hides the Remote Access page while the VPN is off, and shows
only the Network tab of the Connectivity page while the router is off.
* The LDAP schema is under 1.3.6.1.4.1.67380.10.1.2, the arc listed in
OID-REGISTRY.txt.
* Ubuntu 26.04 (resolute) is the only supported release: the build image
and the published distribution are resolute, the Azure and GCP examples
install from resolute, and the Azure example boots the 26.04 image.
* The examples switch the router and the VPN on.
* A NAT rule that the configuration no longer needs is removed from the
running firewall at once, not only at the next boot.
* tests/remote/run.py tests the components on Ubuntu 26.04 instances of an
LXD remote.
-- Slawomir Koszewski <slawek@koszewscy.waw.pl> Sat, 21 Nov 2026 23:39:03 +0100
vpn-router (0.40.0-1) unstable; urgency=medium
feature: the package installs the Router Manager, which is no longer a
+62 -42
View File
@@ -2,7 +2,7 @@
set -e
. /usr/share/debconf/confmodule
# An upgrade (configure with the old version) asks nothing; vpn-router.json holds the
# An upgrade (configure with the old version) asks nothing; linux-manager.json holds the
# configuration, and dpkg-reconfigure asks the questions again.
if [ "$1" = "configure" ] && [ -n "$2" ]; then
exit 0
@@ -12,69 +12,89 @@ fi
# preseeded completes without prompting. The defaults are platform "none" and
# mode "manual", which together mean: install the files, configure nothing.
# The Router Manager's first administrator, asked whatever the platform is; the password only with a name.
db_input medium vpn-router/admin_username || true
# The Manager's first administrator, asked whatever the platform is; the password only with a name.
db_input medium linux-manager/admin_username || true
db_go || true
db_get vpn-router/admin_username
db_get linux-manager/admin_username
if [ -n "$RET" ]; then
db_input medium vpn-router/admin_password || true
db_input medium linux-manager/admin_password || true
db_go || true
fi
db_input high vpn-router/platform || true
db_input high linux-manager/platform || true
db_go || true
db_get vpn-router/platform
db_get linux-manager/platform
if [ "$RET" = "none" ]; then
# Configuration is deferred. Asking anything else would collect answers
# that nothing is going to apply.
exit 0
fi
db_input high vpn-router/mode || true
db_input high linux-manager/mode || true
db_input high linux-manager/router_enabled || true
db_input high linux-manager/vpn_enabled || true
db_go || true
db_get linux-manager/router_enabled
ROUTER="$RET"
db_get linux-manager/vpn_enabled
VPN="$RET"
# The mode says how much the operator supplies, so it decides which interface
# and address questions are worth asking.
db_get vpn-router/mode
case "$RET" in
manual)
db_input high vpn-router/external_interface || true
db_input high vpn-router/internal_interface || true
db_input high vpn-router/int_addr || true
db_input high vpn-router/int_gateway_ip || true
;;
interfaces)
db_input high vpn-router/external_interface || true
db_input high vpn-router/internal_interface || true
;;
auto)
# and address questions are worth asking; without the router the server has
# only the external interface.
db_get linux-manager/mode
MODE="$RET"
case "$MODE" in
manual|interfaces)
db_input high linux-manager/external_interface || true
;;
esac
if [ "$ROUTER" = "true" ]; then
case "$MODE" in
manual)
db_input high linux-manager/internal_interface || true
db_input high linux-manager/int_addr || true
db_input high linux-manager/int_gateway_ip || true
;;
interfaces)
db_input high linux-manager/internal_interface || true
;;
esac
fi
db_go || true
db_input high vpn-router/local_fqdn || true
db_input high vpn-router/local_id_mode || true
db_input high vpn-router/local_cidrs || true
db_input high vpn-router/remote_addrs || true
db_input high vpn-router/remote_id || true
db_input high vpn-router/remote_cidrs || true
db_input high vpn-router/psk || true
db_input high vpn-router/pki_root_name || true
db_input high vpn-router/p2s_enabled || true
db_input high vpn-router/wg_enabled || true
db_input high linux-manager/local_fqdn || true
if [ "$ROUTER" = "true" ] || [ "$VPN" = "true" ]; then
db_input high linux-manager/local_cidrs || true
fi
if [ "$ROUTER" = "true" ]; then
db_input high linux-manager/local_id_mode || true
db_input high linux-manager/remote_addrs || true
db_input high linux-manager/remote_id || true
db_input high linux-manager/remote_cidrs || true
db_input high linux-manager/psk || true
fi
db_input high linux-manager/pki_root_name || true
if [ "$VPN" = "true" ]; then
db_input high linux-manager/p2s_enabled || true
db_input high linux-manager/wg_enabled || true
fi
db_go || true
db_get vpn-router/p2s_enabled
if [ "$RET" = "true" ]; then
db_input high vpn-router/p2s_address_pool || true
db_go || true
fi
if [ "$VPN" = "true" ]; then
db_get linux-manager/p2s_enabled
if [ "$RET" = "true" ]; then
db_input high linux-manager/p2s_address_pool || true
db_go || true
fi
db_get vpn-router/wg_enabled
if [ "$RET" = "true" ]; then
db_input high vpn-router/wg_address || true
db_input high vpn-router/wg_listen_port || true
db_go || true
db_get linux-manager/wg_enabled
if [ "$RET" = "true" ]; then
db_input high linux-manager/wg_address || true
db_input high linux-manager/wg_listen_port || true
db_go || true
fi
fi
+32 -30
View File
@@ -1,4 +1,4 @@
Source: vpn-router
Source: linux-manager
Section: net
Priority: optional
Maintainer: Sławomir Koszewski <slawek@koszewscy.waw.pl>
@@ -6,7 +6,7 @@ Build-Depends: debhelper-compat (= 13)
Standards-Version: 4.6.2
Rules-Requires-Root: no
Package: vpn-router
Package: linux-manager
Architecture: all
Depends: ${misc:Depends},
strongswan-swanctl (>= 5.0),
@@ -47,36 +47,38 @@ Suggests: caddy,
pdns-server,
pdns-backend-pgsql,
proxmox-backup-client-static
Description: Linux VPN router with IPSec, IKEv2, OpenVPN, WireGuard and a web manager
Configures a Linux host or virtual machine as a VPN router: site-to-site
IKEv2 IPSec (strongSwan swanctl) with pre-shared keys or certificates,
optional IKEv2 access using EAP-TLS, optional OpenVPN with a
certificate and a password per user, kept in a local LDAP directory, optional
WireGuard, and the routing, NAT, MSS clamping and firewall rules a router
needs. Its two-level CA, whose root may be kept offline, has issuing CAs for
the VPN clients, for site-to-site and for general use, and publishes their
certificates and CRLs. Caddy, installed by the package from the Ubuntu
archive or from Caddy's repository, serves HTTPS and static web sites, whose
files are uploaded through the web service or WebDAV, an optional PowerDNS
name server answers for a zone of the sites, and an optional OpenID
Provider signs the directory's users in to other systems. It keeps metrics of the
router in PostgreSQL and serves them for an OpenTelemetry Collector, and
makes scheduled backups to a local folder, copied to the cloud with rclone,
or to a Proxmox Backup Server. Nothing in the package is specific to a cloud
provider.
Description: Ubuntu Linux Manager: directory, PKI, web, optional router and VPN
Configures a Linux host or virtual machine as a managed server: a local LDAP
directory of users, groups and service accounts, and the firewall rules of
its services. Two components are switched on in the configuration. The
router routes between two interfaces and runs site-to-site IKEv2 IPSec
(strongSwan swanctl) with pre-shared keys or certificates. The VPN offers
IKEv2 access using EAP-TLS, OpenVPN with a certificate and a password per
user, and WireGuard; without the router its clients reach the server's
networks through NAT on one interface. Its two-level CA, whose root may be
kept offline, has issuing CAs for the VPN clients, for site-to-site and for
general use, and publishes their certificates and CRLs. Caddy, installed by
the package from the Ubuntu archive or from Caddy's repository, serves HTTPS
and static web sites, whose files are uploaded through the web service or
WebDAV, an optional PowerDNS name server answers for a zone of the sites,
and an optional OpenID Provider signs the directory's users in to other
systems. It keeps metrics of the server in PostgreSQL and serves them for
an OpenTelemetry Collector, and makes scheduled backups to a local folder,
copied to the cloud with rclone, or to a Proxmox Backup Server. Nothing in
the package is specific to a cloud provider.
.
The Router Manager, a web application served by the router, shows the
router's state and manages its users, connections, certificates, web sites,
name server, backups and packages. Users sign in through the router's web
The Manager, a web application served by the server, shows the
server's state and manages its users, connections, certificates, web sites,
name server, backups and packages. Users sign in through the server's web
service; their sessions are kept in PostgreSQL.
.
Settings live in /etc/vpn-router/vpn-router.json, which is created on first
install and owned by the administrator afterwards. Editing it and restarting
vpn-router-setup applies the change; the same service reconciles the system
at every boot. It is built on two inputs, the external and internal interface
names; the addresses on them are read from the system rather than configured
again, and nothing is auto-detected.
Settings live in /etc/linux-manager/linux-manager.json, which is created on
first install and owned by the administrator afterwards. Editing it and
restarting linux-manager-setup applies the change; the same service
reconciles the system at every boot. It is built on the interface names,
the external one and, with the router, the internal one; the addresses on
them are read from the system rather than configured again.
.
Platform-specific additions are provided by modules under
/usr/lib/vpn-router, selected explicitly by the platform setting. Modules for
Azure and GCP are included.
/usr/lib/linux-manager, selected explicitly by the platform setting.
Modules for Azure and GCP are included.
+1 -1
View File
@@ -1,5 +1,5 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: vpn-router
Upstream-Name: linux-manager
Upstream-Contact: Sławomir Koszewski <slawek@koszewscy.waw.pl>
Files: *
+6 -6
View File
@@ -1,6 +1,6 @@
etc/vpn-router
usr/lib/vpn-router
usr/lib/vpn-router/vpnrouter_platforms
usr/share/vpn-router/templates
usr/share/vpn-router/manager/web
var/lib/vpn-router/sites
etc/linux-manager
usr/lib/linux-manager
usr/lib/linux-manager/linuxmanager_platforms
usr/share/linux-manager/templates
usr/share/linux-manager/manager/web
var/lib/linux-manager/sites
+49 -50
View File
@@ -1,51 +1,50 @@
src/etc/sysctl.d/99-vpn-router.conf etc/sysctl.d/
src/usr/lib/vpn-router/vpnrouter.py usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_ldap.py usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_net.py usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_serve.py usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_users.py usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_passkeys.py usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_auth.py usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_oidc.py usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_metrics.py usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_status.py usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_backup.py usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_pki.py usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_sites.py usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_dns.py usr/lib/vpn-router/
src/usr/lib/vpn-router/install-packages usr/lib/vpn-router/
src/usr/lib/vpn-router/webdav-auth usr/lib/vpn-router/
src/usr/lib/vpn-router/openvpn-same-user usr/lib/vpn-router/
src/usr/lib/vpn-router/openvpn-issuer usr/lib/vpn-router/
src/usr/lib/vpn-router/editor-file usr/lib/vpn-router/
src/usr/bin/vpn-router-editor usr/bin/
src/usr/sbin/vpn-router-user usr/sbin/
src/usr/sbin/vpn-router-group usr/sbin/
src/usr/sbin/vpn-router-role usr/sbin/
src/usr/sbin/vpn-router-token usr/sbin/
src/usr/sbin/vpn-config-edit usr/sbin/
src/usr/sbin/vpn-router-backup usr/sbin/
src/usr/sbin/vpn-router-ca usr/sbin/
src/usr/sbin/vpn-router-caddy usr/sbin/
src/usr/sbin/vpn-router-site usr/sbin/
src/usr/lib/vpn-router/configure usr/lib/vpn-router/
src/usr/lib/vpn-router/docker-rules usr/lib/vpn-router/
src/usr/lib/vpn-router/setup usr/lib/vpn-router/
src/usr/lib/vpn-router/web usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_web/*.py usr/lib/vpn-router/vpnrouter_web/
src/usr/lib/vpn-router/metrics usr/lib/vpn-router/
src/usr/lib/vpn-router/bootstrap usr/lib/vpn-router/
src/usr/lib/vpn-router/wait-for-libpq usr/lib/vpn-router/
src/usr/lib/vpn-router/generate-config usr/lib/vpn-router/
src/usr/lib/vpn-router/manager usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_manager.py usr/lib/vpn-router/
src/usr/lib/vpn-router/upgrade usr/lib/vpn-router/
src/usr/lib/vpn-router/vpnrouter_platforms/*.py usr/lib/vpn-router/vpnrouter_platforms/
src/usr/share/vpn-router/templates/* usr/share/vpn-router/templates/
src/usr/share/vpn-router/sql/* usr/share/vpn-router/sql/
src/usr/lib/linux-manager/linuxmanager.py usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_ldap.py usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_net.py usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_serve.py usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_users.py usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_passkeys.py usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_auth.py usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_oidc.py usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_metrics.py usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_status.py usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_backup.py usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_pki.py usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_sites.py usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_dns.py usr/lib/linux-manager/
src/usr/lib/linux-manager/install-packages usr/lib/linux-manager/
src/usr/lib/linux-manager/webdav-auth usr/lib/linux-manager/
src/usr/lib/linux-manager/openvpn-same-user usr/lib/linux-manager/
src/usr/lib/linux-manager/openvpn-issuer usr/lib/linux-manager/
src/usr/lib/linux-manager/editor-file usr/lib/linux-manager/
src/usr/bin/linux-manager-editor usr/bin/
src/usr/sbin/linux-manager-user usr/sbin/
src/usr/sbin/linux-manager-group usr/sbin/
src/usr/sbin/linux-manager-role usr/sbin/
src/usr/sbin/linux-manager-token usr/sbin/
src/usr/sbin/linux-manager-config-edit usr/sbin/
src/usr/sbin/linux-manager-backup usr/sbin/
src/usr/sbin/linux-manager-ca usr/sbin/
src/usr/sbin/linux-manager-caddy usr/sbin/
src/usr/sbin/linux-manager-site usr/sbin/
src/usr/lib/linux-manager/configure usr/lib/linux-manager/
src/usr/lib/linux-manager/docker-rules usr/lib/linux-manager/
src/usr/lib/linux-manager/setup usr/lib/linux-manager/
src/usr/lib/linux-manager/web usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_web/*.py usr/lib/linux-manager/linuxmanager_web/
src/usr/lib/linux-manager/metrics usr/lib/linux-manager/
src/usr/lib/linux-manager/bootstrap usr/lib/linux-manager/
src/usr/lib/linux-manager/wait-for-libpq usr/lib/linux-manager/
src/usr/lib/linux-manager/generate-config usr/lib/linux-manager/
src/usr/lib/linux-manager/manager usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_ui.py usr/lib/linux-manager/
src/usr/lib/linux-manager/upgrade usr/lib/linux-manager/
src/usr/lib/linux-manager/linuxmanager_platforms/*.py usr/lib/linux-manager/linuxmanager_platforms/
src/usr/share/linux-manager/templates/* usr/share/linux-manager/templates/
src/usr/share/linux-manager/sql/* usr/share/linux-manager/sql/
src/usr/share/bash-completion/completions/*.bash usr/share/bash-completion/completions/
src/usr/lib/systemd/system/caddy.service.d/vpn-router.conf usr/lib/systemd/system/caddy.service.d/
src/usr/share/doc/vpn-router/vpn-router.json.example usr/share/doc/vpn-router/
src/usr/share/doc/vpn-router/manager.json.example usr/share/doc/vpn-router/
web/dist/* usr/share/vpn-router/manager/web/
docs/* usr/share/vpn-router/manager/docs/
src/usr/lib/systemd/system/caddy.service.d/linux-manager.conf usr/lib/systemd/system/caddy.service.d/
src/usr/share/doc/linux-manager/linux-manager.json.example usr/share/doc/linux-manager/
src/usr/share/doc/linux-manager/manager.json.example usr/share/doc/linux-manager/
web/dist/* usr/share/linux-manager/manager/web/
docs/* usr/share/linux-manager/manager/docs/
+1 -1
View File
@@ -1 +1 @@
usr/bin/vpn-router-editor usr/bin/vre
usr/bin/linux-manager-editor usr/bin/lme
@@ -1,11 +1,11 @@
[Unit]
Description=VPN Router backup
Documentation=file:/usr/share/doc/vpn-router/README.md
Description=Linux Manager backup
Documentation=file:/usr/share/doc/linux-manager/README.md
After=network-online.target slapd.service postgresql.service
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/vpn-router-backup run
ExecStart=/usr/sbin/linux-manager-backup run
Nice=10
IOSchedulingClass=idle
@@ -0,0 +1,10 @@
[Unit]
Description=Linux Manager backup schedule
Documentation=file:/usr/share/doc/linux-manager/README.md
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target
@@ -0,0 +1,14 @@
[Unit]
Description=Linux Manager bootstrap diagnostics page
Documentation=file:/usr/share/doc/linux-manager/README.md
# Never enabled: linux-manager-setup starts it until a setup has succeeded, and stops it after that.
[Service]
Type=simple
ExecStart=/usr/bin/python3 /usr/lib/linux-manager/bootstrap
Restart=on-failure
RestartSec=5
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
@@ -0,0 +1,10 @@
[Unit]
Description=Linux Manager Caddy installation
Documentation=file:/usr/share/doc/linux-manager/README.md
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/linux-manager-caddy apply
TimeoutStartSec=20min
@@ -0,0 +1,14 @@
[Unit]
Description=Linux Manager rules for Docker published ports
Documentation=file:/usr/share/doc/linux-manager/README.md
After=docker.service
PartOf=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/linux-manager/docker-rules apply
ExecStop=/usr/lib/linux-manager/docker-rules remove
[Install]
WantedBy=docker.service
@@ -0,0 +1,10 @@
[Unit]
Description=Linux Manager installation of the packages of %i
Documentation=file:/usr/share/doc/linux-manager/README.md
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/lib/linux-manager/install-packages %i
TimeoutStartSec=20min
@@ -0,0 +1,22 @@
[Unit]
Description=Linux Manager metrics service
Documentation=file:/usr/share/doc/linux-manager/README.md
After=network-online.target postgresql.service linux-manager-web.service
Wants=network-online.target
[Service]
Type=simple
ExecStartPre=/usr/lib/linux-manager/wait-for-libpq
ExecStart=/usr/bin/python3 /usr/lib/linux-manager/metrics
TimeoutStartSec=5min
Restart=on-failure
RestartSec=15
NoNewPrivileges=yes
ProtectSystem=strict
RuntimeDirectory=linux-manager
RuntimeDirectoryPreserve=yes
ProtectHome=yes
PrivateTmp=yes
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,7 @@
[Unit]
Description=Linux Manager PKI maintenance
Documentation=file:/usr/share/doc/linux-manager/README.md
[Service]
Type=oneshot
ExecStart=/usr/sbin/linux-manager-ca maintain
@@ -0,0 +1,10 @@
[Unit]
Description=Linux Manager PKI maintenance schedule
Documentation=file:/usr/share/doc/linux-manager/README.md
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target
@@ -1,13 +1,13 @@
[Unit]
Description=VPN Router DNS resolver of the remote access clients
Documentation=file:/usr/share/doc/vpn-router/README.md
Description=Linux Manager DNS resolver of the remote access clients
Documentation=file:/usr/share/doc/linux-manager/README.md
After=network-online.target systemd-resolved.service
Wants=network-online.target
ConditionPathExists=/etc/vpn-router/dnsmasq.conf
ConditionPathExists=/etc/linux-manager/dnsmasq.conf
[Service]
Type=simple
ExecStart=/usr/sbin/dnsmasq --keep-in-foreground --pid-file= --log-facility=- --conf-file=/etc/vpn-router/dnsmasq.conf
ExecStart=/usr/sbin/dnsmasq --keep-in-foreground --pid-file= --log-facility=- --conf-file=/etc/linux-manager/dnsmasq.conf
Restart=on-failure
RestartSec=5
@@ -1,13 +1,13 @@
[Unit]
Description=VPN Router Setup
Documentation=file:/usr/share/doc/vpn-router/README.md
Description=Linux Manager Setup
Documentation=file:/usr/share/doc/linux-manager/README.md
Wants=network-online.target postgresql.service
After=network-online.target docker.service postgresql.service
[Service]
Type=oneshot
ExecStartPre=/usr/lib/vpn-router/wait-for-libpq
ExecStart=/usr/lib/vpn-router/setup
ExecStartPre=/usr/lib/linux-manager/wait-for-libpq
ExecStart=/usr/lib/linux-manager/setup
RemainAfterExit=yes
[Install]
@@ -1,19 +1,19 @@
[Unit]
Description=VPN Router Manager web application
Documentation=file:/usr/share/doc/vpn-router/README.md
Description=Ubuntu Linux Manager web application
Documentation=file:/usr/share/doc/linux-manager/README.md
After=network-online.target postgresql.service
Wants=network-online.target
[Service]
Type=simple
ExecStartPre=/usr/lib/vpn-router/wait-for-libpq
ExecStart=/usr/bin/python3 /usr/lib/vpn-router/manager
ExecStartPre=/usr/lib/linux-manager/wait-for-libpq
ExecStart=/usr/bin/python3 /usr/lib/linux-manager/manager
TimeoutStartSec=5min
Restart=on-failure
RestartSec=15
NoNewPrivileges=yes
ProtectSystem=strict
ReadWritePaths=-/etc/vpn-router
ReadWritePaths=-/etc/linux-manager
ProtectHome=yes
PrivateTmp=yes
@@ -0,0 +1,23 @@
[Unit]
Description=Linux Manager status web service
Documentation=file:/usr/share/doc/linux-manager/README.md
After=network-online.target postgresql.service
Wants=network-online.target
[Service]
Type=simple
ExecStartPre=/usr/lib/linux-manager/wait-for-libpq
ExecStart=/usr/bin/python3 /usr/lib/linux-manager/web
TimeoutStartSec=5min
Restart=on-failure
RestartSec=15
NoNewPrivileges=yes
ProtectSystem=strict
RuntimeDirectory=linux-manager
RuntimeDirectoryPreserve=yes
ReadWritePaths=-/etc/linux-manager -/etc/swanctl/x509crl -/etc/openvpn/server -/var/lib/linux-manager/pki-publish -/var/lib/linux-manager/sites
ProtectHome=yes
PrivateTmp=yes
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,21 @@
[Unit]
Description=Linux Manager WebDAV of the web sites' folders
Documentation=file:/usr/share/doc/linux-manager/README.md
After=network-online.target slapd.service postgresql.service
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/rclone serve webdav --addr 127.0.0.1:7446 --auth-proxy /usr/lib/linux-manager/webdav-auth --config /dev/null --cache-dir /var/cache/linux-manager-webdav --vfs-cache-mode writes --umask 022
Restart=on-failure
RestartSec=15
NoNewPrivileges=yes
ProtectSystem=strict
ReadWritePaths=/var/lib/linux-manager/sites
CacheDirectory=linux-manager-webdav
RuntimeDirectory=linux-manager-webdav
ProtectHome=yes
PrivateTmp=yes
[Install]
WantedBy=multi-user.target
+48 -49
View File
@@ -16,84 +16,83 @@ answer() {
case "$1" in
configure)
# --- Read the installer's answers ---
answer vpn-router/platform; VPN_ROUTER_PLATFORM="$ANSWER"
answer vpn-router/mode; VPN_ROUTER_MODE="$ANSWER"
answer vpn-router/int_addr; VPN_ROUTER_INT_ADDR="$ANSWER"
answer vpn-router/external_interface; VPN_ROUTER_EXTERNAL_INTERFACE="$ANSWER"
answer vpn-router/internal_interface; VPN_ROUTER_INTERNAL_INTERFACE="$ANSWER"
answer vpn-router/local_fqdn; VPN_ROUTER_LOCAL_FQDN="$ANSWER"
answer vpn-router/local_id_mode; VPN_ROUTER_LOCAL_ID_MODE="$ANSWER"
answer vpn-router/local_cidrs; VPN_ROUTER_LOCAL_CIDRS="$ANSWER"
answer vpn-router/int_gateway_ip; VPN_ROUTER_INT_GATEWAY_IP="$ANSWER"
answer vpn-router/remote_addrs; VPN_ROUTER_REMOTE_ADDRS="$ANSWER"
answer vpn-router/remote_id; VPN_ROUTER_REMOTE_ID="$ANSWER"
answer vpn-router/remote_cidrs; VPN_ROUTER_REMOTE_CIDRS="$ANSWER"
answer vpn-router/psk; VPN_ROUTER_PSK="$ANSWER"
answer vpn-router/p2s_enabled; VPN_ROUTER_P2S_ENABLED="$ANSWER"
answer vpn-router/p2s_address_pool; VPN_ROUTER_P2S_ADDRESS_POOL="$ANSWER"
answer vpn-router/pki_root_name; VPN_ROUTER_PKI_ROOT_NAME="$ANSWER"
answer vpn-router/wg_enabled; VPN_ROUTER_WG_ENABLED="$ANSWER"
answer vpn-router/wg_address; VPN_ROUTER_WG_ADDRESS="$ANSWER"
answer vpn-router/wg_listen_port; VPN_ROUTER_WG_LISTEN_PORT="$ANSWER"
answer linux-manager/platform; LINUX_MANAGER_PLATFORM="$ANSWER"
answer linux-manager/mode; LINUX_MANAGER_MODE="$ANSWER"
answer linux-manager/router_enabled; LINUX_MANAGER_ROUTER_ENABLED="$ANSWER"
answer linux-manager/vpn_enabled; LINUX_MANAGER_VPN_ENABLED="$ANSWER"
answer linux-manager/int_addr; LINUX_MANAGER_INT_ADDR="$ANSWER"
answer linux-manager/external_interface; LINUX_MANAGER_EXTERNAL_INTERFACE="$ANSWER"
answer linux-manager/internal_interface; LINUX_MANAGER_INTERNAL_INTERFACE="$ANSWER"
answer linux-manager/local_fqdn; LINUX_MANAGER_LOCAL_FQDN="$ANSWER"
answer linux-manager/local_id_mode; LINUX_MANAGER_LOCAL_ID_MODE="$ANSWER"
answer linux-manager/local_cidrs; LINUX_MANAGER_LOCAL_CIDRS="$ANSWER"
answer linux-manager/int_gateway_ip; LINUX_MANAGER_INT_GATEWAY_IP="$ANSWER"
answer linux-manager/remote_addrs; LINUX_MANAGER_REMOTE_ADDRS="$ANSWER"
answer linux-manager/remote_id; LINUX_MANAGER_REMOTE_ID="$ANSWER"
answer linux-manager/remote_cidrs; LINUX_MANAGER_REMOTE_CIDRS="$ANSWER"
answer linux-manager/psk; LINUX_MANAGER_PSK="$ANSWER"
answer linux-manager/p2s_enabled; LINUX_MANAGER_P2S_ENABLED="$ANSWER"
answer linux-manager/p2s_address_pool; LINUX_MANAGER_P2S_ADDRESS_POOL="$ANSWER"
answer linux-manager/pki_root_name; LINUX_MANAGER_PKI_ROOT_NAME="$ANSWER"
answer linux-manager/wg_enabled; LINUX_MANAGER_WG_ENABLED="$ANSWER"
answer linux-manager/wg_address; LINUX_MANAGER_WG_ADDRESS="$ANSWER"
answer linux-manager/wg_listen_port; LINUX_MANAGER_WG_LISTEN_PORT="$ANSWER"
export VPN_ROUTER_PLATFORM VPN_ROUTER_MODE VPN_ROUTER_INT_ADDR \
VPN_ROUTER_EXTERNAL_INTERFACE \
VPN_ROUTER_INTERNAL_INTERFACE VPN_ROUTER_LOCAL_FQDN \
VPN_ROUTER_LOCAL_ID_MODE VPN_ROUTER_LOCAL_CIDRS \
VPN_ROUTER_INT_GATEWAY_IP \
VPN_ROUTER_REMOTE_ADDRS VPN_ROUTER_REMOTE_ID \
VPN_ROUTER_REMOTE_CIDRS VPN_ROUTER_PSK \
VPN_ROUTER_P2S_ENABLED VPN_ROUTER_P2S_ADDRESS_POOL \
VPN_ROUTER_PKI_ROOT_NAME VPN_ROUTER_WG_ENABLED \
VPN_ROUTER_WG_ADDRESS VPN_ROUTER_WG_LISTEN_PORT
export LINUX_MANAGER_PLATFORM LINUX_MANAGER_MODE LINUX_MANAGER_INT_ADDR \
LINUX_MANAGER_ROUTER_ENABLED LINUX_MANAGER_VPN_ENABLED \
LINUX_MANAGER_EXTERNAL_INTERFACE \
LINUX_MANAGER_INTERNAL_INTERFACE LINUX_MANAGER_LOCAL_FQDN \
LINUX_MANAGER_LOCAL_ID_MODE LINUX_MANAGER_LOCAL_CIDRS \
LINUX_MANAGER_INT_GATEWAY_IP \
LINUX_MANAGER_REMOTE_ADDRS LINUX_MANAGER_REMOTE_ID \
LINUX_MANAGER_REMOTE_CIDRS LINUX_MANAGER_PSK \
LINUX_MANAGER_P2S_ENABLED LINUX_MANAGER_P2S_ADDRESS_POOL \
LINUX_MANAGER_PKI_ROOT_NAME LINUX_MANAGER_WG_ENABLED \
LINUX_MANAGER_WG_ADDRESS LINUX_MANAGER_WG_LISTEN_PORT
# --- Hand a candidate configuration to ucf ---
# ucf compares it against the file in /etc and decides what to do about
# local changes, prompting through debconf only for a real conflict.
# This is what makes dpkg-reconfigure apply without destroying edits.
CANDIDATE="$(mktemp)"
/usr/lib/vpn-router/generate-config "$CANDIDATE"
ucf --three-way --debconf-ok "$CANDIDATE" /etc/vpn-router/vpn-router.json
ucfr vpn-router /etc/vpn-router/vpn-router.json
chmod 0600 /etc/vpn-router/vpn-router.json
/usr/lib/linux-manager/generate-config "$CANDIDATE"
ucf --three-way --debconf-ok "$CANDIDATE" /etc/linux-manager/linux-manager.json
ucfr linux-manager /etc/linux-manager/linux-manager.json
chmod 0600 /etc/linux-manager/linux-manager.json
rm -f "$CANDIDATE"
# The key now lives in the configuration file; do not keep a copy. An
# empty answer means "leave alone" next time, so clearing it here does
# not blank the key on the next dpkg-reconfigure.
db_set vpn-router/psk ""
db_set linux-manager/psk ""
# The Router Manager's administrator account for vpn-router-setup to create, when a name and a
# The Manager's administrator account for linux-manager-setup to create, when a name and a
# password were given; the answers are cleared so that a later run does not ask for it again.
db_get vpn-router/admin_username
db_get linux-manager/admin_username
ADMIN_USERNAME="$RET"
db_get vpn-router/admin_password
db_get linux-manager/admin_password
ADMIN_PASSWORD="$RET"
if [ -n "$ADMIN_USERNAME" ] && [ -n "$ADMIN_PASSWORD" ]; then
(umask 077; ADMIN_USERNAME="$ADMIN_USERNAME" ADMIN_PASSWORD="$ADMIN_PASSWORD" python3 -c \
'import json, os, sys; json.dump({"username": os.environ["ADMIN_USERNAME"], "password": os.environ["ADMIN_PASSWORD"]}, sys.stdout)' \
> /etc/vpn-router/manager-admin.json)
> /etc/linux-manager/manager-admin.json)
elif [ -n "$ADMIN_USERNAME" ]; then
echo 'vpn-router: no administrator password was given; no Router Manager administrator is created' >&2
echo 'linux-manager: no administrator password was given; no Ubuntu Linux Manager administrator is created' >&2
fi
db_set vpn-router/admin_username ""
db_set vpn-router/admin_password ""
# Apply the sysctl drop-in shipped by this package so it takes effect
# without waiting for a reboot.
sysctl --system >/dev/null
db_set linux-manager/admin_username ""
db_set linux-manager/admin_password ""
# The firewall is not touched here. Enabling it, allowing SSH and
# setting the forward policy all belong to vpn-router-setup, which does
# setting the forward policy all belong to linux-manager-setup, which does
# them only once the configuration says this host is a router.
# The setup, web and manager services wait for libpq in the linker cache,
# which dpkg refreshes after this script, so they are started without
# waiting for them.
if [ -d /run/systemd/system ]; then
systemctl --no-block restart vpn-router-setup.service >/dev/null 2>&1 || true
systemctl --no-block restart vpn-router-web.service >/dev/null 2>&1 || true
systemctl --no-block restart vpn-router-manager.service >/dev/null 2>&1 || true
systemctl --no-block restart linux-manager-setup.service >/dev/null 2>&1 || true
systemctl --no-block restart linux-manager-web.service >/dev/null 2>&1 || true
systemctl --no-block restart linux-manager-ui.service >/dev/null 2>&1 || true
fi
;;
esac
+41 -40
View File
@@ -37,55 +37,56 @@ case "$1" in
# Let ucf forget the file before it is removed, or a reinstall finds a
# stale hash and declines to lay the file down again.
if command -v ucf >/dev/null 2>&1; then
ucf --purge /etc/vpn-router/vpn-router.json
ucf --purge /etc/linux-manager/linux-manager.json
fi
if command -v ucfr >/dev/null 2>&1; then
ucfr --purge vpn-router /etc/vpn-router/vpn-router.json
ucfr --purge linux-manager /etc/linux-manager/linux-manager.json
fi
rm -f /etc/swanctl/conf.d/site-to-site.conf \
/etc/swanctl/conf.d/road-warrior.conf \
/etc/systemd/resolved.conf.d/p2s-forwarder.conf \
/etc/vpn-router/dnsmasq.conf \
/etc/linux-manager/dnsmasq.conf \
/etc/wireguard/wg0.conf \
/etc/openvpn/server/vpn-router.conf \
/etc/openvpn/server/vpn-router-ldap.conf \
/etc/caddy/vpn-router.Caddyfile \
/etc/powerdns/pdns.d/vpn-router.conf \
/etc/vpn-router/vpn-router.json \
/etc/vpn-router/web.key \
/etc/vpn-router/oidc.key \
/etc/vpn-router/metrics.secret \
/etc/vpn-router/manager.json \
/etc/vpn-router/manager-admin.json \
/var/lib/vpn-router/upgrade.json \
/var/lib/vpn-router/upgrade.log \
/var/lib/vpn-router/system-upgrade.json \
/var/lib/vpn-router/system-upgrade.log \
/etc/systemd/system/vpn-router-backup.timer.d/schedule.conf \
/etc/sudoers.d/vpn-router \
/etc/ssh/sshd_config.d/vpn-router.conf \
/var/lib/vpn-router/setup.done \
/var/lib/vpn-router/backup.json
rmdir --ignore-fail-on-non-empty /etc/systemd/system/vpn-router-backup.timer.d 2>/dev/null || true
# The name service no longer looks up the console accounts of the router's directory.
/etc/openvpn/server/linux-manager.conf \
/etc/openvpn/server/linux-manager-ldap.conf \
/etc/caddy/linux-manager.Caddyfile \
/etc/sysctl.d/99-linux-manager.conf \
/etc/powerdns/pdns.d/linux-manager.conf \
/etc/linux-manager/linux-manager.json \
/etc/linux-manager/web.key \
/etc/linux-manager/oidc.key \
/etc/linux-manager/metrics.secret \
/etc/linux-manager/manager.json \
/etc/linux-manager/manager-admin.json \
/var/lib/linux-manager/upgrade.json \
/var/lib/linux-manager/upgrade.log \
/var/lib/linux-manager/system-upgrade.json \
/var/lib/linux-manager/system-upgrade.log \
/etc/systemd/system/linux-manager-backup.timer.d/schedule.conf \
/etc/sudoers.d/linux-manager \
/etc/ssh/sshd_config.d/linux-manager.conf \
/var/lib/linux-manager/setup.done \
/var/lib/linux-manager/backup.json
rmdir --ignore-fail-on-non-empty /etc/systemd/system/linux-manager-backup.timer.d 2>/dev/null || true
# The name service no longer looks up the console accounts of the server's directory.
sed -i '/^passwd:/s/ ldap\b//' /etc/nsswitch.conf
rm -rf /var/lib/vpn-router/backup/staging /var/lib/vpn-router/backup/restore \
/var/lib/vpn-router/pki-publish /etc/caddy/vpn-router-pki /etc/caddy/vpn-router-sites \
/etc/openvpn/server/vpn-router-ca.pem /etc/openvpn/server/vpn-router-crl.pem
rmdir --ignore-fail-on-non-empty /var/lib/vpn-router/backup /var/lib/vpn-router 2>/dev/null || true
rm -rf /var/lib/linux-manager/backup/staging /var/lib/linux-manager/backup/restore \
/var/lib/linux-manager/pki-publish /etc/caddy/linux-manager-pki /etc/caddy/linux-manager-sites \
/etc/openvpn/server/linux-manager-ca.pem /etc/openvpn/server/linux-manager-crl.pem
rmdir --ignore-fail-on-non-empty /var/lib/linux-manager/backup /var/lib/linux-manager 2>/dev/null || true
# The refresh tokens' database and role, when the package created them.
if [ -f /etc/vpn-router/database.secret ] && command -v psql >/dev/null 2>&1; then
runuser -u postgres -- psql -X -q -c 'DROP DATABASE IF EXISTS "vpn-router"' || true
runuser -u postgres -- psql -X -q -c 'DROP ROLE IF EXISTS "vpn-router"' || true
if [ -f /etc/linux-manager/database.secret ] && command -v psql >/dev/null 2>&1; then
runuser -u postgres -- psql -X -q -c 'DROP DATABASE IF EXISTS "linux-manager"' || true
runuser -u postgres -- psql -X -q -c 'DROP ROLE IF EXISTS "linux-manager"' || true
fi
rm -f /etc/vpn-router/database.secret
rm -f /etc/linux-manager/database.secret
# The databases and roles of the web sites, of the name server and of the Router Manager's sessions,
# The databases and roles of the web sites, of the name server and of the Manager's sessions,
# when the package created them.
for database in vpn-router-sites vpn-router-dns vpn-router-manager; do
secret="/etc/vpn-router/${database#vpn-router-}-database.secret"
for database in linux-manager-sites linux-manager-dns linux-manager-ui; do
secret="/etc/linux-manager/${database#linux-manager-}-database.secret"
if [ -f "$secret" ] && command -v psql >/dev/null 2>&1; then
runuser -u postgres -- psql -X -q -c "DROP DATABASE IF EXISTS \"$database\"" || true
runuser -u postgres -- psql -X -q -c "DROP ROLE IF EXISTS \"$database\"" || true
@@ -93,14 +94,14 @@ case "$1" in
rm -f "$secret"
done
# Key material, users and content are not package state: /etc/vpn-router/pki,
# /etc/vpn-router/ldap, /etc/vpn-router/rclone.conf, the user directory
# Key material, users and content are not package state: /etc/linux-manager/pki,
# /etc/linux-manager/ldap, /etc/linux-manager/rclone.conf, the user directory
# in slapd, the WireGuard key pair, everything under /etc/swanctl, the
# files of the web sites in /var/lib/vpn-router/sites, the backups and
# files of the web sites in /var/lib/linux-manager/sites, the backups and
# what a restore replaced are left in place. Caddy, rclone and PowerDNS
# stay installed, so Caddy's repository, which vpn-router-caddy
# stay installed, so Caddy's repository, which linux-manager-caddy
# configures, stays too.
rmdir --ignore-fail-on-non-empty /etc/vpn-router 2>/dev/null || true
rmdir --ignore-fail-on-non-empty /etc/linux-manager 2>/dev/null || true
;;
esac
+6 -6
View File
@@ -6,22 +6,22 @@ case "$1" in
# Stop offering the tunnels, but leave strongSwan itself enabled: it is
# a shared service and may be in use by something other than this
# package. The connection files are removed on purge.
# The site-to-site connections are the names of site_to_site in vpn-router.json.
# The site-to-site connections are the names of site_to_site in linux-manager.json.
if [ -d /run/systemd/system ]; then
connections="$(python3 -c 'import json, sys; print(" ".join(json.load(open(sys.argv[1])).get("site_to_site", {})))' \
/etc/vpn-router/vpn-router.json 2>/dev/null || true)"
/etc/linux-manager/linux-manager.json 2>/dev/null || true)"
for connection in $connections; do
swanctl --terminate --ike "$connection" >/dev/null 2>&1 || true
done
swanctl --terminate --ike road-warrior >/dev/null 2>&1 || true
fi
# vpn-router-setup enabled wg-quick@wg0, openvpn-server@vpn-router,
# caddy, vpn-router-metrics, the backup timer and the PKI timer, so the
# linux-manager-setup enabled wg-quick@wg0, openvpn-server@linux-manager,
# caddy, linux-manager-metrics, the backup timer and the PKI timer, so the
# package takes them down again. Use the debhelper wrappers rather than
# systemctl, so the script behaves on a machine without systemd.
for unit in wg-quick@wg0.service openvpn-server@vpn-router.service caddy.service vpn-router-metrics.service \
vpn-router-backup.timer vpn-router-pki.timer; do
for unit in wg-quick@wg0.service openvpn-server@linux-manager.service caddy.service linux-manager-metrics.service \
linux-manager-backup.timer linux-manager-pki.timer; do
if command -v deb-systemd-invoke >/dev/null 2>&1; then
deb-systemd-invoke stop "$unit" >/dev/null 2>&1 || true
fi
+12 -12
View File
@@ -6,15 +6,15 @@ override_dh_auto_build:
test -f web/dist/index.html
override_dh_installsystemd:
dh_installsystemd --name=vpn-router-setup --no-start
dh_installsystemd --name=vpn-router-manager --no-start
dh_installsystemd --name=vpn-router-docker
dh_installsystemd --name=vpn-router-web --no-start
dh_installsystemd --name=vpn-router-metrics --no-enable --no-start
dh_installsystemd --name=vpn-router-bootstrap --no-enable --no-start
dh_installsystemd --name=vpn-router-backup --no-enable --no-start
dh_installsystemd --name=vpn-router-pki --no-enable --no-start
dh_installsystemd --name=vpn-router-caddy --no-enable --no-start
dh_installsystemd --name=vpn-router-webdav --no-enable --no-start
dh_installsystemd --name=vpn-router-resolver --no-enable --no-start
dh_installsystemd --name=vpn-router-install@ --no-enable --no-start
dh_installsystemd --name=linux-manager-setup --no-start
dh_installsystemd --name=linux-manager-ui --no-start
dh_installsystemd --name=linux-manager-docker
dh_installsystemd --name=linux-manager-web --no-start
dh_installsystemd --name=linux-manager-metrics --no-enable --no-start
dh_installsystemd --name=linux-manager-bootstrap --no-enable --no-start
dh_installsystemd --name=linux-manager-backup --no-enable --no-start
dh_installsystemd --name=linux-manager-pki --no-enable --no-start
dh_installsystemd --name=linux-manager-caddy --no-enable --no-start
dh_installsystemd --name=linux-manager-webdav --no-enable --no-start
dh_installsystemd --name=linux-manager-resolver --no-enable --no-start
dh_installsystemd --name=linux-manager-install@ --no-enable --no-start
+49 -33
View File
@@ -1,4 +1,4 @@
Template: vpn-router/platform
Template: linux-manager/platform
Type: select
Choices: none, generic, azure, gcp
Default: none
@@ -7,31 +7,31 @@ Description: Platform:
additions, such as the provider DNS resolver for IKEv2 clients.
.
none defers configuration entirely: the package installs its files and
changes nothing on the machine. Choose it when the router will be configured
changes nothing on the machine. Choose it when the server will be configured
later by hand or by a configuration-management tool, then set the platform in
/etc/vpn-router/vpn-router.json when you are ready.
/etc/linux-manager/linux-manager.json when you are ready.
.
generic configures the router with no platform-specific additions.
generic configures the server with no platform-specific additions.
Template: vpn-router/admin_username
Template: linux-manager/admin_username
Type: string
Default:
Description: Name of the Router Manager's administrator account:
The Router Manager can have a first administrator: a Manager-only account
of the router's user directory, a member of the group admins, which may
sign in to the Router Manager but has no VPN access. vpn-router-setup
Description: Name of the Manager's administrator account:
The Manager can have a first administrator: a Manager-only account
of the server's user directory, a member of the group admins, which may
sign in to the Manager but has no VPN access. linux-manager-setup
creates it.
.
Leave this empty to create no account and no group.
Template: vpn-router/admin_password
Template: linux-manager/admin_password
Type: password
Description: Password of the administrator account:
The password of the administrator account, 8 to 128 characters. It is
passed to vpn-router-setup in a file readable by root only, which is removed
passed to linux-manager-setup in a file readable by root only, which is removed
once the account exists, and not kept by debconf.
Template: vpn-router/mode
Template: linux-manager/mode
Type: select
Choices: manual, interfaces, auto
Default: manual
@@ -49,7 +49,23 @@ Description: Network configuration source:
table and their addresses read from the system. Convenient, but it can pick
the wrong interface and configure the machine incorrectly.
Template: vpn-router/external_interface
Template: linux-manager/router_enabled
Type: boolean
Default: false
Description: Enable the router?
If enabled, the server routes between its external and internal
interfaces and runs the site-to-site connections. Without the router the
server needs one interface, and the VPN clients reach the server's
networks through NAT from its address.
Template: linux-manager/vpn_enabled
Type: boolean
Default: false
Description: Enable the VPN?
If enabled, IKEv2, OpenVPN and WireGuard access can be switched on for
the users. Without the VPN none of them runs.
Template: linux-manager/external_interface
Type: string
Default:
Description: External network interface:
@@ -57,21 +73,21 @@ Description: External network interface:
ens4. The addresses strongSwan binds on are read from it, so they are never
configured separately.
Template: vpn-router/internal_interface
Template: linux-manager/internal_interface
Type: string
Default:
Description: Internal network interface:
Name of the interface facing the protected network, for example eth1 or
ens5. Routes for the local subnets are applied to it.
Template: vpn-router/int_addr
Template: linux-manager/int_addr
Type: string
Default:
Description: Internal interface address:
This host's own address on the internal network. Asked only in manual mode;
in the other modes it is read from the internal interface.
Template: vpn-router/local_fqdn
Template: linux-manager/local_fqdn
Type: string
Default:
Description: Local router FQDN:
@@ -79,7 +95,7 @@ Description: Local router FQDN:
router.example.com). Used as the IKEv2 server identity and
certificate common name.
Template: vpn-router/local_id_mode
Template: linux-manager/local_id_mode
Type: select
Choices: fqdn, public_ip, internal_ip
Default: fqdn
@@ -93,7 +109,7 @@ Description: IKE local identity mode:
.
internal_ip - use the internal NIC address.
Template: vpn-router/local_cidrs
Template: linux-manager/local_cidrs
Type: string
Default:
Description: Local subnet CIDR(s):
@@ -101,7 +117,7 @@ Description: Local subnet CIDR(s):
advertised into the first site-to-site connection (for example
10.0.0.0/24 or 10.0.0.0/24,10.0.1.0/24).
Template: vpn-router/int_gateway_ip
Template: linux-manager/int_gateway_ip
Type: string
Default:
Description: Internal network gateway address:
@@ -109,55 +125,55 @@ Description: Internal network gateway address:
local subnets listed above. Asked only in manual mode; in the other modes it
is derived from the internal interface.
Template: vpn-router/remote_addrs
Template: linux-manager/remote_addrs
Type: string
Default:
Description: Remote site WAN IP address(es):
Comma-separated list of remote gateway addresses or FQDNs for the
first site-to-site connection.
Template: vpn-router/remote_id
Template: linux-manager/remote_id
Type: string
Default:
Description: Remote site IKE identity:
IKE identity of the remote peer of the first site-to-site connection,
without a leading @.
Template: vpn-router/remote_cidrs
Template: linux-manager/remote_cidrs
Type: string
Default:
Description: Remote subnet CIDR(s):
Comma-separated list of remote subnet CIDRs reachable through the
first site-to-site connection (for example 192.168.0.0/24).
Template: vpn-router/psk
Template: linux-manager/psk
Type: password
Description: Pre-shared key (PSK):
Pre-shared key of the first site-to-site connection. Must match the value
configured on the remote peer. Stored in the configuration file and cleared
from the debconf database after installation.
Template: vpn-router/p2s_enabled
Template: linux-manager/p2s_enabled
Type: boolean
Default: false
Description: Enable IKEv2 access?
If enabled, this router accepts IKEv2 EAP-TLS connections from individual
clients, with certificates of the router's P2S issuing CA.
clients, with certificates of the server's P2S issuing CA.
Template: vpn-router/p2s_address_pool
Template: linux-manager/p2s_address_pool
Type: string
Default:
Description: IKEv2 address pool:
CIDR block assigned to IKEv2 clients (for example 172.16.0.0/24).
Template: vpn-router/pki_root_name
Template: linux-manager/pki_root_name
Type: string
Default: VPN Router Root CA
Default: Linux Manager Root CA
Description: Root CA name:
Common name of the root certificate authority the router creates in
/etc/vpn-router/pki/root. Ignored when a root certificate is placed there.
Common name of the root certificate authority the server creates in
/etc/linux-manager/pki/root. Ignored when a root certificate is placed there.
Template: vpn-router/wg_enabled
Template: linux-manager/wg_enabled
Type: boolean
Default: false
Description: Enable WireGuard?
@@ -165,14 +181,14 @@ Description: Enable WireGuard?
the matching firewall rule is installed. Peers are added by editing
/etc/wireguard/wg0.conf.
Template: vpn-router/wg_address
Template: linux-manager/wg_address
Type: string
Default:
Description: WireGuard interface address:
Address and prefix length for the wg0 interface (for example
192.168.200.1/24).
Template: vpn-router/wg_listen_port
Template: linux-manager/wg_listen_port
Type: string
Default: 51820
Description: WireGuard listen port:
@@ -1,10 +0,0 @@
[Unit]
Description=VPN Router backup schedule
Documentation=file:/usr/share/doc/vpn-router/README.md
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target
@@ -1,14 +0,0 @@
[Unit]
Description=VPN Router bootstrap diagnostics page
Documentation=file:/usr/share/doc/vpn-router/README.md
# Never enabled: vpn-router-setup starts it until a setup has succeeded, and stops it after that.
[Service]
Type=simple
ExecStart=/usr/bin/python3 /usr/lib/vpn-router/bootstrap
Restart=on-failure
RestartSec=5
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
@@ -1,10 +0,0 @@
[Unit]
Description=VPN Router Caddy installation
Documentation=file:/usr/share/doc/vpn-router/README.md
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/vpn-router-caddy apply
TimeoutStartSec=20min
@@ -1,14 +0,0 @@
[Unit]
Description=VPN Router rules for Docker published ports
Documentation=file:/usr/share/doc/vpn-router/README.md
After=docker.service
PartOf=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/vpn-router/docker-rules apply
ExecStop=/usr/lib/vpn-router/docker-rules remove
[Install]
WantedBy=docker.service
@@ -1,10 +0,0 @@
[Unit]
Description=VPN Router installation of the packages of %i
Documentation=file:/usr/share/doc/vpn-router/README.md
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/lib/vpn-router/install-packages %i
TimeoutStartSec=20min
@@ -1,22 +0,0 @@
[Unit]
Description=VPN Router metrics service
Documentation=file:/usr/share/doc/vpn-router/README.md
After=network-online.target postgresql.service vpn-router-web.service
Wants=network-online.target
[Service]
Type=simple
ExecStartPre=/usr/lib/vpn-router/wait-for-libpq
ExecStart=/usr/bin/python3 /usr/lib/vpn-router/metrics
TimeoutStartSec=5min
Restart=on-failure
RestartSec=15
NoNewPrivileges=yes
ProtectSystem=strict
RuntimeDirectory=vpn-router
RuntimeDirectoryPreserve=yes
ProtectHome=yes
PrivateTmp=yes
[Install]
WantedBy=multi-user.target
@@ -1,7 +0,0 @@
[Unit]
Description=VPN Router PKI maintenance
Documentation=file:/usr/share/doc/vpn-router/README.md
[Service]
Type=oneshot
ExecStart=/usr/sbin/vpn-router-ca maintain
@@ -1,10 +0,0 @@
[Unit]
Description=VPN Router PKI maintenance schedule
Documentation=file:/usr/share/doc/vpn-router/README.md
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target
@@ -1,23 +0,0 @@
[Unit]
Description=VPN Router status web service
Documentation=file:/usr/share/doc/vpn-router/README.md
After=network-online.target postgresql.service
Wants=network-online.target
[Service]
Type=simple
ExecStartPre=/usr/lib/vpn-router/wait-for-libpq
ExecStart=/usr/bin/python3 /usr/lib/vpn-router/web
TimeoutStartSec=5min
Restart=on-failure
RestartSec=15
NoNewPrivileges=yes
ProtectSystem=strict
RuntimeDirectory=vpn-router
RuntimeDirectoryPreserve=yes
ReadWritePaths=-/etc/vpn-router -/etc/swanctl/x509crl -/etc/openvpn/server -/var/lib/vpn-router/pki-publish -/var/lib/vpn-router/sites
ProtectHome=yes
PrivateTmp=yes
[Install]
WantedBy=multi-user.target
@@ -1,21 +0,0 @@
[Unit]
Description=VPN Router WebDAV of the web sites' folders
Documentation=file:/usr/share/doc/vpn-router/README.md
After=network-online.target slapd.service postgresql.service
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/rclone serve webdav --addr 127.0.0.1:7446 --auth-proxy /usr/lib/vpn-router/webdav-auth --config /dev/null --cache-dir /var/cache/vpn-router-webdav --vfs-cache-mode writes --umask 022
Restart=on-failure
RestartSec=15
NoNewPrivileges=yes
ProtectSystem=strict
ReadWritePaths=/var/lib/vpn-router/sites
CacheDirectory=vpn-router-webdav
RuntimeDirectory=vpn-router-webdav
ProtectHome=yes
PrivateTmp=yes
[Install]
WantedBy=multi-user.target