Skip to content
AWS Metadata Proxy for protection against SSRF
Branch: master
Clone or download
willbengtson Update README iptable
Update the iptables rule to reflect what is in the example golang proxy code
Latest commit 7f39e87 Sep 17, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information. Update README iptable Sep 17, 2018
main.go Initial Commit Sep 17, 2018

AWS Metadata Proxy

Example AWS Metadata proxy to protect against attack vectors targetting AWS Credentials

Getting Started

Clone the repo

git clone
cd aws-metadata-proxy

Build the proxy

go get
go build

Network Setup

Create an iptable rule that prevents talking directly to the AWS Metadata Service except for a particular user, proxy_user in the example below. This is the user you run the proxy as on your server.

/sbin/iptables -t nat -A OUTPUT -m owner ! --uid-owner proxy_user -d -p tcp -m tcp --dport 80 -j DNAT --to-destination
You can’t perform that action at this time.