Ability to change the ssh port forwarding interface#134
Ability to change the ssh port forwarding interface#134ejdre-vestas wants to merge 11 commits intohashicorp:mainfrom
Conversation
|
"Go validate" action will fail until the dependency is merged. |
lbajolet-hashicorp
left a comment
There was a problem hiding this comment.
Hi @ejdre-vestas,
Thanks for this PR as well!
I have a comment that's quite similar to the one I left on your SDK PR, I would suggest making this a string, so users can specify whichever address is relevant to them, but aside from this nit, this looks good to me.
I'll let you address this when possible and I'll do another pass of review then.
Thanks!
| SkipNatMapping bool `mapstructure:"skip_nat_mapping" required:"false"` | ||
| // Defaults to false. When enabled, the ssh port forwarding will be set to listen on 0.0.0.0 | ||
| // as opposed to 127.0.0.1 | ||
| SSHListenOnAllInterfaces bool `mapstructure:"ssh_listen_on_all_interfaces" required:"false"` |
There was a problem hiding this comment.
I wonder if we could specify the listening address to be whatever we choose here instead of this flag?
There was a problem hiding this comment.
Thanks again for the comments. I have pushed a new commit.
…an specify the address
|
Hi, any chance to get this pull-request looked at again? I believe I have done all the requested changes. |
Motivation
While trying to run the virtual-box-iso builder on a WSL2 environment, I had issues getting the WSL2 to connect to the VirtualBox running on the Windows host through SSH.
This is because a connection coming from WSL is not considered a local connection (at least when using the default
NATnetworkingMode on WSL) and the virtual box is hard coded to port forward request coming on127.0.0.1.Changes
Added the property
ssh_listen_addresswhich makes it possible for clients to specify the address where the SSH port forwarding will be set to listen on.Dependency
This pull-request depends on hashicorp/packer-plugin-sdk#257 since it was used to generate the documentation for the
http_network_protocolproperty and to test the overall changes.