mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
rework rules
This commit is contained in:
parent
02da0168f3
commit
b09875fd85
9 changed files with 115 additions and 32 deletions
|
@ -1,3 +1,2 @@
|
|||
{{range $rule := .Netfilter.DestinationNATRules}}
|
||||
{{template "rule_match.tmpl" .Match}} {{ if $rule.Counter }} counter {{ end }} {{ if ne $rule.Comment "" }} comment "{{ $rule.Comment }}" {{ end }}
|
||||
{{end}}
|
||||
{{ range $rule := .Netfilter.DestinationNATRules }}
|
||||
{{ .Match.Nftables }}{{ if $rule.Counter }} counter{{ end }}{{ if ne $rule.Comment "" }} comment "{{ $rule.Comment }}"{{ end }}{{ end }}
|
|
@ -1,3 +1,2 @@
|
|||
{{range $rule := .Netfilter.ForwardRules}}
|
||||
{{template "rule_match.tmpl" .Match}} {{ if $rule.Counter }} counter {{ end }} {{ if ne $rule.Comment "" }} comment "{{ $rule.Comment }}" {{ end }}
|
||||
{{end}}
|
||||
{{ .Match.Nftables }}{{ if $rule.Counter }} counter{{ end }} {{ $rule.Verdict.String }}{{ if ne $rule.Comment "" }} comment "{{ $rule.Comment }}"{{ end }}{{ end }}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
tcp dport {{ .TCPDestinationPort }}
|
|
@ -1,3 +1,2 @@
|
|||
{{range $rule := .Netfilter.SourceNATRules}}
|
||||
{{template "rule_match.tmpl" .Match}} {{ if $rule.Counter }} counter {{ end }} {{ if ne $rule.Comment "" }} comment "{{ $rule.Comment }}" {{ end }}
|
||||
{{end}}
|
||||
{{ range $rule := .Netfilter.SourceNATRules }}
|
||||
{{ .Match.Nftables }}{{ if $rule.Counter }} counter{{ end }}{{ if ne $rule.Comment "" }} comment "{{ $rule.Comment }}"{{ end }}{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue