mirror of
https://github.com/kaesaecracker/nixos-configuration.git
synced 2025-01-18 10:30:14 +01:00
add lpt
This commit is contained in:
parent
cff4840824
commit
8b11705965
|
@ -1,4 +1,6 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: let
|
||||||
|
wg_port = 51820;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
(import ./modules {
|
(import ./modules {
|
||||||
hostName = "hetzner-vpn1";
|
hostName = "hetzner-vpn1";
|
||||||
|
@ -27,17 +29,17 @@
|
||||||
networking.nat.externalInterface = "eth0";
|
networking.nat.externalInterface = "eth0";
|
||||||
networking.nat.internalInterfaces = ["wg0"];
|
networking.nat.internalInterfaces = ["wg0"];
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedUDPPorts = [51820];
|
allowedUDPPorts = [wg_port];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.wireguard.interfaces = {
|
networking.wireguard.interfaces = {
|
||||||
# "wg0" is the network interface name. You can name the interface arbitrarily.
|
# "wg0" is the network interface name. You can name the interface arbitrarily.
|
||||||
wg0 = {
|
wg0 = {
|
||||||
# Determines the IP address and subnet of the server's end of the tunnel interface.
|
# Determines the IP address and subnet of the server's end of the tunnel interface.
|
||||||
ips = ["10.100.0.1/24"];
|
ips = ["10.100.0.1/32"];
|
||||||
|
|
||||||
# The port that WireGuard listens to. Must be accessible by the client.
|
# The port that WireGuard listens to. Must be accessible by the client.
|
||||||
listenPort = 51820;
|
listenPort = wg_port;
|
||||||
|
|
||||||
# This allows the wireguard server to route your traffic to the internet and hence be like a VPN
|
# This allows the wireguard server to route your traffic to the internet and hence be like a VPN
|
||||||
# For this to work you have to set the dnsserver IP of your router (or dnsserver of choice) in your clients
|
# For this to work you have to set the dnsserver IP of your router (or dnsserver of choice) in your clients
|
||||||
|
@ -59,7 +61,13 @@
|
||||||
# Phone
|
# Phone
|
||||||
publicKey = "/sjNk9rXaMdrCHD2kmut1AXD1UhF1xcZ4ju+EmFGcCk=";
|
publicKey = "/sjNk9rXaMdrCHD2kmut1AXD1UhF1xcZ4ju+EmFGcCk=";
|
||||||
# List of IPs assigned to this peer within the tunnel subnet. Used to configure routing.
|
# List of IPs assigned to this peer within the tunnel subnet. Used to configure routing.
|
||||||
#allowedIPs = ["10.100.0.2/32"];
|
allowedIPs = ["10.100.0.2/32"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# vinzenz-lpt
|
||||||
|
publicKey = "D/6431f8oJ61C5vjjEIpY5Rc750oK4yVh9B/32q4xAE=";
|
||||||
|
# List of IPs assigned to this peer within the tunnel subnet. Used to configure routing.
|
||||||
|
allowedIPs = ["10.100.0.3/32"];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue