fix forwading
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.syscfg.net.wg;
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
config = lib.mkIf (config.syscfg.net.wg.server.enable) {
|
||||
boot.kernel.sysctl = {
|
||||
"net.ipv4.ip_forward" = 1;
|
||||
@@ -32,7 +24,7 @@ in
|
||||
iifname "${from}" tcp dport ${toString src} counter dnat to ${to}:${toString dst}
|
||||
iifname "${from}" udp dport ${toString src} counter dnat to ${to}:${toString dst}
|
||||
''
|
||||
) cfg.forwarding.ports}
|
||||
) config.syscfg.net.wg.server.forward}
|
||||
}
|
||||
|
||||
chain postrouting {
|
||||
|
||||
Reference in New Issue
Block a user