Skip to content

Commit

Permalink
Add firewall rule to block access to metadata server
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed Dec 17, 2024
1 parent ae05b97 commit 1c70863
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions site/profile/manifests/firewall.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@
out_all => true,
noflush_tables => ['inet-f2b-table'],
}

# Do not let user get access to cloud-init metadata server as it could
# include sensitive information.
nftables::rule { 'default_out-drop_metadata':
content => 'ip daddr 169.254.169.254 skuid != 0 drop comment "Drop metadata server"',
order => '89',
}
}

0 comments on commit 1c70863

Please sign in to comment.