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}}
50 #ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
51 # PORT(S) PORT(S) LIMIT GROUP
56 #ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
57 # PORT(S) PORT(S) LIMIT GROUP
58 PARAM - - udp 60000-61000
63 services.shorewall = {
67 ${readFile "${shorewall.package}/etc-example/shorewall/shorewall.conf"}
75 # DOC: shorewall-zones(5)
82 # DOC: shorewall-interfaces(5)
84 net enp1s0 arp_filter,nosmurfs,routefilter=1,tcpflags
85 lan enp2s0 arp_filter,nosmurfs,routefilter=1,tcpflags
86 unused enp3s0 arp_filter,nosmurfs,routefilter=1,tcpflags
89 # DOC: shorewall-policy(5)
94 # WARNING: the following policy must be last
98 # DOC: shorewall-rules(5)
112 services.shorewall6 = {
114 configs = macros // {
115 "shorewall6.conf" = ''
116 ${readFile "${shorewall6.package}/etc-example/shorewall6/shorewall6.conf"}
124 # DOC: shorewall-zones(5)
131 # DOC: shorewall-interfaces(5)
133 net enp1s0 nosmurfs,tcpflags
134 lan enp2s0 nosmurfs,tcpflags
135 unused enp3s0 nosmurfs,tcpflags
138 # DOC: shorewall-policy(5)
143 # WARNING: the following policy must be last
147 # DOC: shorewall-rules(5)