summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2018-05-20 10:09:54 +0200
committerlassulus <lassulus@lassul.us>2018-05-20 10:09:54 +0200
commitc7a49e7ac91eef1833992d9801b11febad726afe (patch)
treeb62a4c715d3fc2ec604936d91ef1d6ce6fb2015a
parent32b66b6def41a6d33718e14b09135b234a4036b8 (diff)
l prism.r: forward weechat port to blue.r
-rw-r--r--lass/1systems/prism/config.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix
index c7b877deb..9bfd90c14 100644
--- a/lass/1systems/prism/config.nix
+++ b/lass/1systems/prism/config.nix
@@ -295,6 +295,21 @@ with import <stockholm/lib>;
};
};
}
+ { #weechat port forwarding to blue
+ krebs.iptables.tables.filter.INPUT.rules = [
+ { predicate = "-p tcp --dport 9998"; target = "ACCEPT";}
+ ];
+ krebs.iptables.tables.nat.PREROUTING.rules = [
+ { v6 = false; precedence = 1000; predicate = "-d ${config.krebs.hosts.prism.nets.internet.ip4.addr} -p tcp --dport 9998"; target = "DNAT --to-destination ${config.krebs.hosts.blue.nets.retiolum.ip4.addr}:9999"; }
+ ];
+ krebs.iptables.tables.filter.FORWARD.rules = [
+ { v6 = false; precedence = 1000; predicate = "-d ${config.krebs.hosts.blue.nets.retiolum.ip4.addr} -p tcp --dport 9999"; target = "ACCEPT"; }
+ { v6 = false; precedence = 1000; predicate = "-s ${config.krebs.hosts.blue.nets.retiolum.ip4.addr}"; target = "ACCEPT"; }
+ ];
+ krebs.iptables.tables.nat.POSTROUTING.rules = [
+ { v6 = false; predicate = "-d ${config.krebs.hosts.blue.nets.retiolum.ip4.addr} -p tcp --dport 9999"; target = "MASQUERADE"; }
+ ];
+ }
];
krebs.build.host = config.krebs.hosts.prism;