-2

I need to setup a static IP for 3rd parties to whitelist, and I need to use that IP from my laptop to connect to that 3rd party using SFTP and / or SSH.

I'm thinking that I need to create a static IP in google cloud, and then somehow setup a proxy that use that IP outbound.

How can I possibly set that up in Google Cloud?

closed as off-topic by yoonix, mdpc, Jenny D, womble Dec 27 '17 at 2:29

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1

All you need for this is a simple f1-micro instance with a static IP running any UNIX-like operating system.

I had an answer all written up, but then I found this gem which seems to perfectly and correctly do exactly what you want.

Just for fun, here are the two potential approaches I was going to suggest:

  • As two separate connections: you first SSH into the "proxy" instance, then SSH out from there; for convenience you can use SSH agent forwarding (in the Public Key Access with Agent Forwarding section, but I recommend reading it from the beginning; it's not that long).
  • One connection: You can tunnel directly using SSH; there's a Google Cloud Platform Community Tutorial on SSH tunneling covering it.
  • for the second option creating a tunnel - how would I bind a static IP to that? – gottlieb76 Dec 19 '17 at 13:12
  • @gottlieb76 I recommend following the link behind the words "this gem" and using that instead. If you want to implement one of the other suggestions instead, you create the VM using a static IP; go into the Networking section of the VM details to select that. – Alex Dec 19 '17 at 13:14
  • I read through it, but it explains how to connect to a specific host (hostname or IP), however, I need to expose a static IP from the proxy, not connect to a specific host. – gottlieb76 Dec 19 '17 at 13:15
  • @gottlieb76 You can connect to any host you want from it. The intermediate machine is the VM on GCP with the static IP. It isn't only for one destination! – Alex Dec 19 '17 at 13:17
  • I made sense of everything and got it working - thanks for the help. Much appreciated. I finally settled on the last option, the create a SSH tunnel - super simple once I figured it out. – gottlieb76 Dec 19 '17 at 14:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.