Score:0

fail2ban block plex failed login attempts

br flag

I want to ban IPs who attempt to authenticate against my public Plex instance.

Im on Ubuntu and the log Im looking at is the following:

/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log

Filter

[Definition]
failregex = .*\[\d*\].*Completed: \[<HOST>\:.*401 GET.*

Sample Log lines

May 19, 2023 10:32:08.127 [140346159979320] DEBUG - Completed: [1.2.3.4:45528] 401 GET / (3 live) #d130 GZIP 0ms 435 bytes
May 19, 2023 13:38:38.252 [140346093181752] DEBUG - Request: [1.2.3.5:58892 (Subnet)] GET /:/prefs (12 live) #d201 TLS GZIP Signed-in Token (username) (Chrome)

As you can see Im trying to block the IP of the line that has the 401 response but when I test the filter with fail2ban-regex I always get 0 matched. What am I missing?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.