mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-14 19:41:51 +00:00
Set REJECT as default for firewall config
This commit is contained in:
parent
9a66920099
commit
b907c99915
1 changed files with 8 additions and 0 deletions
|
@ -1,5 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Set REJECT as default rule if an interface is not in a zone
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
set firewall.@defaults[0].input='REJECT'
|
||||||
|
set firewall.@defaults[0].output='REJECT'
|
||||||
|
set firewall.@defaults[0].forward='REJECT'
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
if [ "$(uci -q get firewall.@zone[2].name)" = "vpn" ]; then
|
if [ "$(uci -q get firewall.@zone[2].name)" = "vpn" ]; then
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
del firewall.@zone[2]
|
del firewall.@zone[2]
|
||||||
|
|
Loading…
Reference in a new issue