nixos: fix ip46tables invocation in nat
This commit is contained in:
@@ -42,16 +42,7 @@ let
|
||||
|
||||
kernelHasRPFilter = ((kernel.config.isEnabled or (x: false)) "IP_NF_MATCH_RPFILTER") || (kernel.features.netfilterRPFilter or false);
|
||||
|
||||
helpers =
|
||||
''
|
||||
# Helper command to manipulate both the IPv4 and IPv6 tables.
|
||||
ip46tables() {
|
||||
iptables -w "$@"
|
||||
${optionalString config.networking.enableIPv6 ''
|
||||
ip6tables -w "$@"
|
||||
''}
|
||||
}
|
||||
'';
|
||||
helpers = import ./helpers.nix { inherit config lib; };
|
||||
|
||||
writeShScript = name: text: let dir = pkgs.writeScriptBin name ''
|
||||
#! ${pkgs.runtimeShell} -e
|
||||
@@ -271,7 +262,7 @@ let
|
||||
apply = canonicalizePortList;
|
||||
example = [ 22 80 ];
|
||||
description =
|
||||
''
|
||||
''
|
||||
List of TCP ports on which incoming connections are
|
||||
accepted.
|
||||
'';
|
||||
@@ -282,7 +273,7 @@ let
|
||||
default = [ ];
|
||||
example = [ { from = 8999; to = 9003; } ];
|
||||
description =
|
||||
''
|
||||
''
|
||||
A range of TCP ports on which incoming connections are
|
||||
accepted.
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user