1 { pkgs, lib, config, ... }:
3 inherit (builtins) hasAttr readFile;
4 inherit (pkgs.lib) unlinesAttrs;
5 inherit (config) users;
6 inherit (config.services) shorewall shorewall6;
12 DNS(ACCEPT) $FW net {user=${users.users.unbound.name}}
13 DNS(ACCEPT) $FW net:217.70.177.40 # for knot to notify ns6.gandi.net
15 HKP(ACCEPT) $FW net {user=${users.users.julm.name}}
53 #ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
54 # PORT(S) PORT(S) LIMIT GROUP
59 #ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
60 # PORT(S) PORT(S) LIMIT GROUP
61 PARAM - - udp 60000-61000
66 services.shorewall = {
70 ${readFile "${shorewall.package}/etc-example/shorewall/shorewall.conf"}
78 # DOC: shorewall-zones(5)
85 # DOC: shorewall-interfaces(5)
87 net enp1s0 arp_filter,nosmurfs,routefilter=1,tcpflags
88 lan enp2s0 arp_filter,nosmurfs,routefilter=1,tcpflags
89 unused enp3s0 arp_filter,nosmurfs,routefilter=1,tcpflags
92 # DOC: shorewall-policy(5)
97 # WARNING: the following policy must be last
101 # DOC: shorewall-rules(5)
115 services.shorewall6 = {
117 configs = macros // {
118 "shorewall6.conf" = ''
119 ${readFile "${shorewall6.package}/etc-example/shorewall6/shorewall6.conf"}
127 # DOC: shorewall-zones(5)
134 # DOC: shorewall-interfaces(5)
136 net enp1s0 nosmurfs,tcpflags
137 lan enp2s0 nosmurfs,tcpflags
138 unused enp3s0 nosmurfs,tcpflags
141 # DOC: shorewall-policy(5)
146 # WARNING: the following policy must be last
150 # DOC: shorewall-rules(5)