File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 55
55
PORTS_TO_BLOCK="80,5555,2222"
56
56
EXTERNAL_INTERFACE=$1
57
57
58
- # Flush an delete custom Chains
58
+ # Flush and delete custom Chains
59
59
iptables -F DOCKER-USER
60
60
iptables -F EXTERNAL-ACCESS-DENY
61
61
iptables -X EXTERNAL-ACCESS-DENY
@@ -66,9 +66,12 @@ iptables -A EXTERNAL-ACCESS-DENY -j LOG --log-prefix "DCKR-EXT-ACCESS-DENY:" --l
66
66
iptables -A EXTERNAL-ACCESS-DENY -j DROP
67
67
68
68
# Block all incomming traffic for docker
69
- iptables -A DOCKER-USER -i $EXTERNAL_INTERFACE -p tcp --match multiport --dports $PORTS_TO_BLOCK -j EXTERNAL-ACCESS-DENY
69
+ iptables -A DOCKER-USER -i $EXTERNAL_INTERFACE \
70
+ -p tcp --match multiport \
71
+ --dports $PORTS_TO_BLOCK \
72
+ -j EXTERNAL-ACCESS-DENY
70
73
71
- # Restore default rule to return all the back to FORWARD-Chain
74
+ # Restore default rule to return all the rest back to the FORWARD-Chain
72
75
iptables -A DOCKER-USER -j RETURN
73
76
74
77
echo "Rules created "
You can’t perform that action at this time.
0 commit comments