https://github.com/rye/amalgam
An ultralight firewall configurator that naïvely bans stupid SSH clients
https://github.com/rye/amalgam
iptables
Last synced: 5 months ago
JSON representation
An ultralight firewall configurator that naïvely bans stupid SSH clients
- Host: GitHub
- URL: https://github.com/rye/amalgam
- Owner: rye
- Created: 2018-08-30T16:51:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-01-06T18:59:52.000Z (over 6 years ago)
- Last Synced: 2025-02-12T08:39:21.431Z (over 1 year ago)
- Topics: iptables
- Language: Rust
- Homepage:
- Size: 59.6 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# amalgam
`amalgam` is my answer to Fail2Ban. I make no claims about whether or
not `amalgam` is better—in fact, I'll readily say it's certainly
not. But `amalgam` is something similar to what I have always wanted
for a firewall. `amalgam` aims to be
- _streaming_, reading inputs from standard input and standard output,
- _composable_, allowing different formations of `amalgam` instances
to co-operate on tasks, and
- _configurable_ to the fullest extent necessary.
## (Prototype) Usage
The prototype script, `amalgam.bash` (which is symlinked by the file
called `amalgam` at the tree root) should be run with `sudo` on a
system with `rg` (ripgrep), and the `iptables` and `ipset` userspace
utilities, and on a system that has authentication logs available in
the `sshd` journald unit (more on this below).
Use this script as follows:
```console
$ sudo ./amalgam
```
That's it.
## v1 (Rust)
Starting in late 2019, I'm working on a Rust version of `amalgam` to
actually satisfy the stated goals of this project.
Using `serde_json` and lots of Rusty tricks, `amalgam` hopes to
eventually move forward as a standalone utility.
Eventually, the usage will look more like this:
```console
$ journalctl -u sshd -o json | amalgam -i- --input-format journalctl-json -c config.yml
```
This is, of course, a work in progress until this new syntax has been
established.