mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
Implement Service Based nftables Match Generator
This commit is contained in:
parent
b70a2688b5
commit
82f90aabb8
7 changed files with 76 additions and 15 deletions
|
@ -1,12 +1,6 @@
|
|||
package definitions
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Match struct {
|
||||
TCPDestinationPort uint64 `json:"tcp_destination_port,omitempty"`
|
||||
Service []string `json:"service,omitempty"`
|
||||
}
|
||||
|
||||
func (m Match) Nftables() string {
|
||||
return fmt.Sprintf("tcp dport %d", m.TCPDestinationPort)
|
||||
Services []string `json:"services,omitempty"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue