Update port config
This commit is contained in:
parent
f2e2700acb
commit
aa79162e2c
6 changed files with 33 additions and 21 deletions
|
|
@ -1,22 +1,22 @@
|
|||
{ config, ... }:
|
||||
|
||||
let hn = config.networking.hostName; in {
|
||||
networking = let wg = { interface = "wgs"; port = 45556; }; in {
|
||||
let hn = config.networking.hostName; port = config.constants.port; wgi = "wgs"; in {
|
||||
networking = {
|
||||
domain = config.constants.domain;
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 80 443 50051 ];
|
||||
allowedUDPPorts = [ wg.port ];
|
||||
allowedTCPPorts = with port; [ http https xray ];
|
||||
allowedUDPPorts = with port; [ wireguard-server ];
|
||||
};
|
||||
hostId = "2cadb253";
|
||||
nat = {
|
||||
enable = true;
|
||||
externalInterface = "ens18";
|
||||
internalInterfaces = [ wg.interface ];
|
||||
internalInterfaces = [ wgi ];
|
||||
};
|
||||
nftables.enable = true;
|
||||
wireguard.interfaces.${wg.interface} = {
|
||||
wireguard.interfaces.${wgi} = {
|
||||
ips = [ "10.32.54.76/24" ];
|
||||
listenPort = wg.port;
|
||||
listenPort = port.wireguard-server;
|
||||
peers = [
|
||||
{
|
||||
allowedIPs = [ "10.32.54.2/32" ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue