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}}
51 #ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
52 # PORT(S) PORT(S) LIMIT GROUP
57 #ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
58 # PORT(S) PORT(S) LIMIT GROUP
59 PARAM - - udp 60000-61000
64 services.shorewall = {
68 ${readFile "${shorewall.package}/etc-example/shorewall/shorewall.conf"}
76 # DOC: shorewall-zones(5)
83 # DOC: shorewall-interfaces(5)
85 net enp1s0 arp_filter,nosmurfs,routefilter=1,tcpflags
86 lan enp2s0 arp_filter,nosmurfs,routefilter=1,tcpflags
87 unused enp3s0 arp_filter,nosmurfs,routefilter=1,tcpflags
90 # DOC: shorewall-policy(5)
95 # WARNING: the following policy must be last
99 # DOC: shorewall-rules(5)
113 services.shorewall6 = {
115 configs = macros // {
116 "shorewall6.conf" = ''
117 ${readFile "${shorewall6.package}/etc-example/shorewall6/shorewall6.conf"}
125 # DOC: shorewall-zones(5)
132 # DOC: shorewall-interfaces(5)
134 net enp1s0 nosmurfs,tcpflags
135 lan enp2s0 nosmurfs,tcpflags
136 unused enp3s0 nosmurfs,tcpflags
139 # DOC: shorewall-policy(5)
144 # WARNING: the following policy must be last
148 # DOC: shorewall-rules(5)