Skip to content

Instantly share code, notes, and snippets.

@jjorissen52
Created May 28, 2020 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save jjorissen52/a2b855fa36bda8b754cf25c3ce51086c to your computer and use it in GitHub Desktop.
Save jjorissen52/a2b855fa36bda8b754cf25c3ce51086c 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