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.

  • I am sorry, but I think I must reopen this report. Working with LibreELEC-RPi4.aarch64-13.0-nightly-20260502-e9fe4f0.img.gz and the acutal code, I still get this:

    Maybe this is the reason:

    Code
    LIBREELEC:/etc/iptables # modprobe xt_REJECT
    modprobe: FATAL: Module xt_REJECT not found in directory /lib/modules/6.18.21

    So for now I think DROP is a alternative option. Hope that helps

  • https://github.com/LibreELEC/LibreELEC.tv/pull/11304 Should fix it. There was a series of so files missing