1 { pkgs, lib, config, ... }:
3 inherit (builtins) hasAttr readFile;
4 inherit (pkgs.lib) unlinesAttrs;
5 inherit (config.services) shorewall shorewall6;
49 #ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
50 # PORT(S) PORT(S) LIMIT GROUP
55 #ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
56 # PORT(S) PORT(S) LIMIT GROUP
57 PARAM - - udp 60000-61000
62 services.shorewall = {
66 ${readFile "${shorewall.package}/etc-example/shorewall/shorewall.conf"}
74 # DOC: shorewall-zones(5)
81 # DOC: shorewall-interfaces(5)
83 net enp1s0 arp_filter,nosmurfs,routefilter=1,tcpflags
84 lan enp2s0 arp_filter,nosmurfs,routefilter=1,tcpflags
85 unused enp3s0 arp_filter,nosmurfs,routefilter=1,tcpflags
88 # DOC: shorewall-policy(5)
93 # WARNING: the following policy must be last
97 # DOC: shorewall-rules(5)
111 services.shorewall6 = {
113 configs = macros // {
114 "shorewall6.conf" = ''
115 ${readFile "${shorewall6.package}/etc-example/shorewall6/shorewall6.conf"}
123 # DOC: shorewall-zones(5)
130 # DOC: shorewall-interfaces(5)
132 net enp1s0 nosmurfs,tcpflags
133 lan enp2s0 nosmurfs,tcpflags
134 unused enp3s0 nosmurfs,tcpflags
137 # DOC: shorewall-policy(5)
142 # WARNING: the following policy must be last
146 # DOC: shorewall-rules(5)