Explorar o código

gluon-core: firewall: make the default input policy REJECT

Fixes #1311
Matthias Schiffer %!s(int64=6) %!d(string=hai) anos
pai
achega
01336f70ec

+ 4 - 0
package/gluon-core/luasrc/lib/gluon/upgrade/140-firewall-rules

@@ -3,6 +3,10 @@
 local uci = require('simple-uci').cursor()
 
 
+local defaults = uci:get_first('firewall', 'defaults')
+uci:set('firewall', defaults, 'input', 'REJECT')
+
+
 local function reject_input_on_wan(zone)
 	if zone.name == 'wan' then
 		uci:set('firewall', zone['.name'], 'input', 'REJECT')