Show HN: TUI to manage firewall and HTTP server, in Rust (github.com)

1 points by FabCH ↗ HN
I have been self-hosting for 10 years, and "family hosting" for 2.

The number of attacks my servers get has increased by 3x since May of this year. Now personally, I don't like hiding behind Cloudflare because I don't want them to be a SPOF, but it was becoming a bit too scary to just be open to the web. Because it is a family cloud, it can't hide behind a VPN, it has to support devices like TV sticks that can't connect properly over VPN. It has to support HTTPS.

So I put together a Rust/Ratatui TUI+cron/CLI that manages my second line of defense: firewall and HTTP server. I run a reverse Nginx proxy in front of apps like Nextcloud, and a nftables firewall with SSH as my admin tunnel. It does several things:

1) It allows me to block entire segments, countries, datacenter IP ranges, TOR exit nodes etc...

2) It allows me to block specific bots: search bots, AI bots, security scanners

3) It does dynamic blocking too, looking at the logs to spot bad behavior and block it. I used to run fail2ban for SSH for example, but a centralized UI for both SSH and HTTP(S) is nicer IMHO.

So if this is useful to anyone else, feel free. It's AGPL v3.

In my experience, geoblocking is the biggest win, reducing the attacks by 30x.

AI Disclosure: I use AI assisted development. I follow Linus Torvalds and Bob Martin model, with using AI as a tool and verifying the result.

3 comments

[ 5.7 ms ] story [ 42.0 ms ] thread
Pretty neat. I've been using Traefik in front of all my services. I don't have anything really beyond standard rate limiting. Might look into this.
Great project!! This is really useful to block all sort of botish things out there and for a family server is the right tool to have. What about blocking also the internal spying traffic generated by modern devices? do you have implemented also rules for this?
I personally use a VLAN where I segment all IoT and Smarthome devices and just drop all outgoing internet traffic at the switch level on those VLANs.

However, given the latest Plex exploit incident, I have been thinking how to detect and prevent outgoing anomalous connections…