Skip to content
Permalink
Browse files

nixos/openvpn: support setting IP forwarding

  • Loading branch information
peterhoeg committed Jun 21, 2019
1 parent 282041f commit 56559680a13adf8c0c78f537c7c1be94c7aec7a5
Showing with 10 additions and 0 deletions.
  1. +10 −0 nixos/modules/services/networking/openvpn.nix
@@ -78,6 +78,14 @@ in

options = {

services.openvpn.enableForwarding = mkOption {
default = false;
type = types.bool;
description = ''
Set up IP forwarding on the host.
'';
};

services.openvpn.servers = mkOption {
default = {};

@@ -211,6 +219,8 @@ in

boot.kernelModules = [ "tun" ];

boot.kernel.sysctl = lib.mkIf cfg.enableForwarding { "net.ipv4.ip_forward" = true; };

};

}

0 comments on commit 5655968

Please sign in to comment.
You can’t perform that action at this time.