Hi, I can set temporary iptable rules via ssh but I don't know what the location is to save them permanently to a config file. I've tried /flash/firewall.conf and also in sbin but these don't work. Any advice appreciated.
Location of iptables config file for Rasberry Pi
-
jzza -
September 1, 2018 at 11:20 AM -
Thread is Resolved
-
-
-
Thanks vpeter
-
I have tried adding rules to:
/storage/.config/iptables/rules.v4
And it doesn't seem to work, upon reboot the rules are set to the default. Any ideas?
Thanks
-
-
Unfortunately it still doesn't work. On reboot the default rules are set.
I think the location might be wrong as the saved rules file doesn't seem to be loaded. I've tried in the flash directory but that doesn't work either.
-
I got this working by putting putting the rules into:
/storage/.config/autostart.sh
The rules are then applied at boot. Might not be the proper way but it works fine.
-
Did you even enable firewall in LibreELEC settings? There are 4 options: Custom/Off/Home/Public. Set to custom and it will be used on boot.
-
I didn't notice the firewall setting, is it in the LibreELEC settings in Kodi or is it done via the config.txt or another method? thanks.
-
LibreELEC settings in Kodi
-
I've looked through all settings options in the LibreELEC settings menu in Kodi and I can't see an option for the firewall. Could you please tell me what section within the settings menu it is within. thanks.
-
Maybe you should tell us which image are you using? Maybe this functionality is not even in your build.
-
That's probably what it is. I downloaded the installer from downloads – LibreELEC and selected 'Raspberry Pi v2 and Raspberry Pi v3'
-
You are using LibreELEC v8 which doesn't have this functionality. That's why you need to run it from autostart.sh or make appropriate service.