Aldaviva / Fail2Ban4Win

🧱 Ban subnets using Windows Firewall rules after they make enough incorrect login attempts, as indicated by Windows Event Log records.
Apache License 2.0
41 stars 6 forks source link

.net 8.0 #36

Closed mexmer closed 1 month ago

mexmer commented 1 month ago

Hi, just wanted to ask, if you plan to switch to new .NET (8.0 is now LTS) instead of .NET framework.

Aldaviva commented 1 month ago

Hi @mexmer,

Thanks for the question. I like .NET 8 a lot, but I wasn't planning on doing this.

Summary: nothing wrong with it, it is feasible, I just don't see a benefit, so it would be a bit of work for no gain.

Here are the reasons I think this:

However, if there is a specific reason to target a .NET runtime like 6 or 8, I would consider multitargeting this project and providing separate downloads for both .NET Framework 4.8 and .NET 8. I won't be removing the .NET Framework build for backwards compatibility with existing installations, and because zero prerequisites is always helpful.

Let me know if there is a feature of the .NET 8 runtime that you are missing in this project.

mexmer commented 1 month ago

Thanks for answers. Indeed most of you mentioned makes sense.

Only problem with .NET framework i see, it is not pre installed (unless we talking .NET 2.0, but your app needs 4.8) ... here your assumption is wrong, it's optional component, you need download and install and requires computer restart (just did that few days ago, on windows 2016 .NET 4 feature installs only 4.6 and 2019 server .NET features is version 4.7) only Windows Server 2022 has 4.8, but even there it's optional feature, that is disabled by default and requires restart after installing.

since i'm writing services for windows server in .NET LTS (now 8, before 6), i'm somewhat familiar with it's downsides too. for deployment it depends on client, i either created selfconainted or framework dependent, it depends on client environment. Becuase we also provide app updates, i'm not much stressed with lack of windows update support for .NET LTS deployment, we just deliver app update after testing with new .NET release.

Anyways i was just curious, why project stays on .NET Framework, thanks for answers.

Aldaviva commented 1 month ago

Oh yeah I forgot that Server 2016 only starts with .NET Framework 4.6.2 instead of 4.8 before updates. I think I was getting it confused with Windows 10 which has a shorter support lifecycle than Server.

I could have sworn it was preinstalled and didn't require a restart. Are you referring to Server Core/Nano/no-Desktop-Experience? I will have to test this out in a VM to refresh my memory. I don't remember having to install it in either of my server machines, otherwise how would PowerShell work?

Thanks!

Aldaviva commented 1 month ago

.NET Framework 4.7.2 was preinstalled in Server 2019 Desktop Experience, and installing the 4.8 update did require a restart. I must have gotten that via Windows Update before attempting to run this program on my real servers.

Thanks again, I know a little bit more about this now.

mexmer commented 1 month ago

Oh yeah I forgot that Server 2016 only starts with .NET Framework 4.6.2 instead of 4.8 before updates. I think I was getting it confused with Windows 10 which has a shorter support lifecycle than Server.

I could have sworn it was preinstalled and didn't require a restart. Are you referring to Server Core/Nano/no-Desktop-Experience? I will have to test this out in a VM to refresh my memory. I don't remember having to install it in either of my server machines, otherwise how would PowerShell work?

Thanks!

FYI feature is automatically installed, if you go with "Desktop Experience" setup (this is available for standard, and datacenter edition) or install Windows Server Essentials Edition, because MMC modules are written in .NET Framework. But will still require update, unless you installing Windows Server 2022

Aldaviva commented 1 month ago

Seems like a fresh installation of Server 2019 Core (without Desktop Experience) also has .NET Framework 4.7.2 preinstalled. If it didn't, PowerShell 5 wouldn't run. But yeah, an update would be required to get .NET Framework 4.8 on here.

Windows Server 2019 (2)-2024-09-05-06-18-42

mexmer commented 1 month ago

You are right, i forgot about powershell. so yes, core is installed, and for your service it would be enough, except it targets 4.8