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
44 #ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
45 # PORT(S) PORT(S) LIMIT GROUP
52 services.shorewall = {
56 ${readFile "${shorewall.package}/etc-example/shorewall/shorewall.conf"}
64 # DOC: shorewall-zones(5)
71 # DOC: shorewall-interfaces(5)
73 net enp1s0 arp_filter,nosmurfs,routefilter=1,tcpflags
74 lan enp2s0 arp_filter,nosmurfs,routefilter=1,tcpflags,dhcp
75 unused enp3s0 arp_filter,nosmurfs,routefilter=1,tcpflags
78 # DOC: shorewall-policy(5)
83 # WARNING: the following policy must be last
87 # DOC: shorewall-rules(5)
101 services.shorewall6 = {
103 configs = macros // {
104 "shorewall6.conf" = ''
105 ${readFile "${shorewall6.package}/etc-example/shorewall6/shorewall6.conf"}
113 # DOC: shorewall-zones(5)
120 # DOC: shorewall-interfaces(5)
122 net enp1s0 nosmurfs,tcpflags
123 lan enp2s0 nosmurfs,tcpflags
124 unused enp3s0 nosmurfs,tcpflags
127 # DOC: shorewall-policy(5)
132 # WARNING: the following policy must be last
136 # DOC: shorewall-rules(5)