Skip to content

Instantly share code, notes, and snippets.

@ourway
Forked from jjorissen52/IAPTunneling.md
Created June 19, 2020 12:46
Show Gist options
  • Save ourway/acde090033eb4177413d4558034f4082 to your computer and use it in GitHub Desktop.
Save ourway/acde090033eb4177413d4558034f4082 to your computer and use it in GitHub Desktop.
SSH TCP Tunneling using Google Cloud SDK Identity Aware Proxy Commands

Using ssh Command:

# sudo only necessary to bind to protected port such as 80 or 443
sudo gcloud compute ssh <instance_name> -- -N -L 80:localhost:80

Using start-iap-tunnel Command

# sudo only necessary to bind to protected port such as 80 or 443
sudo gcloud compute start-iap-tunnel <instance_name> 80 --local-host-port=localhost:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment