openvpn: enabled IP forwarding
This commit is contained in:
parent
9ec97fbda5
commit
4b3c971a12
|
@ -21,6 +21,9 @@ in
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = [ pkgs.openvpn ]; # To generate keys with openvpn --genkey --secret <name>.key
|
environment.systemPackages = [ pkgs.openvpn ]; # To generate keys with openvpn --genkey --secret <name>.key
|
||||||
|
|
||||||
|
# Enable IP forwarding to allow the VPN to act as a gateway.
|
||||||
|
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||||
|
|
||||||
networking.nat = {
|
networking.nat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
inherit externalInterface;
|
inherit externalInterface;
|
||||||
|
|
Loading…
Reference in a new issue