aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/services/networking/firewall.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/services/networking/firewall.nix')
-rw-r--r--nixpkgs/nixos/modules/services/networking/firewall.nix15
1 files changed, 3 insertions, 12 deletions
diff --git a/nixpkgs/nixos/modules/services/networking/firewall.nix b/nixpkgs/nixos/modules/services/networking/firewall.nix
index 5919962837a..15aaf741067 100644
--- a/nixpkgs/nixos/modules/services/networking/firewall.nix
+++ b/nixpkgs/nixos/modules/services/networking/firewall.nix
@@ -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.
'';