diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-10-05 22:48:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-05 22:48:24 -0500 |
commit | 33d24042d4bb277c7841577bcf04e10b38dea335 (patch) | |
tree | ae67a7b8730d3123ad287ff5d2b51b52a04562ad /nixos/modules/services/networking | |
parent | 357d32e2b3ed6557fc250b0d4b6791992ded526a (diff) | |
parent | 5fbc521bf9e5415f63ec6ae4e490cd9f0644466d (diff) | |
download | nixlib-33d24042d4bb277c7841577bcf04e10b38dea335.tar nixlib-33d24042d4bb277c7841577bcf04e10b38dea335.tar.gz nixlib-33d24042d4bb277c7841577bcf04e10b38dea335.tar.bz2 nixlib-33d24042d4bb277c7841577bcf04e10b38dea335.tar.lz nixlib-33d24042d4bb277c7841577bcf04e10b38dea335.tar.xz nixlib-33d24042d4bb277c7841577bcf04e10b38dea335.tar.zst nixlib-33d24042d4bb277c7841577bcf04e10b38dea335.zip |
Merge pull request #46443 from bobvanderlinden/pr-test-upnp
Miniupnpd and bittorrent improvements
Diffstat (limited to 'nixos/modules/services/networking')
-rw-r--r-- | nixos/modules/services/networking/miniupnpd.nix | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/nixos/modules/services/networking/miniupnpd.nix b/nixos/modules/services/networking/miniupnpd.nix index 19400edb68f9..ab714a6ac75e 100644 --- a/nixos/modules/services/networking/miniupnpd.nix +++ b/nixos/modules/services/networking/miniupnpd.nix @@ -57,32 +57,12 @@ in }; config = mkIf cfg.enable { - # from miniupnpd/netfilter/iptables_init.sh networking.firewall.extraCommands = '' - iptables -t nat -N MINIUPNPD - iptables -t nat -A PREROUTING -i ${cfg.externalInterface} -j MINIUPNPD - iptables -t mangle -N MINIUPNPD - iptables -t mangle -A PREROUTING -i ${cfg.externalInterface} -j MINIUPNPD - iptables -t filter -N MINIUPNPD - iptables -t filter -A FORWARD -i ${cfg.externalInterface} ! -o ${cfg.externalInterface} -j MINIUPNPD - iptables -t nat -N MINIUPNPD-PCP-PEER - iptables -t nat -A POSTROUTING -o ${cfg.externalInterface} -j MINIUPNPD-PCP-PEER + ${pkgs.bash}/bin/bash -x ${pkgs.miniupnpd}/etc/miniupnpd/iptables_init.sh -i ${cfg.externalInterface} ''; - # from miniupnpd/netfilter/iptables_removeall.sh networking.firewall.extraStopCommands = '' - iptables -t nat -F MINIUPNPD - iptables -t nat -D PREROUTING -i ${cfg.externalInterface} -j MINIUPNPD - iptables -t nat -X MINIUPNPD - iptables -t mangle -F MINIUPNPD - iptables -t mangle -D PREROUTING -i ${cfg.externalInterface} -j MINIUPNPD - iptables -t mangle -X MINIUPNPD - iptables -t filter -F MINIUPNPD - iptables -t filter -D FORWARD -i ${cfg.externalInterface} ! -o ${cfg.externalInterface} -j MINIUPNPD - iptables -t filter -X MINIUPNPD - iptables -t nat -F MINIUPNPD-PCP-PEER - iptables -t nat -D POSTROUTING -o ${cfg.externalInterface} -j MINIUPNPD-PCP-PEER - iptables -t nat -X MINIUPNPD-PCP-PEER + ${pkgs.bash}/bin/bash -x ${pkgs.miniupnpd}/etc/miniupnpd/iptables_removeall.sh -i ${cfg.externalInterface} ''; systemd.services.miniupnpd = { |