1 { pkgs, lib, config, ... }:
3 inherit (builtins) hasAttr readFile;
4 inherit (pkgs.lib) unlinesAttrs;
5 inherit (config.services) shorewall shorewall6;
24 #HTTPS(ACCEPT) net $FW
46 #ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
47 # PORT(S) PORT(S) LIMIT GROUP
53 services.shorewall = {
57 ${readFile "${shorewall.package}/etc-example/shorewall/shorewall.conf"}
65 # DOC: shorewall-zones(5)
72 # DOC: shorewall-interfaces(5)
74 net enp1s0 arp_filter,nosmurfs,routefilter=1,tcpflags
75 lan enp2s0 arp_filter,nosmurfs,routefilter=1,tcpflags,dhcp
76 unused enp3s0 arp_filter,nosmurfs,routefilter=1,tcpflags
79 # DOC: shorewall-policy(5)
84 # WARNING: the following policy must be last
88 # DOC: shorewall-rules(5)
102 services.shorewall6 = {
104 configs = macros // {
105 "shorewall6.conf" = ''
106 ${readFile "${shorewall6.package}/etc-example/shorewall6/shorewall6.conf"}
114 # DOC: shorewall-zones(5)
121 # DOC: shorewall-interfaces(5)
123 net enp1s0 nosmurfs,tcpflags
124 lan enp2s0 nosmurfs,tcpflags
125 unused enp3s0 nosmurfs,tcpflags
128 # DOC: shorewall-policy(5)
133 # WARNING: the following policy must be last
137 # DOC: shorewall-rules(5)