https://github.com/alegrey91/fwdctl
⛓️ CLI tool to easily manage IPTables forwards
https://github.com/alegrey91/fwdctl
Last synced: 5 months ago
JSON representation
⛓️ CLI tool to easily manage IPTables forwards
- Host: GitHub
- URL: https://github.com/alegrey91/fwdctl
- Owner: alegrey91
- License: apache-2.0
- Created: 2022-08-13T18:30:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-23T15:26:51.000Z (10 months ago)
- Last Synced: 2025-06-12T03:14:24.154Z (6 months ago)
- Language: Go
- Homepage:
- Size: 2.88 MB
- Stars: 66
- Watchers: 2
- Forks: 8
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-go - fwdctl - A simple and intuitive CLI to manage IPTables forwards in your Linux server. (Networking / Transliteration)
- awesome-go - alegrey91/fwdctl
- awesome-go-cn - fwdctl
- awesome-go-plus - fwdctl - A simple and intuitive CLI to manage IPTables forwards in your Linux server.  (Networking / Transliteration)
- awesome-go - fwdctl - A simple and intuitive CLI to manage IPTables forwards in your Linux server. (Networking / Transliteration)
- awesome-go-with-stars - fwdctl - A simple and intuitive CLI to manage IPTables forwards in your Linux server. (Networking / Transliteration)
- awesome-go - fwdctl - A simple and intuitive CLI to manage IPTables forwards in your Linux server. (Networking / Transliteration)
- awesome-go - fwdctl - A simple and intuitive CLI to manage IPTables forwards in your Linux server. (Networking / Transliteration)
README
# fwdctl
[](https://pkg.go.dev/github.com/alegrey91/fwdctl)
[](https://goreportcard.com/report/github.com/alegrey91/fwdctl)
[](https://raw.githack.com/wiki/alegrey91/fwdctl/coverage.html)

[](https://github.com/avelino/awesome-go/)
**fwdctl** is a simple and intuitive CLI to manage forwards in your **Linux** server.
## How it works
It essentially provides commands to manage forwards, using **iptables** under the hood.
Let's do an example:
Suppose you have an **hypervisor** server that hosts some virtual machines inside itself. If you need to expose an internal service, managed by one of these VMs, you can use **fwdctl** from the hypervisor to add the forward to expose this service.

To do so, you have to type this easy command:
``` shell
sudo fwdctl create --destination-port 3000 --source-address 192.168.199.105 --source-port 80
```
That's it.
Full **documentation** [here](docs/getting-started.md).
## Installation
#### Linux x86_64
```shell
curl -s https://raw.githubusercontent.com/alegrey91/fwdctl/main/install | sudo sh
```
## Seccomp (experimental)
I've recently added a new functionality to trace the system calls used by `fwdctl` during the test pipeline.
This is done by using another project of mine: [`harpoon`](https://github.com/alegrey91/harpoon).
Thanks to this, at the end of the pipeline, we have a **seccomp** profile as artifact. You can use this to run `fwdctl` in a more secure way.
Find the **seccomp** profile here: [`fwdctl-seccomp.json`](hack/fwdctl-seccomp.json).