Added an option to specify Host and guest ip for port forward #1121

Closed
wants to merge 6 commits into
from

Conversation

Projects
None yet
8 participants
@rrehbein

Added an option to specify Host and guest ip for port forward.

Also changed the default SSH to use the loopback interface rather then bind to 'all interfaces'. This should mitigate the openness of vagrant boxes with known username/password full ssh access to anyone that can talk to port 2222 (and family)

@arteal

This comment has been minimized.

Show comment Hide comment
@arteal

arteal Oct 1, 2012

I think this is must-have feature! Thanks for writing it and I hope it will be included soon!

arteal commented Oct 1, 2012

I think this is must-have feature! Thanks for writing it and I hope it will be included soon!

@taurus-forever

This comment has been minimized.

Show comment Hide comment
@taurus-forever

taurus-forever Oct 11, 2012

We also do need this functionality too and can help with testing it for next Vagrant release if require. Tnx!

We also do need this functionality too and can help with testing it for next Vagrant release if require. Tnx!

@jbmaster

This comment has been minimized.

Show comment Hide comment
@jbmaster

jbmaster Nov 1, 2012

Nice feature. However there is an issue if you need to forward the same port on multiple guestip.
In this case vagrant create only one entry, for port that is defined later in config.

jbmaster commented Nov 1, 2012

Nice feature. However there is an issue if you need to forward the same port on multiple guestip.
In this case vagrant create only one entry, for port that is defined later in config.

@rrehbein

This comment has been minimized.

Show comment Hide comment
@rrehbein

rrehbein Nov 1, 2012

Thank you. I had not considered the possibility of 2+ of 3+ guest interfaces. Short term, 'all interfaces' is still available by either leaving the guestip option off, or setting it to blank, which would match the current 'all interfaces' default behavior.

rrehbein commented Nov 1, 2012

Thank you. I had not considered the possibility of 2+ of 3+ guest interfaces. Short term, 'all interfaces' is still available by either leaving the guestip option off, or setting it to blank, which would match the current 'all interfaces' default behavior.

@mconigliaro

This comment has been minimized.

Show comment Hide comment
@mconigliaro

mconigliaro Mar 13, 2013

Wow, we just discovered this "SSH listens on all interfaces by default" business. It seems crazy to me that this is the default setting, let alone that there is apparently no way to change it. Since this pull request was never accepted, does anyone have a workaround?

Wow, we just discovered this "SSH listens on all interfaces by default" business. It seems crazy to me that this is the default setting, let alone that there is apparently no way to change it. Since this pull request was never accepted, does anyone have a workaround?

@rrehbein

This comment has been minimized.

Show comment Hide comment
@rrehbein

rrehbein Mar 13, 2013

Till @mitchellh gets around to it, the workaround is to have a properly configured firewall. Technically, you should anyway, but I'd feel better if there was a bit more of a 'many moats' factor, rather then assuming users enable their firewalls.

Other then having #1122 closed, I haven't gotten any form of vagrant developer feedback about this feature. So far, it has just comments from vagrant users.

Till @mitchellh gets around to it, the workaround is to have a properly configured firewall. Technically, you should anyway, but I'd feel better if there was a bit more of a 'many moats' factor, rather then assuming users enable their firewalls.

Other then having #1122 closed, I haven't gotten any form of vagrant developer feedback about this feature. So far, it has just comments from vagrant users.

@mitchellh

This comment has been minimized.

Show comment Hide comment
@mitchellh

mitchellh Mar 19, 2013

Owner

Apologies for being so late and missing this PR. This looks good. Looking into merging now.

Owner

mitchellh commented Mar 19, 2013

Apologies for being so late and missing this PR. This looks good. Looking into merging now.

@rcarmo

This comment has been minimized.

Show comment Hide comment
@rcarmo

rcarmo May 11, 2013

Erm... I just came across this looking for this very same functionality, and it's been two months...

rcarmo commented May 11, 2013

Erm... I just came across this looking for this very same functionality, and it's been two months...

@rurounijones

This comment has been minimized.

Show comment Hide comment
@rurounijones

rurounijones May 13, 2013

Being able to specify the IP address on the guest is essential when you having services binding to specific private IP addresses. +1 for this functionality.

Being able to specify the IP address on the guest is essential when you having services binding to specific private IP addresses. +1 for this functionality.

@rurounijones

This comment has been minimized.

Show comment Hide comment
@rurounijones

rurounijones Jun 24, 2013

It looks like this was (half?) fixed on the commit jbmaster commented on and linked to above, to fix the SSH issue GH-1785 that was also fixed in this pull request.

It looks like some "guestip" code was added to that pull request but I am not sure if it gets us the full guest IP binding ability. @rrehbeindoi , I don't suppose you could confirm this?

It looks like this was (half?) fixed on the commit jbmaster commented on and linked to above, to fix the SSH issue GH-1785 that was also fixed in this pull request.

It looks like some "guestip" code was added to that pull request but I am not sure if it gets us the full guest IP binding ability. @rrehbeindoi , I don't suppose you could confirm this?

@rrehbein

This comment has been minimized.

Show comment Hide comment
@rrehbein

rrehbein Jun 28, 2013

These changes appear to be have been added for the VirtualBox 4.2 driver. Not sure if it matters for people 'keeping up to date' that it is still missing for 4.1 and 4.0.

These changes appear to be have been added for the VirtualBox 4.2 driver. Not sure if it matters for people 'keeping up to date' that it is still missing for 4.1 and 4.0.

@mitchellh

This comment has been minimized.

Show comment Hide comment
@mitchellh

mitchellh Jul 11, 2013

Owner

This is in and part of the release of 1.2.3, but only for VirtualBox 4.2. Support for other versions was just added.

Owner

mitchellh commented Jul 11, 2013

This is in and part of the release of 1.2.3, but only for VirtualBox 4.2. Support for other versions was just added.

@mitchellh mitchellh closed this Jul 11, 2013

znz added a commit to znz/vagrant that referenced this pull request Jul 18, 2013

mitchellh added a commit that referenced this pull request Jul 18, 2013

dldinternet pushed a commit to dldinternet/vagrant that referenced this pull request Aug 26, 2013

dldinternet pushed a commit to dldinternet/vagrant that referenced this pull request Sep 1, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment