我正试图让我的Vagrant CentOS盒通过我的主机连接到VPN.我跟着这个:https://gist.github.com/mitchellh/1277049
但我仍然无法连接到仅限VPN的主机.
我在Vagrant版本1.3.5和CentOS版本6.4.
流浪汉配置:config.vm.network :public_network
并且,如上面的链接所示,我有
vb.cusotomize["modifyvm", :id, "--natdnshostresolver1", "on"]
有了这个设置,我没有得到任何错误,它似乎似乎没有工作.我可以通过主机访问主机,但不能通过我的VM访问主机.当VM启动时,我选择我的2) en0: Ethernet 1
连接.
正如Terry Wang回答的那样,删除public_network,然后按照这个回答https://superuser.com/questions/542709/vagrant-share-host-vpn-with-guest
较新版本的Vagrant只会将主机用作dns:
config.vm.provider :virtualbox do |vb| vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] end