about summary refs log tree commit diff
path: root/modules/nixos/shadowsocks.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-03-08 21:30:37 +0300
committerAzat Bahawi <azat@bahawi.net>2024-03-08 21:30:37 +0300
commit04be52d7b75eb62203a3af8d85e36e3584123f90 (patch)
tree5ad22924998c10c45834eadae6c0498a3ac4be1b /modules/nixos/shadowsocks.nix
parent2024-03-04 (diff)
2024-03-08
Diffstat (limited to '')
-rw-r--r--modules/nixos/shadowsocks.nix9
1 files changed, 1 insertions, 8 deletions
diff --git a/modules/nixos/shadowsocks.nix b/modules/nixos/shadowsocks.nix
index 97eb17f..69688da 100644
--- a/modules/nixos/shadowsocks.nix
+++ b/modules/nixos/shadowsocks.nix
@@ -100,14 +100,7 @@ in {
       '';
     };
 
-    networking.firewall = {
-      allowedTCPPorts = [cfg.port];
-      extraCommands = ''
-        iptables -A nixos-fw -p tcp --syn --dport ${
-          toString cfg.port
-        } -m connlimit --connlimit-above 32 -j nixos-fw-refuse
-      '';
-    };
+    networking.firewall.allowedTCPPorts = [cfg.port];
 
     # https://github.com/shadowsocks/shadowsocks/wiki/Optimizing-Shadowsocks
     boot.kernel.sysctl = {

Consider giving Nix/NixOS a try! <3