Firewall / nftables configuration

Hello to Yunohost team and all users,

First of, i want to say a great thank you to all the people behind Yunohost. You made a great job doing this and i hope it’ll keep increasing in greatness as it did until now.

My YunoHost server

Hardware: Dedicated computer
YunoHost version: 11.0.10.1
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes
If yes, please explain: My Yunohost server is in a DMZ in the configuration of my internet box.

Description of my issue

I’d like to adjust the firewall rules to something more secure. For example i’d like to limit access to some ports only to my LAN. As my server is opened to the world because of the DMZ, i want to adjust more precisely the rules of nftables used by Yunohost. The webadmin possibilities are too scarce.

On a previous version of Yunohost (not sure which one, but a month ago it was fine) the tip i found on this forum was working. It was to add a file in /etc/yunohost/hooks.d/post_iptables_rules/ containing the rules i wanted and they were automatically added after a reload of the Yunohost’s firewall. Now it’s not working anymore.

I tried to manually add the rules via iptables command and they can be seen in the result of “nft list ruleset” command.


Bonjour à l’équipe Yunohost et à tous les utilisateurs,

Tout d’abord je voudrais dire un grand merci à l’équipe derrière Yunohost. Vous avez fait un travail remarquable et j’espère qu’il n’aura de cesse de s’améliorer.

Mon serveur YunoHost

Matériel: Drdinateur dédié
Version de YunoHost: 11.0.10.1
J’ai accès à mon serveur : En SSH | Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : oui
Si oui, expliquer: Mon serveur Yunohost est dans la DMZ de ma box.

Description du problème

Je voudrais pouvoir personnaliser les règles du firewall pour quelque chose de plus sécurisé. PAr exemple, je voudrais limiter l’accès à certains ports à mon LAN. Vu que mon serveur est ouvert au monde à cause de la DMZ, je voudrais donc ajuster plus précisément les règles de nftables que Yunohost utilise. Les possibilités offertes par la webadmin sont trop limitées.

Sur une version plus ancienne de Yunohost (je ne sais plus laquelle, mais le mois dernier cela fonctionnait encore) l’astuce que j’avais trouvée sur ce forum fonctionnait. Elle consistait à ajouter un fichier dans /etc/yunohost/hooks.d/post_iptables_rules/ contenant les règles voulues et elles étaient automatiquement prises en compte après une relance du firewall. Cela ne fonctionne plus.

J’ai essayé d’ajouter les règles manuellement via des commandes iptables et elles apparaissent bien ensuite quand je fais un “nft list ruleset”.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.