Banning a Country in KeyHelp
Re: Banning a Country in KeyHelp
Lets assume, all IPv4 address (+masks) have this format (including comma).
"XXX.XXX.XXX.XXX/XX," = 19 characters
16.777.215 / 19 = 883.011
So you would be able to use 883.011 IPv4 addresses
Note:
- This does not take into account IPv6 addresses
- I have not checked if there are limits by IPTables (so you probably can use less addresses)
- Like pointed out, this could become rather inefficient to handle (on the firewall end, as well as in the UI).
Alexander Mahr
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Re: Banning a Country in KeyHelp
Alexander wrote: ↑Mon 20. Jan 2025, 10:20 Regarding the limitations by KeyHelp, you can use up to 16.777.215 characters in total.
Lets assume, all IPv4 address (+masks) have this format (including comma).
"XXX.XXX.XXX.XXX/XX," = 19 characters
16.777.215 / 19 = 883.011
So you would be able to use 883.011 IPv4 addresses
Note:
- This does not take into account IPv6 addresses
- I have not checked if there are limits by IPTables (so you probably can use less addresses)
- Like pointed out, this could become rather inefficient to handle (on the firewall end, as well as in the UI).
So, just to make sure I have understood this correctly:
883 IPv4 can be saved in EACH RULE in the firewall to ensure its proper operation.
Correct?
- Jolinar
- Community Moderator
- Posts: 4003
- Joined: Sat 30. Jan 2016, 07:11
- Location: Weimar (Thüringen)
- Contact:
Re: Banning a Country in KeyHelp
No!
Please read carefully again!
Data Collector für Community Support
___
Ich verwende zwei verschiedene Schriftfarben in meinen Beiträgen /
I use two different font colors in my posts:
- In dieser Farbe schreibe ich als Moderator und gebe moderative Hinweise oder begründe moderative Eingriffe /
In this color, I write as a moderator and provide moderative guidance or justify moderative interventions - In dieser Farbe schreibe ich als Community Mitglied und teile meine private Meinung und persönlichen Ansichten mit /
In this color, I write as a community member and share my personal opinions and views
Re: Banning a Country in KeyHelp
--
A Windows user reinstalls software every few weeks.
A Linux user reinstalls software every few weeks.
The difference is with Linux the version numbers change.
Re: Banning a Country in KeyHelp
With this setup one could ban a whole country within the file „countryland.txt“ and „anotherland.txt“ and so on.
Tobi
-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
Re: Banning a Country in KeyHelp
If possible, use an external FW and turn off the internal one. This prevents the ipset rules from being deleted in the event of a FW flush.
It causes less load when reloading (restore) the blacklists with many IP addresses ... country blocks can be loaded once at system startup via cronjob; they do not need to be updated constantly.
If no external FW is available, then a script would have to be executed after a flush to reload and activate your ipsets.
Re: Banning a Country in KeyHelp
I want to extend the KeyHelp firewall.
As you said, contry-Ip-ranges don‘t need to be updated very often.
Tobi
-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser