I have no idea but I’ll be looking at this thread! Let us know if you find one!
- 7 Posts
- 106 Comments
mesa@piefed.socialto
Selfhosted@lemmy.world•We Surveyed 2,158 Self-Hosters: Here's What Keeps Us HostingEnglish
12·1 day agoOne of the reasons we all switched. A public modlist is so nice over here. At least we get reasons.
mesa@piefed.socialto
Selfhosted@lemmy.world•We Surveyed 2,158 Self-Hosters: Here's What Keeps Us HostingEnglish
3·1 day agoI’ve broken my Lemmy system a couple of times. Yunohost and Lemmy do not go well together. Went to docker and its slow but dependable. I like playing around with it but how do people keep up with Lemmy.world? It just slams my network.
mesa@piefed.socialto
Selfhosted@lemmy.world•Is there a selfhosted option for webcomics?English
3·6 days agoIn addition to what others say, you can also try WebToEpub (with a delay) for some comics. It works well with web comics.
freshrss is also great at ongoing series.
mesa@piefed.socialOPto
Selfhosted@lemmy.world•Its a solar powered phone webserver! Made from a pixel 6a, solar panel, and hopes/dreams.English
2·8 days agoThanks, its there now!
For me yunohost is the simplest.
from flask import Flask, request, abort from datetime import datetime, timedelta import sqlite3 import logging import os app = Flask(__name__) DB_FILE = "honeypot.db" #LOG_FILE = "/var/log/honeypot.log" LOG_FILE = "honeypot.log" TRAP_THRESHOLD = 3 # clicks before flagging FLAG_DURATION_HOURS = 24 # how long the flag lasts # --- Setup logging for Fail2Ban integration --- #os.makedirs(os.path.dirname(LOG_FILE), exist_ok=True) logging.basicConfig( filename=LOG_FILE, level=logging.INFO, format="%(asctime)s [%(levelname)s] %(message)s", ) # --- Database setup --- def init_db(): with sqlite3.connect(DB_FILE) as conn: c = conn.cursor() c.execute(""" CREATE TABLE IF NOT EXISTS hits ( ip TEXT, ts DATETIME ) """) c.execute(""" CREATE TABLE IF NOT EXISTS flagged ( ip TEXT PRIMARY KEY, flagged_on DATETIME, expires DATETIME ) """) conn.commit() # --- Helper functions --- def record_hit(ip): now = datetime.utcnow() with sqlite3.connect(DB_FILE) as conn: c = conn.cursor() c.execute("INSERT INTO hits (ip, ts) VALUES (?, ?)", (ip, now)) conn.commit() def get_hit_count(ip): with sqlite3.connect(DB_FILE) as conn: c = conn.cursor() c.execute("SELECT COUNT(*) FROM hits WHERE ip = ?", (ip,)) return c.fetchone()[0] def flag_ip(ip): now = datetime.utcnow() expires = now + timedelta(hours=FLAG_DURATION_HOURS) with sqlite3.connect(DB_FILE) as conn: c = conn.cursor() c.execute("REPLACE INTO flagged (ip, flagged_on, expires) VALUES (?, ?, ?)", (ip, now, expires)) conn.commit() logging.warning(f"HONEYPOT flagged {ip} for {FLAG_DURATION_HOURS}h") # Fail2Ban picks this up def is_flagged(ip): now = datetime.utcnow() with sqlite3.connect(DB_FILE) as conn: c = conn.cursor() c.execute("SELECT expires FROM flagged WHERE ip = ?", (ip,)) row = c.fetchone() if not row: return False expires = datetime.fromisoformat(row[0]) if now < expires: return True # Expired flag, remove it c.execute("DELETE FROM flagged WHERE ip = ?", (ip,)) conn.commit() return False # --- Middleware --- @app.before_request def block_flagged(): ip = request.remote_addr if is_flagged(ip): abort(403, description="Access denied (you have been flagged).") # --- Routes --- @app.route('/') def home(): return ''' <h1>Welcome</h1> <p><a href="/do_not_click">Don’t click this unless you are a bot</a></p> ''' @app.route('/robots.txt') def robots_txt(): return "User-agent: *\nDisallow: /do_not_click\n", 200, {'Content-Type': 'text/plain'} @app.route('/do_not_click') def honeypot(): ip = request.remote_addr if is_flagged(ip): abort(403, description="Access denied (you’ve been flagged).") record_hit(ip) hit_count = get_hit_count(ip) logging.info(f"HONEYPOT triggered by {ip} (count={hit_count})") if hit_count >= TRAP_THRESHOLD: flag_ip(ip) return "You’ve been flagged for suspicious behavior.", 403 return f"Suspicious activity detected ({hit_count}/{TRAP_THRESHOLD})." if __name__ == "__main__": init_db() app.run(debug=True)Here I condensed this down to its parts. Hopefully this works well for you.
/etc/fail2ban/jail.d/honeypot.conf
[honeypot] enabled = true filter = honeypot logpath = /var/log/honeypot.log maxretry = 3 findtime = 86400 # Count hits within 24 hours bantime = 86400 # Ban for 24 hours backend = auto action = iptables-multiport[name=honeypot, port="http,https"]
It works well with fail2ban + nginx just FYI. That and a small DB.
I fail to see how prediction engines can do anything different.
I created a honeypot that is only accessible if they click the “don’t click this unless you are a bot”. If they do after 3 times, poof the IP gets banned for a day. Its worked well.
Simple little flask app. Robots.text as well but only google seems to actually read that and respect it.
mesa@piefed.socialto
PC Gaming@lemmy.ca•Windows Games’ Compatibility on Linux Is at an All-Time HighEnglish
10·15 days agoThat would be nice!
mesa@piefed.socialOPto
Self-hosting@slrpnk.net•Its a solar powered phone webserver! Made from a pixel 6a, solar panel, and hopes/dreams.English
1·17 days agoOver here, probably. Its the summer Ill have to do something about. If it gets over 110F constantly it might not be good to keep it out there.
mesa@piefed.socialOPto
Selfhosted@lemmy.world•Its a solar powered phone webserver! Made from a pixel 6a, solar panel, and hopes/dreams.English
3·18 days agoOh neat! Yeah ill do it when I get a chance.
EDIT: Looks like quite a few of those sites are defunct.
mesa@piefed.socialOPto
Selfhosted@lemmy.world•Its a solar powered phone webserver! Made from a pixel 6a, solar panel, and hopes/dreams.English
2·18 days agoI just added a “Visitor” section to it. Its directly looking at logs.
I saw a bot rampage the site a bit ago which was funny to see. It was trying to find books (?). No idea what that was about. Oh well site is still up.
mesa@piefed.socialOPto
Selfhosted@lemmy.world•Its a solar powered phone webserver! Made from a pixel 6a, solar panel, and hopes/dreams.English
1·18 days agoIts the entire request. Its definitely not the software, that takes > 20 ms if its direct connected via Ethernet usbc. You are entirely correct, it can be much faster like my other services are.
Its wifi 2.4 across multiple walls. Im frankly surprised its only 200+ ms delay with the amount of signals in the area.
mesa@piefed.socialOPto
Selfhosted@lemmy.world•Its a solar powered phone webserver! Made from a pixel 6a, solar panel, and hopes/dreams.English
2·18 days agoThe battery has already been replaced.
mesa@piefed.socialOPto
Selfhosted@lemmy.world•Its a solar powered phone webserver! Made from a pixel 6a, solar panel, and hopes/dreams.English
3·19 days agoThanks! Its a very simple setup.








Cube and micro-sats!