Firewall not working

  • Hallo.

    Since several month I am working with the nightlyies. Current Version:

    Linux LIBREELEC 6.18.21 #1 SMP Sat Apr 25 04:39:21 UTC 2026 aarch64 GNU/Linux

    I wondered that the output of "iptables -L -v" is always empty but I had the firewall enabled in private mode. In the beginning I made my own firewall.service with a script. Then I tried a private nftables.service. The rules are loaded but "iptables -L -v" is not reflecting them.

    So I startet exploring the problem a little bit:

    The main probem may be the new integration with nftables and iptables as frontend. The current rules in /etc/iptables/* are not fully compatible. iptables is always ending up with errors. Beginning with a manual restore:

    Code
    < LIBREELEC:/etc/iptables # iptables-restore home.v4
    iptables-restore v1.8.13 (nf_tables): unknown option "--reject-with"
    Error occurred at line: 30
    Try `iptables-restore -h' or 'iptables-restore --help' for more information. >
    Code
    <- -A private-subnets -j REJECT --reject-with icmp-port-unreachable
    + -A private-subnets -j DROP >
    Code
    <- -A private-subnets -j REJECT --reject-with icmp6-port-unreachable
    + -A private-subnets -j DROP >

    After changing the code and saving it as /storage/.config/iptables/rules.v4(6) and editing the /storage/.cache/services/iptables.conf with "RULES=custom" at the very last end it is working :):

    If I made any mistakes please correct me. Hope that helps.