From 88c6a1ddc699e92142d32051381ca843d037a60c Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 29 Dec 2016 18:15:41 +0100 Subject: l: add & import makefu-sip config --- lass/2configs/makefu-sip.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lass/2configs/makefu-sip.nix (limited to 'lass/2configs') diff --git a/lass/2configs/makefu-sip.nix b/lass/2configs/makefu-sip.nix new file mode 100644 index 000000000..9d2e9b696 --- /dev/null +++ b/lass/2configs/makefu-sip.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: + +with import ; +{ + users.users.makefu = { + uid = genid "makefu"; + isNormalUser = true; + extraGroups = [ "libvirtd" ]; + openssh.authorizedKeys.keys = [ + config.krebs.users.makefu.pubkey + ]; + }; + + krebs.iptables.tables.nat.PREROUTING.rules = [ + { v6 = false; precedence = 1000; predicate = "-d 213.239.205.246 -p tcp --dport 10022"; target = "DNAT --to-destination 192.168.122.136:22"; } + ]; + + krebs.iptables.tables.filter.FORWARD.rules = [ + { v6 = false; precedence = 1000; predicate = "-d 192.168.122.136 -p tcp --dport 22 -m state --state NEW,ESTABLISHED,RELATED"; target = "ACCEPT"; } + ]; +} -- cgit v1.2.3