From ebb22b579dbcc095411fe907d7be978cab7e05f2 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 15 Nov 2021 23:49:12 +0059 Subject: vidhar: ... --- hosts/vidhar/default.nix | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'hosts') diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index f3c313d0..039101be 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix @@ -91,11 +91,9 @@ { from = 60000; to = 61000; } # mosh ]; extraCommands = '' - set -x - - ip46tables -D FORWARD -j nixos-fw-forward 2>/dev/null || true - ip46tables -F nixos-fw-forward 2> /dev/null || true - ip46tables -X nixos-fw-forward 2> /dev/null || true + ip46tables -D FORWARD -j nixos-fw-forward || true + ip46tables -F nixos-fw-forward || true + ip46tables -X nixos-fw-forward || true ip46tables -N nixos-fw-forward ip46tables -A nixos-fw-forward -i eno1 -j ACCEPT @@ -108,9 +106,9 @@ ip46tables -A FORWARD -j nixos-fw-forward - ip46tables -t nat -D POSTROUTING -j nixos-fw-postrouting-nat 2>/dev/null || true - ip46tables -t nat -F nixos-fw-postrouting-nat 2>/dev/null || true - ip46tables -t nat -X nixos-fw-postrouting-nat 2>/dev/null || true + ip46tables -t nat -D POSTROUTING -j nixos-fw-postrouting-nat || true + ip46tables -t nat -F nixos-fw-postrouting-nat || true + ip46tables -t nat -X nixos-fw-postrouting-nat || true ip46tables -t nat -N nixos-fw-postrouting-nat iptables -t nat -A nixos-fw-postrouting-nat -o dsl -j MASQUERADE @@ -118,9 +116,9 @@ ip46tables -t nat -A POSTROUTING -j nixos-fw-postrouting-nat - ip46tables -t mangle -D POSTROUTING -j nixos-fw-postrouting-mangle 2>/dev/null || true - ip46tables -t mangle -F nixos-fw-postrouting-mangle 2>/dev/null || true - ip46tables -t mangle -X nixos-fw-postrouting-mangle 2>/dev/null || true + ip46tables -t mangle -D POSTROUTING -j nixos-fw-postrouting-mangle || true + ip46tables -t mangle -F nixos-fw-postrouting-mangle || true + ip46tables -t mangle -X nixos-fw-postrouting-mangle || true ip46tables -t mangle -N nixos-fw-postrouting-mangle ip46tables -t mangle -A nixos-fw-postrouting-mangle -o dsl -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu -- cgit v1.2.3