import (
"fmt"
"os"
"github.com/juliengk/netfilter/iptables"
)
func main() {
ipt, err := iptables.New(4, false)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
opts := iptables.ListOptions {
Chain: "OUTPUT",
Verbose: true,
Numeric: true,
LineNumbers: true,
}
rules, err := ipt.List("filter", &opts)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
fmt.Println(rules)
}
forked from juli3nk/go-netfilter
-
Notifications
You must be signed in to change notification settings - Fork 0
eduard-vm/go-netfilter
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Go implentation for Iptables
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Go 100.0%