Reengineed the code. Generalized the package. Cloud configurators are modules.
This commit is contained in:
1 parent
be4bb34bb0
commit
083ad9a596
40 files changed
+2367
-650
No files matched your search
@@ -1,7 +0,0 @@
|
||||
network:
|
||||
version: 2
|
||||
ethernets:
|
||||
eth1:
|
||||
routes:
|
||||
- to: {{ local_subnet }}
|
||||
via: {{ router_int_gateway_ip }}
|
||||
@@ -1,14 +0,0 @@
|
||||
LOCAL_ADDRS="{{ local_addrs }}"
|
||||
LOCAL_FQDN="{{ local_fqdn }}"
|
||||
LOCAL_ID_MODE="{{ local_id_mode }}"
|
||||
LOCAL_CIDRS="{{ local_cidrs }}"
|
||||
LOCAL_SUBNET="{{ local_subnet }}"
|
||||
REMOTE_ADDRS="{{ remote_addrs }}"
|
||||
REMOTE_ID="{{ remote_id }}"
|
||||
REMOTE_CIDRS="{{ remote_cidrs }}"
|
||||
ROUTER_INT_GATEWAY_IP="{{ router_int_gateway_ip }}"
|
||||
P2S_ADDRESS_POOL="{{ p2s_address_pool }}"
|
||||
P2S_SERVER_NAME="{{ p2s_server_name }}"
|
||||
WG_ENABLED="{{ wg_enabled }}"
|
||||
WG_ADDRESS="{{ wg_address }}"
|
||||
WG_LISTEN_PORT="{{ wg_listen_port }}"
|
||||
@@ -1,2 +0,0 @@
|
||||
[Resolve]
|
||||
DNSStubListenerExtra={{ local_addrs }}
|
||||
@@ -0,0 +1,69 @@
|
||||
# Example vpn-router configuration.
|
||||
#
|
||||
# This file is documentation. The live configuration is
|
||||
# /etc/vpn-router/vpn-router.conf, which is generated on first install and
|
||||
# owned by the operator afterwards. Copy settings from here as needed.
|
||||
#
|
||||
# Format: INI. Lists are comma-separated, booleans are true/false, an empty
|
||||
# value means unset, and a _b64 suffix means the value is base64-encoded.
|
||||
#
|
||||
# Comments start with # or ; and may follow a value on the same line. That
|
||||
# means # and ; cannot appear inside a value - which is why the pre-shared
|
||||
# key, the one setting that can hold arbitrary text, is base64-encoded.
|
||||
#
|
||||
# Apply any change with: systemctl restart vpn-router-setup
|
||||
#
|
||||
# Every feature is optional. A file with nothing filled in configures nothing
|
||||
# and leaves the host reachable and unchanged.
|
||||
|
||||
[general]
|
||||
# Platform module to load: generic, azure or gcp.
|
||||
platform = generic
|
||||
|
||||
[interfaces]
|
||||
# The two inputs everything else is built on. Names only: the addresses on
|
||||
# these interfaces are read from the system, never configured here.
|
||||
# External faces the untrusted network; internal faces the protected one.
|
||||
external =
|
||||
internal =
|
||||
|
||||
[wan]
|
||||
# This router's fully-qualified domain name.
|
||||
local_fqdn =
|
||||
# Source of the local IKE identity: fqdn | public_ip | internal_ip
|
||||
# fqdn - use local_fqdn (must match what the peer expects)
|
||||
# public_ip - resolve local_fqdn at boot and use the address
|
||||
# internal_ip - use the address on the internal interface
|
||||
local_id_mode = fqdn
|
||||
|
||||
[local]
|
||||
# Local subnets advertised into the tunnel, comma-separated.
|
||||
cidrs =
|
||||
# Next hop on the internal side for the subnets above.
|
||||
int_gateway_ip =
|
||||
|
||||
[remote]
|
||||
# Remote gateway address(es) or FQDN, comma-separated.
|
||||
addrs =
|
||||
# Remote IKE identity, without a leading '@'.
|
||||
id =
|
||||
# Remote subnets reachable through the tunnel, comma-separated.
|
||||
cidrs =
|
||||
# Pre-shared key, base64-encoded: printf %s "$PSK" | base64 -w0
|
||||
psk_b64 =
|
||||
# Path to a file containing the raw PSK. Takes precedence over psk_b64.
|
||||
psk_file =
|
||||
|
||||
[p2s]
|
||||
# Road-warrior access.
|
||||
enabled = false
|
||||
# Address pool handed to road-warrior clients.
|
||||
address_pool =
|
||||
# CN for the CA created when /etc/vpn-router/pki is empty.
|
||||
ca_name = VPN Router CA
|
||||
|
||||
[wireguard]
|
||||
enabled = false
|
||||
# Address and prefix length for wg0, for example 192.168.200.1/24.
|
||||
address =
|
||||
listen_port = 51820
|
||||
@@ -0,0 +1,4 @@
|
||||
[Resolve]
|
||||
{% for address in local_addr_list -%}
|
||||
DNSStubListenerExtra={{ address }}
|
||||
{% endfor -%}
|
||||
+1
-1
@@ -21,7 +21,7 @@ connections {
|
||||
children {
|
||||
site2site {
|
||||
mode = tunnel
|
||||
local_ts = {{ local_cidrs }}
|
||||
local_ts = {{ local_ts }}
|
||||
remote_ts = {{ remote_cidrs }}
|
||||
esp_proposals = aes256-sha256,aes256-sha1
|
||||
life_time = 3600
|
||||
+2
-2
@@ -21,7 +21,7 @@ connections {
|
||||
children {
|
||||
road-warrior {
|
||||
mode = tunnel
|
||||
local_ts = {{ local_cidrs }}
|
||||
local_ts = {{ local_ts }}
|
||||
remote_ts = dynamic
|
||||
esp_proposals = aes256-sha256,aes256-sha1
|
||||
life_time = 3600
|
||||
@@ -38,6 +38,6 @@ connections {
|
||||
pools {
|
||||
rw-pool {
|
||||
addrs = {{ p2s_address_pool }}
|
||||
dns = {{ local_addrs }}
|
||||
dns = {{ p2s_dns }}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user