summaryrefslogtreecommitdiff
path: root/hosts/flex-wg-router/configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/flex-wg-router/configuration.nix')
-rw-r--r--hosts/flex-wg-router/configuration.nix22
1 files changed, 6 insertions, 16 deletions
diff --git a/hosts/flex-wg-router/configuration.nix b/hosts/flex-wg-router/configuration.nix
index 5777626..18d9667 100644
--- a/hosts/flex-wg-router/configuration.nix
+++ b/hosts/flex-wg-router/configuration.nix
@@ -1,6 +1,8 @@
{ config, lib, pkgs, ... }: let
ipAddress = "10.1.1.1";
in {
+ imports = [ ./wg.nix ];
+
# Setup bootloader
boot._loader.enable = true;
@@ -18,8 +20,8 @@ in {
_interfaceLabels = {
enable = true;
interfaces = {
- lan0 = "98:b7:85:22:9b:43"; # Internal
- wan0 = "54:ee:75:8c:4b:2d"; # External
+ lan0 = "98:b7:85:22:9b:43"; # External
+ wan0 = "54:ee:75:8c:4b:2d"; # Internal
};
};
# Set ip addresses
@@ -37,27 +39,15 @@ in {
address = "46.110.173.161";
interface = "wan0";
};
- nameservers = [ "127.0.0.1" ];
# Firewall rules
firewall = {
interfaces.wan0 = {
- allowedTCPPorts = [ 22 ];
+ allowedUDPPorts = [ 51820 ];
};
};
- #nat.forwardPorts = [
- # {
- # sourcePort = 2222;
- # proto = "tcp";
- # destination = "10.1.1.1:22";
- # }
- # {
- # sourcePort = 22;
- # proto = "tcp";
- # destination = "10.1.1.1:22";
- # }
- #];
};
+ # Router config
services._router = {
dnsDhcpConfig = {
localDomain = "wg-router.pls.lan";