From 82fc659fb977fe4858d6b47006267bd66e3caa8e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 15 Nov 2021 23:57:52 +0059 Subject: vidhar: ... --- hosts/vidhar/default.nix | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'hosts/vidhar/default.nix') diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index 039101be..d1955474 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix @@ -91,11 +91,11 @@ { from = 60000; to = 61000; } # mosh ]; extraCommands = '' - ip46tables -D FORWARD -j nixos-fw-forward || true - ip46tables -F nixos-fw-forward || true - ip46tables -X nixos-fw-forward || true - + 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 -N nixos-fw-forward + ip46tables -A nixos-fw-forward -i eno1 -j ACCEPT ip46tables -A nixos-fw-forward -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT ip6tables -A nixos-fw-forward -p icmpv6 --icmpv6-type redirect -j nixos-fw-log-refuse @@ -106,24 +106,24 @@ ip46tables -A FORWARD -j nixos-fw-forward - 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 -D POSTROUTING -j nixos-fw-postrouting 2>/dev/null || true + ip46tables -t nat -F nixos-fw-postrouting 2>/dev/null || true + ip46tables -t nat -X nixos-fw-postrouting 2>/dev/null || true + ip46tables -t nat -N nixos-fw-postrouting - ip46tables -t nat -N nixos-fw-postrouting-nat - iptables -t nat -A nixos-fw-postrouting-nat -o dsl -j MASQUERADE + iptables -t nat -A nixos-fw-postrouting -o dsl -j MASQUERADE - ip46tables -t nat -A POSTROUTING -j nixos-fw-postrouting-nat + ip46tables -t nat -A POSTROUTING -j nixos-fw-postrouting - 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 -D POSTROUTING -j nixos-fw-postrouting 2>/dev/null || true + ip46tables -t mangle -F nixos-fw-postrouting 2>/dev/null || true + ip46tables -t mangle -X nixos-fw-postrouting 2>/dev/null || 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 + ip46tables -t mangle -N nixos-fw-postrouting + ip46tables -t mangle -A nixos-fw-postrouting -o dsl -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu - ip46tables -t mangle -A POSTROUTING -j nixos-fw-postrouting-mangle + ip46tables -t mangle -A POSTROUTING -j nixos-fw-postrouting ''; }; }; -- cgit v1.2.3