Skip to content

Commit cc5b12c

Browse files
committed
gce: redirect handshake server requests to metadata-concealment too
1 parent 0f39af9 commit cc5b12c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cluster/gce/gci/configure-helper.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ function config-ip-firewall {
174174
if [[ "${ENABLE_METADATA_CONCEALMENT:-}" == "true" ]] && [[ ! "${METADATA_CONCEALMENT_NO_FIREWALL:-}" == "true" ]]; then
175175
echo "Add rule for metadata concealment"
176176
iptables -w -t nat -I PREROUTING -p tcp ! -i eth0 -d "${METADATA_SERVER_IP}" --dport 80 -m comment --comment "metadata-concealment: bridge traffic to metadata server goes to metadata proxy" -j REDIRECT --to-ports 988
177+
iptables -w -t nat -I PREROUTING -p tcp ! -i eth0 -d "${METADATA_SERVER_IP}" --dport 8080 -m comment --comment "metadata-concealment: bridge traffic to metadata server goes to metadata proxy" -j REDIRECT --to-ports 987
177178
fi
179+
iptables -w -t raw -I OUTPUT -s 169.254.169.254 -j DROP
178180

179181
# Log all metadata access not from approved processes.
180182
case "${METADATA_SERVER_FIREWALL_MODE:-off}" in

0 commit comments

Comments
 (0)