Skip to content

Instantly share code, notes, and snippets.

@alexcheng1982
Created December 20, 2017 21:03
Show Gist options
  • Save alexcheng1982/82f777decc23cde37429bddd92bfab69 to your computer and use it in GitHub Desktop.
Save alexcheng1982/82f777decc23cde37429bddd92bfab69 to your computer and use it in GitHub Desktop.
Windows port forwarding for EC2
<powershell>
$ipAddress = (invoke-restmethod -uri http://169.254.169.254/latest/meta-data/local-ipv4)
"Setting up port forwarding"
netsh interface portproxy add v4tov4 listenport=80 connectport=8080 connectaddress=$ipAddress
</powershell>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment