diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/bsd/blocking-bad-bots-openbsd.md | 74 | ||||
-rw-r--r-- | content/bsd/desktop-freebsd-wont-improve-unless-people-are-using-it.md | 120 | ||||
-rw-r--r-- | content/bsd/history/01_multics.md | 3 | ||||
-rw-r--r-- | content/bsd/history/02_unix.md | 4 | ||||
-rw-r--r-- | content/bsd/history/_index.md | 0 | ||||
-rw-r--r-- | content/star-trek/stv/05x14-bliss.md | 52 |
6 files changed, 251 insertions, 2 deletions
diff --git a/content/bsd/blocking-bad-bots-openbsd.md b/content/bsd/blocking-bad-bots-openbsd.md new file mode 100644 index 0000000..51ed5ec --- /dev/null +++ b/content/bsd/blocking-bad-bots-openbsd.md @@ -0,0 +1,74 @@ ++++ +title = "OpenBSD: Blocking bad bots using Relayd" +author = ["Michał Sapka"] +date = 2023-12-11T19:08:00+01:00 +categories = ["bsd"] +draft = false +weight = 2002 +abstract = "How do I fight bad crawlers?" +[menu] + [menu.bsd-openbsd] + weight = 2002 + identifier = "openbsd-blocking-bad-bots-using-relayd" + parent = "obsdweb" + name = "Blocking bad bots using Relayd" ++++ + +The bane of existence for most of small pages: web crawlers. +They create most traffic this site sees and makes my [site stats](https://michal.sapka.me/site/info/#site-stats) overly optimistic. +We can go with [robots.txt](https://en.wikipedia.org/wiki/Robots_Exclusion_Protocol), but what if it's not enough? +I can tell a valuable bot to not index some part of my site, but: +a) some bots ignore it +b) what if I don't want some bots to even have the chance to ask? + +Get that SEO scanning and LLM training out of here! + + +## Blocking crawlers {#blocking-crawlers} + +The rest of this guide assumes webstack: Relayd and Httpd. +Relayd is great and since it works on higher level than pf, we can read headers. +Luckily, those crawlers send usable "User-Agents" which we can block. + +First, let's see who uses my site the most. Assuming you use "forwarded"[^fn:1] style for logs, we can do: + +```shell +awk -F '"' '{print $6}' <path to log file> | sort | uniq -c | sort# +``` + +Then we need to manually select agents we want to block. +It won't be easy, as the strings are long and contain a lot of unnecessary information - which includes plain lies. +You need to define which part of the full User-Agent is common and can be used for blocking. + +Then we can create block rules in a Relayd protocol. +Relayd doesn't use regexp, and instead allows using case-sensitive Lua globs. +Stars will match everything. + +```shell +block request method "GET" header "User-Agent" value "*<common part>*" +``` + +Remember that config assumes last-one-wins, so the block rules should be the last matching. +I just put those end the end of my config. +You can create a \`block quick...\` rule if you want - it will short-circuit the entire protocol. + +Therefore, my "https" protocol now has a series of blocks: + +```shell +http protocol "https" { + # most of the procol omitted + block request method "GET" header "User-Agent" value "*Bytespider*" + block request method "GET" header "User-Agent" value "*ahrefs*" + block request method "GET" header "User-Agent" value "*censys*" + block request method "GET" header "User-Agent" value "*commoncrawl*" + block request method "GET" header "User-Agent" value "*dataforseo*" + block request method "GET" header "User-Agent" value "*mj12*" + block request method "GET" header "User-Agent" value "*semrush*" + block request method "GET" header "User-Agent" value "*webmeup*" + block request method "GET" header "User-Agent" value "*zoominfo*" +} +``` + +(usage of globs was proposed to me on [OpenBSD mailing list](<https://marc.info/?l=openbsd-misc&m=170206886109953&w=2>) + +[^fn:1]: : vide <https://man.openbsd.org/httpd.conf.5#style> diff --git a/content/bsd/desktop-freebsd-wont-improve-unless-people-are-using-it.md b/content/bsd/desktop-freebsd-wont-improve-unless-people-are-using-it.md new file mode 100644 index 0000000..723c82c --- /dev/null +++ b/content/bsd/desktop-freebsd-wont-improve-unless-people-are-using-it.md @@ -0,0 +1,120 @@ ++++ +title = "FreeBSD on the Desktop won't improvide unless people are using it" +author = ["Michał Sapka"] +date = 2023-03-29T22:09:00+02:00 +categories = ["bsd"] +draft = false +weight = 2002 +abstract = "I have hits from /r/bsd, but almost none of those people are using BSD" +[menu] + [menu.bsd-varia] + weight = 2002 + identifier = "freebsd-on-the-desktop-won-t-improvide-unless-people-are-using-it" + name = "Desktop FreeBSD won't improve unless people are using it" ++++ + +Shamelessly, I posted my previous post, [FreeBSD on a Thinkpad Extreme G2](https://d-s.sh/2023/freebsd-on-thinkpad-x1-extreme-g2/) on [/r/bsd Reddit](https://www.reddit.com/r/BSD/comments/124v5cm/freebsd_on_a_thinkpad_x1_extreme_g2/). + +The result, some 24 hours later, is 100 visitors. +Out of that 100, 57 are using a desktop. +Out of that 57, only 2 used FreeBSD—2%. No other BSDs are recorded. + +People who are into BSD don't use BSD. +This seems to be a reason for lacking hardware support. +If no one uses FreeBSD, no one will encounter those problems. If no one encounters them, no one will fix them. + + +## Update 2023-04-14 {#update-2023-04-14} + +The article, got quite the round around the internets, gathering some interests from [Reddit](https://old.reddit.com/r/freebsd/comments/126fvkz/desktop_freebsd_wont_improve_unless_people_are/), [Hacker News](<https://news.ycombinator.com/item?id=35378367>), Twitter, Discover BSD, or [Vermaden](https://vermaden.wordpress.com/2023/04/03/valuable-news-2023-04-03/). +With all that interest come quite a few questions and comments. +The following is an attempt to summarize it all. + + +### People who use FreeBSD don't care about FreeBSD hardware {#people-who-use-freebsd-don-t-care-about-freebsd-hardware} + +This makes perfect sense. +If your FreeBSD installation on X220 works flawlessly, you may not care about anything more modern. +But there will come a time when you will need to replace the hardware. + +{{< img-r "freebsd-beastie.png" >}} +FreeBSD Beastie +{{< /img-r >}} + +This comment, however, came as a proof that the sample from my blog is invalid. +This may be the case, but I don't buy it. +All traffic on the aforementioned post came from Reddit's BSD forum. +It's the one place where you could expect that people using BSD would hang. +It may also be that it's quite a random sample - it's small, and people who have yet to become into BSD but are BSD-curious opened my blog post. +I am in no place to debunk or confirm this. +I, however, know that many people presenting at FreeBSD conferences do it using Macs or Windows. +So even if the numbers are dubious, the overall feeling remains sorrowful. + +To add to the above: there are also stats for the commented opinion piece. +Two hundred forty-four people opened it from /r/freebsd. +Of that, 24 people were using FreeBSD, and just 2 were using OpenBSD. + + +### Your statistics may be invalid as people mask their browser agent. {#your-statistics-may-be-invalid-as-people-mask-their-browser-agent-dot} + +This also may be the case. +Why, then, is the referer not spoofed? +It's a much more invasive data point than the underlying OS. +But I'm a simple Firefox user, never used Librewolf. + + +### FreeBSD is a server OS {#freebsd-is-a-server-os} + +Yeah, this is the sentiment I've read before jumping aboard. +My problem with this idea is that each and every FOSS OS is a value in itself. +The current poster boy, +Linux, also had huge problems getting to work on various machines. +In my opinion, it's limiting OS to a single use case is a completely valid point - your use case for FreeBSD is on a server, and this is where it currently shines (or not, depending on your experience). +Some folks despise allocating any FreeBSD dev time to the desktop as there are many server issues. + +But again, I don't see it this way. +Limiting FreeBSD to the server only is short-lighted. +Unless you are already powering your servers with BSD, there will always be a question: "Why not Linux. It's what everyone else is doing". +And Linux got into its current position not by being a great server machine but rather by attracting the interest of some very skillful people. +And it did it by allowing more and more people to free themselves from Windows on their machines. + +I see FreeBSD problems as having two primary causes: the [Unix wars](https://en.wikipedia.org/wiki/Unix_wars) of the past and limited resources now. +If FreeBSD were easier to use on a wide range of end-user machines (which tend to be laptops), the easier it would for people to want to develop it. +BSDs are now a far second choice. +Why would someone invest time? +They may fall in love with the OS, but unless they try it, it will never happen. + + +### I like our small userbase {#i-like-our-small-userbase} + +I'm as elitist as the other person. [DWM](https://dwm.suckless.org/) stated that + +> "This keeps its userbase small and elitist. +> No novices asking stupid questions. + +I can't find this quote anymore, but the sentiment seems similar. +However, there are two aspects here. + +FreeBSD comes with no graphical interface by default. +This makes it much closer to minimalist distros than Ubuntu. +This still allows anyone to feel like a hacker. + +The second, however, is that some problems are unsolvable by end-user. +Writing drivers is EXTREMELY difficult, and, as I've recently learned (thanks, Jeff!), this is especially true when it comes to WiFi drivers, as there is no open implementation. +This means that any progress requires a trial-and-error process based on reverse engineering. +No one without deep knowledge of low-level programming will be able to make any progress, and even those few will need people with real hardware for testing. + + +### Hardware support is years behind Linux {#hardware-support-is-years-behind-linux} + +Yes, and this is what I was referring to. + + +### Why would anyone use BSD on a desktop? {#why-would-anyone-use-bsd-on-a-desktop} + +It's a great system, just needs a lot of work on hardware support :-) + + +### Your post is worthless, and only the comments are interesting {#your-post-is-worthless-and-only-the-comments-are-interesting} + +It's more than I anticipated. That post was small and written without any deeper research. But the discussion around it makes me believe that I hit something real. diff --git a/content/bsd/history/01_multics.md b/content/bsd/history/01_multics.md index 3e18afe..169db3b 100644 --- a/content/bsd/history/01_multics.md +++ b/content/bsd/history/01_multics.md @@ -5,7 +5,8 @@ date = 2024-03-09T21:03:00+01:00 categories = ["bsd"] draft = false weight = 2001 -abstract = "BSD history starts with Multics" +hasNavSection = "bsd-history abstract BSD history starts with Multics" +shortname = "Part I: Multics" [menu] [menu.bsd-history] weight = 2001 diff --git a/content/bsd/history/02_unix.md b/content/bsd/history/02_unix.md index ca598c7..3f1abc9 100644 --- a/content/bsd/history/02_unix.md +++ b/content/bsd/history/02_unix.md @@ -5,7 +5,9 @@ date = 2024-03-16T21:00:00+01:00 categories = ["bsd"] draft = false weight = 2002 -abstract = "BSD history starts with Multics" +hasNavSection = "bsd-history" +abstract = "How Unix came to be?" +shortname = "Part II: Unix" [menu] [menu.bsd-history] weight = 2002 diff --git a/content/bsd/history/_index.md b/content/bsd/history/_index.md new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/content/bsd/history/_index.md diff --git a/content/star-trek/stv/05x14-bliss.md b/content/star-trek/stv/05x14-bliss.md new file mode 100644 index 0000000..d960cf3 --- /dev/null +++ b/content/star-trek/stv/05x14-bliss.md @@ -0,0 +1,52 @@ ++++ +title = "Star Trek: Voyager 05x14 - Bliss" +author = ["Michał Sapka"] +date = 2024-03-17T21:36:00+01:00 +categories = ["st-voy", "star-trek"] +draft = false +weight = 3013 +hasNavSection = "st-voy-episodes abstract A monster a week type of trek" +[menu] + [menu.st-voy-rev-s5] + weight = 3013 + identifier = "star-trek-voyager-05x14-bliss" + name = 14 ++++ + +## The plot {#the-plot} + +Voyager encounters wormhole leading directly to Earth. +Too beautiful to be true? +We learn that it's actually an alien creature that has the ability to project dreams and hopes to people minds, in order to trap them. +Only Seven and Naomi are immune to this, and Voyager enters the wormhole - which in reality is the creature's body. +Inside, we meet Quatai, an alien who has been trapped there for quite some time. + + +## Impressions {#impressions} + +Sometimes POSTE[^fn:1] is all you need. +Nothing out of the ordinary - just a problem in outer space. +This is very much ok. +The basic premise - great; crew on happy pills - perfect; Seven out to get to the bottom of it - ideal; Naomi - still cool. + +{{< img-c "star-trek-bliss.jpg" "https://www.youtube.com/watch?v=YJ2DRFP44K4" >}} +The creature in all of its glory +{{< /img-c >}} + +The most memorable part of this episode was the reaction of Quatai upon meeting Voyager. +After countless lies and deceptions by the creature, he can no longer accept that a good thing can happen. +He assumes that it's just another ploy to mess with his mind. +When we are in a dump, it's very hard to trust in positives. + +This episode also deepens the relation of Seven and Naomi. +They are the only ones on the Voyager _not_ waiting to return to Earth, as Voyager is their true home. +Fascinating. + +A good episode. + + +## Doctor Factor {#doctor-factor} + +Reduced to plot machine. Unacceptable! + +[^fn:1]: Plain Old Star Trek Episode |