winnfsd / vagrant-winnfsd

Manage and adds support for NFS for Vagrant on Windows.
Other
567 stars 62 forks source link

Custom override of host IP addressed used in NFS shares #62

Closed patricknelson closed 8 years ago

patricknelson commented 9 years ago

Please excuse my code, as I'm not a ruby miner (I'm a PHP guy), so I apologize deeply in advance.

I'm in a situation where I cannot access my NFS shares when I'm connected to VPN, since all communications with the host machine (that aren't directly tied to loop-back at 127.0.0.1) are completely locked out. Thankfully, my VM sees the host machine (in my case) always as 10.0.2.2. The problem is, due to Vagrant core NFS functionality, they automatically use the host-only IP address (which in my case was 10.9.8.1 since my private network address was 10.9.8.7). Unfortunately, that gets locked out so the VM cannot connect to that IP (while communications are just fine on my forwarded ports and when directly connecting back to 10.0.2.2).

This PR provides a workaround that I've implemented in my copy of your plugin which just allows me to set the IP address in my configuration. Is there a better way of doing this? I'm completely open to the possibility that I'm doing this all wrong (and I struggled with this for several hours!).

patricknelson commented 8 years ago

Bump!

patricknelson commented 8 years ago

Double bump?

GM-Alex commented 8 years ago

@patricknelson Sorry for the late response. I hope I'm able to build a new release this week. Thanks for you help!

patricknelson commented 8 years ago

Hey, you're welcome and thanks for circling back to it!

Every once in a while I need to setup a new machine and use NFS so I've found myself manually overriding with my small fork after performing a vagrant plugin install vagrant-winnfsd, so I figured this would make more sense over the long term. I wanted to make sure there was nothing else I would need to do as well, so I don't forget to tackle it when I have time.