mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-18 18:56:24 +00:00
Fallback to DROP when iptables REJECT is not available
Using REJECT allows better feedback for legitimate users while providing the same level of security than drop (see http://www.chiark.greenend.org.uk/~peterb/network/drop-vs-reject). But some hosts don't have REJECT support in the kernel config, so in that case we fall back to DROP.
This commit is contained in:
parent
2b4c674a1a
commit
fefb1e6928
@ -1,3 +1,5 @@
|
||||
* Fallback to DROP when iptables REJECT is not available [Pablo]
|
||||
|
||||
# v2.8.2
|
||||
|
||||
* Update the supervisor base to 20161103 to include the i386 fix [Pablo]
|
||||
|
@ -323,3 +323,6 @@ exports.createIpTablesRules = ->
|
||||
checkAndAddIptablesRule("INPUT -p tcp --dport #{config.listenPort} -i #{iface} -j ACCEPT")
|
||||
.then ->
|
||||
checkAndAddIptablesRule("INPUT -p tcp --dport #{config.listenPort} -j REJECT")
|
||||
.catch ->
|
||||
# On systems without REJECT support, fall back to DROP
|
||||
checkAndAddIptablesRule("INPUT -p tcp --dport #{config.listenPort} -j DROP")
|
||||
|
Loading…
Reference in New Issue
Block a user