dockerd: Made blocked_interfaces ip rule REJECT
authorGerard Ryan <G.M0N3Y.2503@gmail.com>
Sat, 20 Feb 2021 07:32:31 +0000 (17:32 +1000)
committerGerard Ryan <G.M0N3Y.2503@gmail.com>
Sun, 21 Feb 2021 01:01:38 +0000 (11:01 +1000)
* Changed from DROP to REJECT to be consistant with other firewall rules

Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
utils/dockerd/files/dockerd.init

index 1eaed6710ae900ae34b5a76c5606fea15559102a..1ad2b62ea92827c308334afb90566e83ee8d6459 100755 (executable)
@@ -208,9 +208,9 @@ iptables_add_blocking_rule() {
 
                # Ignore errors as it might already be present
                iptables --table filter --new DOCKER-USER 2>/dev/null
-               if ! iptables --table filter --check DOCKER-USER --in-interface "${inbound}" --out-interface "${outbound}" ${extra_iptables_args} --jump DROP 2>/dev/null; then
+               if ! iptables --table filter --check DOCKER-USER --in-interface "${inbound}" --out-interface "${outbound}" ${extra_iptables_args} --jump REJECT 2>/dev/null; then
                        logger -t "dockerd-init" -p notice "Drop traffic from ${inbound} to ${outbound}"
-                       iptables --table filter --insert DOCKER-USER --in-interface "${inbound}" --out-interface "${outbound}" ${extra_iptables_args} --jump DROP
+                       iptables --table filter --insert DOCKER-USER --in-interface "${inbound}" --out-interface "${outbound}" ${extra_iptables_args} --jump REJECT
                fi
        }