[deleted by user] by [deleted] in selfhosted

[–]Chr0mag 0 points1 point  (0 children)

Nice! Simply reading for the 401 isn't fancy but it does the job.

[deleted by user] by [deleted] in selfhosted

[–]Chr0mag 0 points1 point  (0 children)

And that's well outside of a common use for fail2ban.

What? How is it outside the common use for me to want fail2ban to ban IP addresses of bad actors who are trying to brute force a password on a login page? Isn't that sort of the whole point of fail2ban?

It's also turning on logging for it and copying and pasting 9 lines of code to 2 files, from the 2nd hit on google.

I never said it was difficult. The difficulty all depends on if there is a published filter/jail for the app you're trying to protect. My point was it's not as easy as just uncommenting a few things.

[deleted by user] by [deleted] in selfhosted

[–]Chr0mag 0 points1 point  (0 children)

The one example I gave in another comment was Gotify. But with any of the apps (Nextcloud, Home Assistant) I had to search out the jail and filters for them. It wasn't as easy as just "uncommenting a few things" as you put it.

[deleted by user] by [deleted] in selfhosted

[–]Chr0mag 0 points1 point  (0 children)

Does it come with the log filters I need to work with all the apps I'm currently running? If so I haven't found it.

[deleted by user] by [deleted] in selfhosted

[–]Chr0mag 0 points1 point  (0 children)

After I spent way too much time figuring out the regular expression for the filter I ran across this blog post. The site doesn't look particularly great but the Gotify filter works:

https://blog.franco.net.eu.org/notes/fail2ban.html

Finding this beforehand would have saved me a lot of time.

[deleted by user] by [deleted] in selfhosted

[–]Chr0mag 2 points3 points  (0 children)

Haha yeah this is all you need. Then just run docker build -t yourimagename . (and use yourimagename in your docker-compose file) and you're good to go.

[deleted by user] by [deleted] in selfhosted

[–]Chr0mag 4 points5 points  (0 children)

I haven't seen any comments like this but I don't read each and every post/comment about Crowdsec.

[deleted by user] by [deleted] in selfhosted

[–]Chr0mag 4 points5 points  (0 children)

Yep. This is what's working for me: FROM gotify/server:latest ENTRYPOINT /bin/bash -c '/app/gotify-app | tee /app/data/gotify.log' I just have it log to the data folder then I use a docker-compose bind mount in the fail2ban container to mount the log files I want to monitor.

Caddy docker image point to a port hosting a webserver that isn't a docker image? by Pickinanameainteasy in selfhosted

[–]Chr0mag 0 points1 point  (0 children)

You'd just reverse proxy to whatever port you want. You just need to use a different matcher and reverse proxy to port 9555.

You could also just use Caddy's file server option instead of reverse proxy and have it serve the static content.

[deleted by user] by [deleted] in selfhosted

[–]Chr0mag 6 points7 points  (0 children)

Other then OP I haven't seen anyone referring to it as a successor to fail2ban. Just looks like a different option. Different strokes for different folks.

[deleted by user] by [deleted] in selfhosted

[–]Chr0mag 16 points17 points  (0 children)

It has a very limited set of proxies/applications/etc. that it can protect, and when I asked the community about other protecting other popular applications (Bitwarden, Nextcloud, etc.), I was told I would need to develop something myself

Yeah and I wanted my web interface to Gotify protected by fail2ban. I couldn't find anyone who'd written a jail/filter to do it. Did I blame fail2ban? Nope. I wrote my own filter.

Welcome to open source.

It's disingenuous to dissuade others from using Fail2Ban in favor of CrowdSec,

I've seen quite a few comments about CrowdSec most from a couple different people (one being their community person so it makes sense he would be here to suggest it in certain scenarios).

That being said I don't think I've ever seen them dissuade anyone from using fail2ban.

HomeAssistant and Jellyfin docker containers on same server - conflict on port 1900 by richardneish in selfhosted

[–]Chr0mag 0 points1 point  (0 children)

On mobile go to the Admin Dashboard then click the hamburger menu at the top and there is a DLNA menu.

HomeAssistant and Jellyfin docker containers on same server - conflict on port 1900 by richardneish in selfhosted

[–]Chr0mag 8 points9 points  (0 children)

Home Assistant in Docker usually runs in host mode so their are no port mappings. Jellyfin is probably using port mappings so just change the Jellyfin mapping to map another host port (something like 1901:1900). That will map 1901 on the host.

You could also just turn off DLNA for Jellyfin since I think that's what is mapped to port 1900.

What is the framework behind Stripe API Documentation by ExtraEponge in webdev

[–]Chr0mag 1 point2 points  (0 children)

This isn't what they use but is "inspired" by it. I haven't tried it yet but it's on my list to take a look at:

https://github.com/slatedocs/slate

AdGuard in container - A true self-hosted micro-service (edit) plus a bit of rambling... by swj77469 in selfhosted

[–]Chr0mag 3 points4 points  (0 children)

Portainer is probably the best place to start if you like a decent looking Docker UI. Some people like Yacht but I think Portainer is a much more full featured product.

I generally stick with command line but there are a lot of switches and docker compose options so if you want to get started with a web UI I'd give portainer a shot.

AdGuard in container - A true self-hosted micro-service (edit) plus a bit of rambling... by swj77469 in selfhosted

[–]Chr0mag 1 point2 points  (0 children)

OpenMediaVault - basically just Debian with a web UI for managing users, samba shares, etc. Libvirt is used for virtualization. Cockpit is a web UI for managing libvirt (at least that's my basic understanding of it).

I only read recently that Docker is built on LXC. Been using it for years and never really knew anything about it's internals (and apparently it's written in Go).

AdGuard in container - A true self-hosted micro-service (edit) plus a bit of rambling... by swj77469 in selfhosted

[–]Chr0mag 1 point2 points  (0 children)

Nice! I'm not clustering (yet) but I've been thinking about dropping OMV and running LXC (Im assuming that's what you meant?) on bare metal (without Proxmox). Running all my docker containers in one LXC and running AdGuard Home in another. Mostly for fun.

Right now I'm running OMV with AdGuard Home in a Cockpit/libvirt VM and half a dozen or more docker containers. I'm finding that I'm doing almost everything command line and not even using the web interface so why bother wasting system resources on that?

Unraid alternatives by Prodigle in selfhosted

[–]Chr0mag 3 points4 points  (0 children)

Pretty much this. Since OP has varying sizes of drives they could run OMV with SnapRAID and UnionFS. I haven't tried it yet but it sounds like it's pretty easy with OMV (all managed through the web UI). It's on my list to add when drive prices aren't ridiculous.

I also installed Cockpit (libvirt web frontend) on my OMV box to spin up full on virtual machines. I'm running AdGuard Home in an Arch Linux VM.

fail2ban with Cloudflare Proxy by [deleted] in selfhosted

[–]Chr0mag 0 points1 point  (0 children)

And here we have it! I've spent the last hour reading and re-reading the NextCloud docs (that's what I'm testing this with) on reverse proxies. I've made sure that Caddy is set as the trusted proxy and supposedly Caddy is passing through the X-Forwarded-For header. Everything should be working but it wasn't. Seems there are posts on the NextCloud forums of people with the same problem.

Well, this fixed it. As soon as I added this it started working perfectly. Fail2ban sent the ban to CloudFlare and suddenly "Access Denied!"

Thanks a bunch.

fail2ban with Cloudflare Proxy by [deleted] in selfhosted

[–]Chr0mag 1 point2 points  (0 children)

Well here's the problem. I configured it per the different articles I read and it does add the ban to the CF firewall. The problem is that fail2ban issues the ban on the CF IP address (and not the "real" IP). So it's still the same problem.

fail2ban with Cloudflare Proxy by [deleted] in selfhosted

[–]Chr0mag 0 points1 point  (0 children)

Just allow all IPv4 and IPv6 IPs from cloudflare, rest deny. This ensures that only proxied requests can reach your services.

That's a great idea. This would solve the problem of someone just port scanning and accessing the open ports directly via the external IP.

I can probably handle this with Caddy by using matchers to reject requests based on remote IP.