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
48 #ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
49 # PORT(S) PORT(S) LIMIT GROUP
54 #ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/
55 # PORT(S) PORT(S) LIMIT GROUP
56 PARAM - - udp 60000-61000
61 services.shorewall = {
65 ${readFile "${shorewall.package}/etc-example/shorewall/shorewall.conf"}
73 # DOC: shorewall-zones(5)
79 # DOC: shorewall-interfaces(5)
81 net enp0s3 arp_filter,nosmurfs,routefilter=1,tcpflags,dhcp
82 lan enp0s8 arp_filter,nosmurfs,routefilter=1,tcpflags,dhcp
85 # DOC: shorewall-policy(5)
89 # WARNING: the following policy must be last
93 # DOC: shorewall-rules(5)
107 services.shorewall6 = {
109 configs = macros // {
110 "shorewall6.conf" = ''
111 ${readFile "${shorewall6.package}/etc-example/shorewall6/shorewall6.conf"}
119 # DOC: shorewall-zones(5)
125 # DOC: shorewall-interfaces(5)
127 net enp0s3 nosmurfs,tcpflags
128 lan enp0s8 nosmurfs,tcpflags
131 # DOC: shorewall-policy(5)
135 # WARNING: the following policy must be last
139 # DOC: shorewall-rules(5)