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 5555PORTS_TO_BLOCK="80,5555,2222"
5656EXTERNAL_INTERFACE=$1
5757
58- # Flush an delete custom Chains
58+ # Flush and delete custom Chains
5959iptables -F DOCKER-USER
6060iptables -F EXTERNAL-ACCESS-DENY
6161iptables -X EXTERNAL-ACCESS-DENY
@@ -66,9 +66,12 @@ iptables -A EXTERNAL-ACCESS-DENY -j LOG --log-prefix "DCKR-EXT-ACCESS-DENY:" --l
6666iptables -A EXTERNAL-ACCESS-DENY -j DROP
6767
6868# 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
7073
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
7275iptables -A DOCKER-USER -j RETURN
7376
7477echo "Rules created "
You can’t perform that action at this time.
0 commit comments