We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3cfd6b6 commit 0a25c76Copy full SHA for 0a25c76
templates/client.sh
@@ -90,3 +90,15 @@ systemctl restart docker
90
# Start and enable Nomad
91
systemctl start nomad
92
systemctl enable nomad
93
+
94
+# Block access to the metadata endpoint in three easy steps
95
+# https://github.com/picatz/terraform-google-nomad/issues/19
96
+#
97
+# Note: this also blocks DNS resolution within Nomad allocations (no apt install in containers)
98
99
+# 1. Create NOAMD-ADMIN chain
100
+sudo iptables --new NOMAD-ADMIN
101
+# 2. Add default rule
102
+sudo iptables --append NOMAD-ADMIN --destination 172.26.64.0/20 --jump ACCEPT
103
+# 3. Block access to metadata endpoint
104
+sudo iptables --append NOMAD-ADMIN --destination 169.254.169.254/32 --jump DROP
0 commit comments