├── .github ├── dependabot.yml └── workflows │ ├── codeql.yml │ ├── dependency-review.yml │ ├── lint.yml │ ├── release.yml │ ├── scorecards.yml │ └── tests.yaml ├── .gitignore ├── .pre-commit-config.yaml ├── .vscode └── launch.json ├── LICENSE ├── Makefile ├── README.md ├── cmd ├── apply.go ├── create.go ├── daemon.go ├── daemon_start.go ├── daemon_stop.go ├── delete.go ├── generate.go ├── generate_rules.go ├── generate_systemd.go ├── list.go ├── root.go └── version.go ├── docs └── getting-started.md ├── fwdctl-example.png ├── fwdctl.png ├── go.mod ├── go.sum ├── hack └── fwdctl-seccomp.json ├── install ├── internal ├── constants │ └── constants.go ├── daemon │ ├── management.go │ └── pid_file.go ├── printer │ ├── json.go │ ├── printer_interface.go │ ├── table.go │ └── yaml.go ├── rules │ ├── ruleset.go │ ├── ruleset_test.go │ └── types.go └── template │ ├── rules_template │ ├── rules.go │ └── rules.yml.tpl │ ├── systemd_template │ ├── fwdctl.service.tpl │ ├── systemd_service.go │ └── systemd_service_test.go │ ├── template.go │ └── template_test.go ├── main.go ├── main_test.go ├── pkg └── iptables │ ├── defaults.go │ ├── forward.go │ ├── interface.go │ ├── interface_test.go │ ├── rule.go │ ├── rule_test.go │ ├── utils.go │ ├── validation.go │ └── validation_test.go ├── tests ├── README.md ├── apply.txtar ├── apply_trace.txtar ├── create.txtar ├── create_trace.txtar ├── daemon.txtar ├── daemon_trace.txtar ├── delete.txtar ├── delete_trace.txtar ├── generate.txtar ├── generate_trace.txtar ├── list.txtar ├── list_trace.txtar ├── version.txtar └── version_trace.txtar └── utils.go /.github/dependabot.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/.github/dependabot.yml -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/.github/workflows/codeql.yml -------------------------------------------------------------------------------- /.github/workflows/dependency-review.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/.github/workflows/dependency-review.yml -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/.github/workflows/lint.yml -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.github/workflows/scorecards.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/.github/workflows/scorecards.yml -------------------------------------------------------------------------------- /.github/workflows/tests.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/.github/workflows/tests.yaml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | dist/ 3 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/.pre-commit-config.yaml -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/.vscode/launch.json -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/README.md -------------------------------------------------------------------------------- /cmd/apply.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/cmd/apply.go -------------------------------------------------------------------------------- /cmd/create.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/cmd/create.go -------------------------------------------------------------------------------- /cmd/daemon.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/cmd/daemon.go -------------------------------------------------------------------------------- /cmd/daemon_start.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/cmd/daemon_start.go -------------------------------------------------------------------------------- /cmd/daemon_stop.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/cmd/daemon_stop.go -------------------------------------------------------------------------------- /cmd/delete.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/cmd/delete.go -------------------------------------------------------------------------------- /cmd/generate.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/cmd/generate.go -------------------------------------------------------------------------------- /cmd/generate_rules.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/cmd/generate_rules.go -------------------------------------------------------------------------------- /cmd/generate_systemd.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/cmd/generate_systemd.go -------------------------------------------------------------------------------- /cmd/list.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/cmd/list.go -------------------------------------------------------------------------------- /cmd/root.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/cmd/root.go -------------------------------------------------------------------------------- /cmd/version.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/cmd/version.go -------------------------------------------------------------------------------- /docs/getting-started.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/docs/getting-started.md -------------------------------------------------------------------------------- /fwdctl-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/fwdctl-example.png -------------------------------------------------------------------------------- /fwdctl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/fwdctl.png -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/go.sum -------------------------------------------------------------------------------- /hack/fwdctl-seccomp.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/hack/fwdctl-seccomp.json -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/install -------------------------------------------------------------------------------- /internal/constants/constants.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/constants/constants.go -------------------------------------------------------------------------------- /internal/daemon/management.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/daemon/management.go -------------------------------------------------------------------------------- /internal/daemon/pid_file.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/daemon/pid_file.go -------------------------------------------------------------------------------- /internal/printer/json.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/printer/json.go -------------------------------------------------------------------------------- /internal/printer/printer_interface.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/printer/printer_interface.go -------------------------------------------------------------------------------- /internal/printer/table.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/printer/table.go -------------------------------------------------------------------------------- /internal/printer/yaml.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/printer/yaml.go -------------------------------------------------------------------------------- /internal/rules/ruleset.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/rules/ruleset.go -------------------------------------------------------------------------------- /internal/rules/ruleset_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/rules/ruleset_test.go -------------------------------------------------------------------------------- /internal/rules/types.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/rules/types.go -------------------------------------------------------------------------------- /internal/template/rules_template/rules.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/template/rules_template/rules.go -------------------------------------------------------------------------------- /internal/template/rules_template/rules.yml.tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/template/rules_template/rules.yml.tpl -------------------------------------------------------------------------------- /internal/template/systemd_template/fwdctl.service.tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/template/systemd_template/fwdctl.service.tpl -------------------------------------------------------------------------------- /internal/template/systemd_template/systemd_service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/template/systemd_template/systemd_service.go -------------------------------------------------------------------------------- /internal/template/systemd_template/systemd_service_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/template/systemd_template/systemd_service_test.go -------------------------------------------------------------------------------- /internal/template/template.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/template/template.go -------------------------------------------------------------------------------- /internal/template/template_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/internal/template/template_test.go -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/main.go -------------------------------------------------------------------------------- /main_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/main_test.go -------------------------------------------------------------------------------- /pkg/iptables/defaults.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/pkg/iptables/defaults.go -------------------------------------------------------------------------------- /pkg/iptables/forward.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/pkg/iptables/forward.go -------------------------------------------------------------------------------- /pkg/iptables/interface.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/pkg/iptables/interface.go -------------------------------------------------------------------------------- /pkg/iptables/interface_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/pkg/iptables/interface_test.go -------------------------------------------------------------------------------- /pkg/iptables/rule.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/pkg/iptables/rule.go -------------------------------------------------------------------------------- /pkg/iptables/rule_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/pkg/iptables/rule_test.go -------------------------------------------------------------------------------- /pkg/iptables/utils.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/pkg/iptables/utils.go -------------------------------------------------------------------------------- /pkg/iptables/validation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/pkg/iptables/validation.go -------------------------------------------------------------------------------- /pkg/iptables/validation_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/pkg/iptables/validation_test.go -------------------------------------------------------------------------------- /tests/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/README.md -------------------------------------------------------------------------------- /tests/apply.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/apply.txtar -------------------------------------------------------------------------------- /tests/apply_trace.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/apply_trace.txtar -------------------------------------------------------------------------------- /tests/create.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/create.txtar -------------------------------------------------------------------------------- /tests/create_trace.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/create_trace.txtar -------------------------------------------------------------------------------- /tests/daemon.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/daemon.txtar -------------------------------------------------------------------------------- /tests/daemon_trace.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/daemon_trace.txtar -------------------------------------------------------------------------------- /tests/delete.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/delete.txtar -------------------------------------------------------------------------------- /tests/delete_trace.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/delete_trace.txtar -------------------------------------------------------------------------------- /tests/generate.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/generate.txtar -------------------------------------------------------------------------------- /tests/generate_trace.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/generate_trace.txtar -------------------------------------------------------------------------------- /tests/list.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/list.txtar -------------------------------------------------------------------------------- /tests/list_trace.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/list_trace.txtar -------------------------------------------------------------------------------- /tests/version.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/version.txtar -------------------------------------------------------------------------------- /tests/version_trace.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/tests/version_trace.txtar -------------------------------------------------------------------------------- /utils.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alegrey91/fwdctl/HEAD/utils.go --------------------------------------------------------------------------------