Hi. I worked through @tekkb 's helpful instructions above but encountered the following error while applying the new rules:
Code
Error #0:
exception 'OMV\ExecException' with message 'Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; /etc/network/if-pre-up.d/openmediavault-iptables 2>&1' with exit code '1': iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.' in /usr/share/php/openmediavault/system/process.inc:175
Stack trace:
#0 /usr/share/openmediavault/engined/module/iptables.inc(46): OMV\System\Process->execute()
#1 /usr/share/openmediavault/engined/rpc/config.inc(189): OMVModuleIptables->startService()
#2 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(150): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
#5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(528): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatusi7...', '/tmp/bgoutput3G...')
#6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(151): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#7 /usr/share/openmediavault/engined/rpc/config.inc(208): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
#8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
#9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
#10 /usr/share/php/openmediavault/rpc/rpc.inc(84): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
#11 /usr/sbin/omv-engined(516): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
#12 {main}
Alles anzeigen
The content of /etc/network/if-pre-up.d/openmediavault-iptables is:
Bash
#!/bin/sh
# This configuration file is auto-generated.
# WARNING: Do not edit this file, your changes will be lost.
iptables -t filter -F
iptables -A INPUT -p all -j ACCEPT -m conntrack --ctstate ESTABLISHED,RELATED
iptables -A INPUT -p all -j ACCEPT -i lo
iptables -A INPUT -p icmp --source 192.168.1.1/24 --destination 192.168.1.102 -j ACCEPT
iptables -A INPUT -p tcp --destination 192.168.1.102 --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --source 192.168.1.1/24 --destination 192.168.1.102 --dport 80 -j ACCEPT
iptables -A INPUT -p udp --source 192.168.1.1/24 --dport 137 -j ACCEPT
iptables -A INPUT -p udp --source 192.168.1.1/24 --dport 138 -j ACCEPT
iptables -A INPUT -p tcp --source 192.168.1.1/24 --destination 192.168.1.102 --dport 139 -j ACCEPT
iptables -A INPUT -p tcp --destination 192.168.1.102 --dport 443 -j ACCEPT
iptables -A INPUT -p tcp --source 192.168.1.1/24 --destination 192.168.1.102 --dport 445 -j ACCEPT
iptables -A INPUT -p tcp --source 192.168.1.1/24 --dport 631 -j ACCEPT
iptables -A INPUT -p udp --source 192.168.1.1/24 --dport 1900 -j ACCEPT
iptables -A INPUT -p tcp --destination 192.168.1.102 --dport 81 -j ACCEPT
iptables -A INPUT -p udp --source 192.168.1.1/24 --dport 5353 -j ACCEPT
iptables -A INPUT -p tcp --destination 192.168.1.102 --dport 32400 -j ACCEPT
iptables -A INPUT -p udp --source 192.168.1.1/24 --dport 32410 -j ACCEPT
iptables -A INPUT -p udp --source 192.168.1.1/24 --dport 32412:32414 -j ACCEPT
iptables -A INPUT -p tcp --destination 192.168.1.102 --dport 32443 -j ACCEPT
iptables -A INPUT -p tcp --source 192.168.1.1/24 --destination 192.168.1.102 --dport 32469 -j ACCEPT
iptables -A INPUT -p all -j REJECT
Alles anzeigen
What have I done wrong? What extra information should I provide? Thanks for your help...