Skip to content

Instantly share code, notes, and snippets.

View anryko's full-sized avatar
🙃
I may be slow to respond.

Andrej Svenke anryko

🙃
I may be slow to respond.
View GitHub Profile
@anryko
anryko / ec2.sh
Created April 24, 2019 09:02 — forked from kwilczynski/ec2.sh
Lock down EC2 meta-data to root (or others) only.
iptables -t filter -I OUTPUT -d 169.254.169.254 -j EC2
iptables -N EC2
iptables -A EC2 -m owner --uid-owner root -d 169.254.169.254 -j ACCEPT
iptables -A EC2 -j REJECT --reject-with icmp-host-unreachable