HiddenWall is a Linux kernel module generator used to create hidden kernel modules to protect your server from attackers. It supports custom rules with netfilter (block ports, hidden mode, rootkit functions etc).
The motivation is basically another layer of protection, much like a hidden firewall – setting securelevel to 2 on BSD would have a similar effect.
In a typical attack, the bad actor can alter your IPTables or UFW rules – with HiddenWall you still have another layer that can block external access because it hooks directly into netfilter from kernel land.
The author created it to protect his own servers but realised it also helps people who can’t write low-level code roll their own customized, hidden kernel modules.
If you can write low-level code, you can always add more module templates to HiddenWall.
Installing HiddenWall to Create Hidden Kernel Modules
Verify if the kernel version is 3.x, 4.x or 5.x:
Clone the repository
git clone https://github.com/CoolerVoid/HiddenWall
Enter the folder
Edit your firewall rules in directory
rules/server.yaml, the python scripts use that file to generate a new firewall module.
$ cat rules/server.yaml
If you want to study the static code to generate, look the content at directory “templates”.
Then you would want to generate a kernel module following your YAML file of rules:
$ python3 WallGen.py —template template/hiddenwall.c –r rules/server.yaml
Then install it with
You can download HiddenWall here:
Or read more here.